- java.lang.Object
-
- com.pervasive.datarush.cal.NodeAllocationPlan
-
- All Implemented Interfaces:
Serializable
public final class NodeAllocationPlan extends Object implements Serializable
Represents the initial node allocation.NodeAllocationStaterepresents the current NodeAllocation.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeAllocationPlan.AssignmentPlanAssignment details for a particular node ID.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeAllocationPlancreate(String jobMasterNodeId, ResourceAllocation masterResources, List<NodeAllocationPlan.AssignmentPlan> assignments, ResourceAllocation partitionResources, NodeInformationMapping nodeMapping)Creates a new node allocation.List<NodeAllocationPlan.AssignmentPlan>getAssignments()Returns a list of assignments in this node allocation.StringgetJobMasterNodeId()Returns the physical node id of the job master.ResourceAllocationgetJobMasterResources()Gets the allocated resources for the job master.NodeInformationMappinggetNodeMapping()Returns the node information for all the nodes referenced by this plan.ResourceAllocationgetPerPartitionResources()Gets the allocated allocated resources for each partition.NodeAllocationPlansubPlan(int maxParallelism)Returns the effective NodeAllocationPlan, given the specified value of max parallelism.
-
-
-
Method Detail
-
getJobMasterNodeId
public String 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
public List<NodeAllocationPlan.AssignmentPlan> getAssignments()
Returns a list of assignments in this node allocation. Assignments are sorted byNodeAllocationPlan.AssignmentPlan.getPartitionID().- Returns:
- a list of assignments
-
getNodeMapping
public NodeInformationMapping getNodeMapping()
Returns the node information for all the nodes referenced by this plan.- Returns:
- the node information.
-
getJobMasterResources
public ResourceAllocation getJobMasterResources()
Gets the allocated resources for the job master.- Returns:
- the resources alloted to the job master
-
getPerPartitionResources
public ResourceAllocation getPerPartitionResources()
Gets the allocated allocated resources for each partition.- Returns:
- the resources allotted per partition
-
subPlan
public NodeAllocationPlan subPlan(int maxParallelism)
Returns the effective NodeAllocationPlan, given the specified value of max parallelism.- Parameters:
maxParallelism- the maximum parallelism- Returns:
- the effective NodeAllocationPlan
-
create
public static NodeAllocationPlan create(String jobMasterNodeId, ResourceAllocation masterResources, List<NodeAllocationPlan.AssignmentPlan> assignments, ResourceAllocation partitionResources, NodeInformationMapping nodeMapping)
Creates a new node allocation. For use by the framework; clients should not call this method directly.- Parameters:
jobMasterNodeId- the node id of the job master. may be null in the pseudo-distributed case.assignments- the list of assignments- Returns:
- a new node allocation
-
-