optimizer
Class Scheduler

java.lang.Object
  extended by optimizer.Scheduler

public class Scheduler
extends java.lang.Object

The class of a scheduler, which takes as input a FelixQuery, and outputs an physical execution plan that is ready to be fed into Executor. The output of a scheduler, i.e., ExecutionPlan, can be regarded as a description of the physical plan, which contains the execution order of different statistical operators.
TODO: + better cycle support for operator graph.

Author:
Ce Zhang

Field Summary
(package private)  FelixQuery fq
          Felix query to be scheduled.
(package private)  parser.CommandOptions options
          Command line options.
(package private)  Felix parentFelix
          Felix object.
 
Constructor Summary
Scheduler(Felix _felix, FelixQuery _fq, parser.CommandOptions _options)
          The constructor.
 
Method Summary
 OperatorBucketGraph dataDecomposition(java.util.HashSet<StatOperator> ops, CostModel cm)
          Partition the data into different parts.
 ExecutionPlan orderOperators(OperatorBucketGraph obg)
          Schedule the order of running the operators.
 java.util.HashSet<StatOperator> ruleDecomposition(CostModel cm)
          Partition the rules into different operators.
 ExecutionPlan schedule()
          The entry of this optimizer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFelix

Felix parentFelix
Felix object.


fq

FelixQuery fq
Felix query to be scheduled.


options

parser.CommandOptions options
Command line options.

Constructor Detail

Scheduler

public Scheduler(Felix _felix,
                 FelixQuery _fq,
                 parser.CommandOptions _options)
The constructor.

Parameters:
_felix -
_fq -
_options -
Method Detail

ruleDecomposition

public java.util.HashSet<StatOperator> ruleDecomposition(CostModel cm)
Partition the rules into different operators.

Parameters:
cm -
Returns:

dataDecomposition

public OperatorBucketGraph dataDecomposition(java.util.HashSet<StatOperator> ops,
                                             CostModel cm)
Partition the data into different parts. This method will partition one operator returned by ruleDecomposition into different ones, with each of them deals with different portions of data. These operators will be put into a ConcurrentOperatorsBucket, which means they can be executed in parallel.

Parameters:
ops -
cm -
Returns:

orderOperators

public ExecutionPlan orderOperators(OperatorBucketGraph obg)
Schedule the order of running the operators.

Parameters:
obg -
Returns:

schedule

public ExecutionPlan schedule()
The entry of this optimizer.

Returns: