Class NodeAllocationPlan

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. NodeAllocationState represents the current NodeAllocation.
See Also:
  • Method Details

    • 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 by NodeAllocationPlan.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