gr.uoa.di.madgik.hive.analyzer
Class OperatorAnalyzer

java.lang.Object
  extended by gr.uoa.di.madgik.hive.analyzer.OperatorAnalyzer

public class OperatorAnalyzer
extends Object

Analyze Hive operators in order to create an abstract operator plan

Author:
john.gerbesiotis - DI NKUA

Constructor Summary
OperatorAnalyzer()
           
 
Method Summary
static void analyzeOperator(org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc> op)
          Analyzes the Hive operators plan
static PlanNode concatPlans(PlanNode main, PlanNode exten)
          Merge two plans into one.
static PlanNode getPlan()
          Get the created plan
static PlanNode optimizePlan(PlanNode node)
          Optimize provided plan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorAnalyzer

public OperatorAnalyzer()
Method Detail

analyzeOperator

public static void analyzeOperator(org.apache.hadoop.hive.ql.exec.Operator<? extends org.apache.hadoop.hive.ql.plan.OperatorDesc> op)
                            throws Exception
Analyzes the Hive operators plan

Parameters:
op - Hive plan
Throws:
Exception - if parsing fails

concatPlans

public static PlanNode concatPlans(PlanNode main,
                                   PlanNode exten)
                            throws Exception
Merge two plans into one. main plan should be a typical query while exten query could also be an output query.

Parameters:
main - Main plan to be merged
exten - Extension to main plan
Returns:
Concatenation of the plans
Throws:
Exception - If plans can not be concatenated

optimizePlan

public static PlanNode optimizePlan(PlanNode node)
Optimize provided plan

Parameters:
node - The plan to be optimized
Returns:
The optimization of the plan

getPlan

public static PlanNode getPlan()
Get the created plan

Returns:
the plan that was created


Copyright © 2013. All Rights Reserved.