org.apache.hadoop.hive.ql.tools
Class LineageInfo

java.lang.Object
  extended by org.apache.hadoop.hive.ql.tools.LineageInfo
All Implemented Interfaces:
NodeProcessor

public class LineageInfo
extends Object
implements NodeProcessor

This class prints out the lineage info. It takes sql as input and prints lineage info. Currently this prints only input and output tables for a given sql. Later we can expand to add join tables etc.


Constructor Summary
LineageInfo()
           
 
Method Summary
 TreeSet<String> getInputTableList()
           
 void getLineageInfo(String query)
          parses given query and gets the lineage info.
 TreeSet<String> getOutputTableList()
           
static void main(String[] args)
           
 Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
          Implements the process method for the NodeProcessor interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineageInfo

public LineageInfo()
Method Detail

getInputTableList

public TreeSet<String> getInputTableList()
Returns:
java.util.TreeSet

getOutputTableList

public TreeSet<String> getOutputTableList()
Returns:
java.util.TreeSet

process

public Object process(Node nd,
                      Stack<Node> stack,
                      NodeProcessorCtx procCtx,
                      Object... nodeOutputs)
               throws SemanticException
Implements the process method for the NodeProcessor interface.

Specified by:
process in interface NodeProcessor
Parameters:
nd - operator to process
procCtx - operator processor context
nodeOutputs - A variable argument list of outputs from other nodes in the walk
Returns:
Object to be returned by the process call
Throws:
SemanticException

getLineageInfo

public void getLineageInfo(String query)
                    throws ParseException,
                           SemanticException
parses given query and gets the lineage info.

Parameters:
query -
Throws:
ParseException
SemanticException

main

public static void main(String[] args)
                 throws IOException,
                        ParseException,
                        SemanticException
Throws:
IOException
ParseException
SemanticException


Copyright © 2014 The Apache Software Foundation. All rights reserved.