public class PartitionKey
extends java.lang.Object
implements java.io.Serializable
SpatialPartition. It is used to associate an RDD's single element to the partition it belongs and other partitions (with smaller partition index values) which also contain the RDD element.| Constructor and Description | 
|---|
PartitionKey()
Creates an empty instance 
 | 
PartitionKey(int index)
Creates an instance pointing to a partition with the given index 
 | 
PartitionKey(int index, java.lang.Integer[] previousIndexes)
Creates an instance pointing to a partition with the given index and the given previousIndexes 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(java.lang.Object obj)  | 
int | 
getIndex()
Gets the index of the referenced partition 
 | 
java.lang.Integer[] | 
getPreviousIndexes()
Gets an array of partitions indexes which also contain the RDD element this key is associated with. 
 | 
int | 
hashCode()  | 
void | 
readFields(java.io.DataInput in)  | 
void | 
setIndex(int index)
Sets the index of the referenced partition 
 | 
void | 
setPreviousIndexes(java.lang.Integer[] previousIndexes)
Sets an array of partitions indexes which also contain the RDD element this key is associated with. 
 | 
java.lang.String | 
toString()  | 
void | 
write(java.io.DataOutput out)  | 
public PartitionKey()
public PartitionKey(int index)
index -
public PartitionKey(int index,
                    java.lang.Integer[] previousIndexes)
index -previousIndexes -public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int getIndex()
public java.lang.Integer[] getPreviousIndexes()
public int hashCode()
hashCode in class java.lang.Object
public void readFields(java.io.DataInput in)
                throws java.io.IOException
java.io.IOExceptionpublic void setIndex(int index)
index - an index equals or largest than 0 or -1 if no partition is referencedpublic void setPreviousIndexes(java.lang.Integer[] previousIndexes)
This data is used to avoid processing RDD elements residing in more than one partition.
previousIndexes - an array of partitions indexes. The index values must be less than the current PartitionKey's index.public java.lang.String toString()
toString in class java.lang.Object
public void write(java.io.DataOutput out)
           throws java.io.IOException
java.io.IOExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.