java.lang.Object
com.pervasive.datarush.cal.NodeAllocationState
- All Implemented Interfaces:
Serializable
Reflects the current state of node allocation, which takes into account
failed nodes.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAssignment details for a particular node ID. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of assignments in this node allocation.returns assignments, grouped by current physical node idReturns the physical node id of the job master.Gets the per-partition resource allocation.static NodeAllocationStateinitial(NodeAllocationPlan plan) Creates the initial NodeAllocationState based on the plan.reallocate(String failedNode) Utility to re-allocate the work of a failed node to the other nodes in the cluster.
-
Method Details
-
initial
Creates the initial NodeAllocationState based on the plan.- Parameters:
plan- the initial allocation plam- Returns:
- the initial state
-
getJobMasterNodeId
Returns the physical node id of the job master. This will return null in the pseudo-distributed case.- Returns:
- the physical node id of the job master
-
getAssignments
Returns a list of assignments in this node allocation. Assignments are sorted byNodeAllocationState.AssignmentState.getPartitionID().- Returns:
- a list of assignments
-
reallocate
Utility to re-allocate the work of a failed node to the other nodes in the cluster.- Parameters:
failedNode- the failed node- Returns:
- a new NodeAllocation
-
getGroupedAssignments
returns assignments, grouped by current physical node id- Returns:
- assignments, grouped by current physical node id
-
getPerPartitionResources
Gets the per-partition resource allocation.- Returns:
- the resources alloted to each partition
-