java.lang.Object
org.apache.drill.exec.planner.fragment.Wrapper

public class Wrapper extends Object
Wrapper class that allows us to add additional information to each fragment node for planning purposes.
  • Constructor Details

    • Wrapper

      public Wrapper(Fragment node, int majorFragmentId)
  • Method Details

    • getStats

      public Stats getStats()
    • resetAllocation

      public void resetAllocation()
    • getMajorFragmentId

      public int getMajorFragmentId()
    • getWidth

      public int getWidth()
    • setWidth

      public void setWidth(int width)
    • getNode

      public Fragment getNode()
    • getInitialAllocation

      public long getInitialAllocation()
    • getMaxAllocation

      public long getMaxAllocation()
    • addInitialAllocation

      public void addInitialAllocation(long memory)
    • addMaxAllocation

      public void addMaxAllocation(long memory)
    • assignEndpoints

      public void assignEndpoints(List<CoordinationProtos.DrillbitEndpoint> assignedEndpoints) throws PhysicalOperatorSetupException
      Throws:
      PhysicalOperatorSetupException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAssignedEndpoints

      public List<CoordinationProtos.DrillbitEndpoint> getAssignedEndpoints()
    • getAssignedEndpoint

      public CoordinationProtos.DrillbitEndpoint getAssignedEndpoint(int minorFragmentId)
    • addFragmentDependency

      public void addFragmentDependency(Wrapper dependsOn)
      Add a parallelization dependency on given fragment.
      Parameters:
      dependsOn -
    • isEndpointsAssignmentDone

      public boolean isEndpointsAssignmentDone()
      Is the endpoints assignment done for this fragment?
      Returns:
      True if the endpoints assignment done for this fragment. False otherwise.
    • getFragmentDependencies

      public List<Wrapper> getFragmentDependencies()
      Get the list of fragements this particular fragment depends on.
      Returns:
      The list of fragements this particular fragment depends on.
    • computeCpuResources

      public void computeCpuResources()
      Compute the cpu resources required for all the minor fragments of this major fragment. This information is stored per DrillbitEndpoint. It is assumed that this function is called only once.
    • getResourceMap