Search in sources :

Example 6 with LineageInfo

use of org.apache.hadoop.hive.ql.tools.LineageInfo in project hive by apache.

the class TestLineageInfo method testSimpleQuery2.

public void testSimpleQuery2() {
    LineageInfo lep = new LineageInfo();
    try {
        lep.getLineageInfo("FROM (FROM src select src.key, src.value " + "WHERE src.key < 10 UNION ALL FROM src SELECT src.* WHERE src.key > 10 ) unioninput " + "INSERT OVERWRITE DIRECTORY '../../../../build/contrib/hive/ql/test/data/warehouse/union.out' " + "SELECT unioninput.*");
        TreeSet<String> i = new TreeSet<String>();
        TreeSet<String> o = new TreeSet<String>();
        i.add("src");
        checkOutput(lep, i, o);
    } catch (Exception e) {
        e.printStackTrace();
        fail("Failed");
    }
}
Also used : TreeSet(java.util.TreeSet) LineageInfo(org.apache.hadoop.hive.ql.tools.LineageInfo)

Aggregations

LineageInfo (org.apache.hadoop.hive.ql.tools.LineageInfo)6 TreeSet (java.util.TreeSet)5 PrintStream (java.io.PrintStream)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 CliSessionState (org.apache.hadoop.hive.cli.CliSessionState)1 LogInitializationException (org.apache.hadoop.hive.common.LogUtils.LogInitializationException)1 HiveConf (org.apache.hadoop.hive.conf.HiveConf)1 Driver (org.apache.hadoop.hive.ql.Driver)1 QueryInfo (org.apache.hadoop.hive.ql.history.HiveHistory.QueryInfo)1 TaskInfo (org.apache.hadoop.hive.ql.history.HiveHistory.TaskInfo)1