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

The following examples show how to use org.apache.hadoop.hive.cli.CliDriver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HiveExec.java    From streamx with Apache License 2.0 5 votes vote down vote up
/**
 * HiveExec constructor
 * @param config HDFS Connector configuration
 */
public HiveExec(HdfsSinkConnectorConfig config) {
  hiveConf = new HiveConf();
  String hiveConfDir = config.getString(HdfsSinkConnectorConfig.HIVE_CONF_DIR_CONFIG);
  hiveConf.addResource(new Path(hiveConfDir, "hive-site.xml"));
  SessionState.start(new CliSessionState(hiveConf));
  cliDriver = new CliDriver();
}
 
Example #2
Source File: RunHiveTest.java    From incubator-retired-blur with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  CliDriver.main(new String[] { "-f", "./src/test/java/test.hive" });
}