- java.lang.Object
-
- com.pervasive.datarush.cal.PartitionInstanceInfo
-
- All Implemented Interfaces:
Serializable
public final class PartitionInstanceInfo extends Object implements Serializable
Information pertaining to an instance of a partitioning operation. Captures the total partition count and the identifier of the current partition (holder of and object of this class). The partition identifier is a zero-based, one-up number used to uniquely identify each partition within a partition set.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PartitionInstanceInfo
MASTER
Partition info for a master node.
-
Constructor Summary
Constructors Constructor Description PartitionInstanceInfo(NodeAllocationState.AssignmentState assignment, int partitionCount)
Construct with given count and ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
NodeAllocationState.AssignmentState
getAssignment()
Returns the assignmentint
getPartitionCount()
Get the partition count.int
getPartitionID()
Get the partition ID.int
hashCode()
String
toString()
-
-
-
Field Detail
-
MASTER
public static final PartitionInstanceInfo MASTER
Partition info for a master node. Partition id is always zero and partitionCount is always one because only workers are parallelizable.
-
-
Constructor Detail
-
PartitionInstanceInfo
public PartitionInstanceInfo(NodeAllocationState.AssignmentState assignment, int partitionCount)
Construct with given count and ID.- Parameters:
partitionCount
- total partition countpartitionID
- current partition ID
-
-
Method Detail
-
getPartitionCount
public int getPartitionCount()
Get the partition count.- Returns:
- partition count
-
getAssignment
public NodeAllocationState.AssignmentState getAssignment()
Returns the assignment- Returns:
- the assignment
-
getPartitionID
public int getPartitionID()
Get the partition ID.- Returns:
- partition ID
-
-