Class NodeAllocationState

  • All Implemented Interfaces:
    Serializable

    public final class NodeAllocationState
    extends Object
    implements Serializable
    Reflects the current state of node allocation, which takes into account failed nodes.
    See Also:
    Serialized Form
    • Method Detail

      • initial

        public static NodeAllocationState initial​(NodeAllocationPlan plan)
        Creates the initial NodeAllocationState based on the plan.
        Parameters:
        plan - the initial allocation plam
        Returns:
        the initial state
      • 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
      • reallocate

        public NodeAllocationState reallocate​(String failedNode)
        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
      • getPerPartitionResources

        public ResourceAllocation getPerPartitionResources()
        Gets the per-partition resource allocation.
        Returns:
        the resources alloted to each partition