Search in sources :

Example 6 with TaskGraphWalker

use of org.apache.hadoop.hive.ql.lib.TaskGraphWalker in project hive by apache.

the class MemoryDecider method resolve.

@Override
public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {
    pctx.getConf();
    // create dispatcher and graph walker
    Dispatcher disp = new MemoryCalculator(pctx);
    TaskGraphWalker ogw = new TaskGraphWalker(disp);
    // get all the tasks nodes from root task
    ArrayList<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.getRootTasks());
    // begin to walk through the task tree.
    ogw.startWalking(topNodes, null);
    return pctx;
}
Also used : TaskGraphWalker(org.apache.hadoop.hive.ql.lib.TaskGraphWalker) Node(org.apache.hadoop.hive.ql.lib.Node) ArrayList(java.util.ArrayList) Dispatcher(org.apache.hadoop.hive.ql.lib.Dispatcher) DefaultRuleDispatcher(org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher)

Example 7 with TaskGraphWalker

use of org.apache.hadoop.hive.ql.lib.TaskGraphWalker in project hive by apache.

the class SparkCrossProductCheck method resolve.

@Override
public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {
    TaskGraphWalker ogw = new TaskGraphWalker(this);
    ArrayList<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.getRootTasks());
    ogw.startWalking(topNodes, null);
    return pctx;
}
Also used : TaskGraphWalker(org.apache.hadoop.hive.ql.lib.TaskGraphWalker) Node(org.apache.hadoop.hive.ql.lib.Node) ArrayList(java.util.ArrayList)

Example 8 with TaskGraphWalker

use of org.apache.hadoop.hive.ql.lib.TaskGraphWalker in project hive by apache.

the class SparkMapJoinResolver method resolve.

@Override
public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {
    Dispatcher dispatcher = new SparkMapJoinTaskDispatcher(pctx);
    TaskGraphWalker graphWalker = new TaskGraphWalker(dispatcher);
    ArrayList<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.getRootTasks());
    graphWalker.startWalking(topNodes, null);
    return pctx;
}
Also used : TaskGraphWalker(org.apache.hadoop.hive.ql.lib.TaskGraphWalker) Node(org.apache.hadoop.hive.ql.lib.Node) ArrayList(java.util.ArrayList) Dispatcher(org.apache.hadoop.hive.ql.lib.Dispatcher)

Example 9 with TaskGraphWalker

use of org.apache.hadoop.hive.ql.lib.TaskGraphWalker in project hive by apache.

the class CommonJoinResolver method resolve.

@Override
public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {
    // create dispatcher and graph walker
    Dispatcher disp = new CommonJoinTaskDispatcher(pctx);
    TaskGraphWalker ogw = new TaskGraphWalker(disp);
    // get all the tasks nodes from root task
    List<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.rootTasks);
    // begin to walk through the task tree.
    ogw.startWalking(topNodes, null);
    return pctx;
}
Also used : TaskGraphWalker(org.apache.hadoop.hive.ql.lib.TaskGraphWalker) Node(org.apache.hadoop.hive.ql.lib.Node) ArrayList(java.util.ArrayList) Dispatcher(org.apache.hadoop.hive.ql.lib.Dispatcher)

Example 10 with TaskGraphWalker

use of org.apache.hadoop.hive.ql.lib.TaskGraphWalker in project hive by apache.

the class SerializeFilter method resolve.

@Override
public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {
    pctx.getConf();
    // create dispatcher and graph walker
    Dispatcher disp = new Serializer(pctx);
    TaskGraphWalker ogw = new TaskGraphWalker(disp);
    // get all the tasks nodes from root task
    ArrayList<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.getRootTasks());
    // begin to walk through the task tree.
    ogw.startWalking(topNodes, null);
    return pctx;
}
Also used : TaskGraphWalker(org.apache.hadoop.hive.ql.lib.TaskGraphWalker) Node(org.apache.hadoop.hive.ql.lib.Node) ArrayList(java.util.ArrayList) Dispatcher(org.apache.hadoop.hive.ql.lib.Dispatcher) DefaultRuleDispatcher(org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher)

Aggregations

ArrayList (java.util.ArrayList)11 Node (org.apache.hadoop.hive.ql.lib.Node)11 TaskGraphWalker (org.apache.hadoop.hive.ql.lib.TaskGraphWalker)11 Dispatcher (org.apache.hadoop.hive.ql.lib.Dispatcher)8 DefaultRuleDispatcher (org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher)5