public final class LogicalPlanBuilder
extends java.lang.Object
LogicalPlan
 LogicalPlanBuilder can distribute the tasks in 3 modes.
 LogicalPlanBuilder.Distribution logic to
   distribute the tasks among the workers| Modifier and Type | Class and Description | 
|---|---|
| static interface  | LogicalPlanBuilder.Distribution | 
| Modifier and Type | Method and Description | 
|---|---|
| LogicalPlan | build()Builds the  LogicalPlan | 
| java.util.Set<java.lang.Integer> | getSources()Get the source ids from this logical plan builder | 
| java.util.Set<java.lang.Integer> | getSourcesOnThisWorker()Returns the set of sources scheduled on this worker. | 
| java.util.Set<java.lang.Integer> | getSourcesOnWorker(int workerId)Returns the set of sources scheduled on specified worker. | 
| java.util.Set<java.lang.Integer> | getTargets()Return the targets of this logical plan builder | 
| java.util.Set<java.lang.Integer> | getTargetsOnThisWorker()Returns the set of targets scheduled on this worker. | 
| java.util.Set<java.lang.Integer> | getTargetsOnWorker(int workerId)Returns the set of targets scheduled on specified worker. | 
| static LogicalPlanBuilder | plan(int sources,
    int targets,
    WorkerEnvironment workerEnvironment)Create the plan according the the configurations | 
| LogicalPlanBuilder | withCustomSourceDistribution(LogicalPlanBuilder.Distribution distribution)Create plan with custom distribution | 
| LogicalPlanBuilder | withCustomTargetDistribution(LogicalPlanBuilder.Distribution distribution)Create plan with custom distribution | 
| LogicalPlanBuilder | withFairDistribution()This method will fairly distribute all sources and targets among the available workers | 
| LogicalPlanBuilder | withFairDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)This method will fairly distribute all sources and targets among the specified set of workers | 
| LogicalPlanBuilder | withFairSourceDistribution()This method will distribute sources fairly among the available set of workers | 
| LogicalPlanBuilder | withFairSourceDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)This method will distribute targets fairly among the specified group of workers | 
| LogicalPlanBuilder | withFairTargetDistribution()This method will distribute targets fairly among the available set of workers | 
| LogicalPlanBuilder | withFairTargetDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)This method will distribute sources fairly among the specified group of workers | 
public static LogicalPlanBuilder plan(int sources, int targets, WorkerEnvironment workerEnvironment)
sources - number of sourcestargets - number of targetsworkerEnvironment - the environmentLogicalPlanBuilderpublic java.util.Set<java.lang.Integer> getSources()
public java.util.Set<java.lang.Integer> getTargets()
public java.util.Set<java.lang.Integer> getSourcesOnThisWorker()
public java.util.Set<java.lang.Integer> getTargetsOnThisWorker()
public java.util.Set<java.lang.Integer> getSourcesOnWorker(int workerId)
public java.util.Set<java.lang.Integer> getTargetsOnWorker(int workerId)
public LogicalPlan build()
LogicalPlanpublic LogicalPlanBuilder withCustomSourceDistribution(LogicalPlanBuilder.Distribution distribution)
distribution - the distributionLogicalPlanBuilderpublic LogicalPlanBuilder withCustomTargetDistribution(LogicalPlanBuilder.Distribution distribution)
distribution - the distributionLogicalPlanBuilderpublic LogicalPlanBuilder withFairDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)
LogicalPlanBuilderpublic LogicalPlanBuilder withFairDistribution()
LogicalPlanBuilderpublic LogicalPlanBuilder withFairSourceDistribution()
LogicalPlanBuilderpublic LogicalPlanBuilder withFairTargetDistribution()
LogicalPlanBuilderpublic LogicalPlanBuilder withFairSourceDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)
LogicalPlanBuilderpublic LogicalPlanBuilder withFairTargetDistribution(java.util.Set<java.lang.Integer> groupOfWorkers)
LogicalPlanBuilder