Package org.apache.hadoop.hive.cli

Examples of org.apache.hadoop.hive.cli.CliDriver


    outf = new File(outf, qf.getName().concat(".out"));
    FileOutputStream fo = new FileOutputStream(outf);
    ss.out = new PrintStream(fo, true, "UTF-8");
    ss.err = ss.out;
    ss.setIsSilent(true);
    cliDriver = new CliDriver(ss);
    SessionState.start(ss);
  }
View Full Code Here


    if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
      oldSs.out.close();
    }
    SessionState.start(ss);

    cliDriver = new CliDriver();
    if (tname.equals("init_file.q")) {
      ss.initFiles.add("../data/scripts/test_init_file.sql");
    }
    cliDriver.processInitFiles(ss);
  }
View Full Code Here

    if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
      oldSs.out.close();
    }
    SessionState.start(ss);

    cliDriver = new CliDriver();
    if (tname.equals("init_file.q")) {
      ss.initFiles.add("../data/scripts/test_init_file.sql");
    }
    cliDriver.processInitFiles(ss);
  }
View Full Code Here

    HiveConf conf = new HiveConf();
    conf.addResource(new Path("file:///", System.getProperty("oozie.action.conf.xml")));
    conf.setVar(ConfVars.SEMANTIC_ANALYZER_HOOK, HCatSemanticAnalyzer.class.getName());
    conf.setBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL, true);
    SessionState.start(new CliSessionState(conf));
    new CliDriver().processLine(args[0]);
  }
View Full Code Here

    HiveConf conf = new HiveConf();
    conf.addResource(new Path("file:///", System.getProperty("oozie.action.conf.xml")));
    conf.setVar(ConfVars.SEMANTIC_ANALYZER_HOOK, HCatSemanticAnalyzer.class.getName());
    conf.setBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL, true);
    SessionState.start(new CliSessionState(conf));
    new CliDriver().processLine(args[0]);
  }
View Full Code Here

    if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
      oldSs.out.close();
    }
    SessionState.start(ss);

    cliDriver = new CliDriver();
    if (tname.equals("init_file.q")) {
      ss.initFiles.add("../../data/scripts/test_init_file.sql");
    }
    cliDriver.processInitFiles(ss);
    return outf.getAbsolutePath();
View Full Code Here

    SessionState.get().getConf().setBoolean("hive.test.shutdown.phase", true);

    String cleanupCommands = readEntireFileIntoString(new File(cleanupScript));
    LOG.info("Cleanup (" + cleanupScript + "):\n" + cleanupCommands);
    if(cliDriver == null) {
      cliDriver = new CliDriver();
    }
    cliDriver.processLine(cleanupCommands);

    SessionState.get().getConf().setBoolean("hive.test.shutdown.phase", false);
View Full Code Here

    conf.setBoolean("hive.test.init.phase", true);

    String initCommands = readEntireFileIntoString(new File(this.initScript));
    LOG.info("Initial setup (" + initScript + "):\n" + initCommands);
    if(cliDriver == null) {
      cliDriver = new CliDriver();
    }
    cliDriver.processLine("set test.data.dir=" + testFiles + ";");
    cliDriver.processLine(initCommands);

    conf.setBoolean("hive.test.init.phase", false);
View Full Code Here

    if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
      oldSs.out.close();
    }
    SessionState.start(ss);

    cliDriver = new CliDriver();

    if (tname.equals("init_file.q")) {
      ss.initFiles.add("../../data/scripts/test_init_file.sql");
    }
    cliDriver.processInitFiles(ss);
View Full Code Here

    // once SessionState for thread is set, CliDriver picks conf from it
    CliSessionState ss = new CliSessionState(conf);
    ss.err = System.err;
    ss.out = System.out;
    SessionState.start(ss);
    TestCLIAuthzSessionContext.driver = new CliDriver();
}
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.cli.CliDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.