org.apache.hadoop.hive.ql.tools
Class LineageInfo
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LineageInfo
public LineageInfo()
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 processprocCtx
- operator processor contextnodeOutputs
- 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 © 2013 The Apache Software Foundation