use of org.apache.hadoop.hive.cli.CliSessionState in project hive by apache.
the class TestSemanticAnalysis method setUpHCatDriver.
@Before
public void setUpHCatDriver() throws IOException {
if (hcatDriver == null) {
HiveConf hcatConf = new HiveConf(hiveConf);
hcatConf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
hcatConf.set(HiveConf.ConfVars.HIVEDEFAULTRCFILESERDE.varname, "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe");
hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName());
hcatConf.setBoolVar(HiveConf.ConfVars.METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES, false);
hcatDriver = DriverFactory.newDriver(hcatConf);
SessionState.start(new CliSessionState(hcatConf));
}
}
use of org.apache.hadoop.hive.cli.CliSessionState in project hive by apache.
the class TestUseDatabase method setUp.
@Override
protected void setUp() throws Exception {
HiveConf hcatConf = new HiveConf(this.getClass());
hcatConf.set(ConfVars.PREEXECHOOKS.varname, "");
hcatConf.set(ConfVars.POSTEXECHOOKS.varname, "");
hcatConf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName());
hcatDriver = DriverFactory.newDriver(hcatConf);
SessionState.start(new CliSessionState(hcatConf));
}
use of org.apache.hadoop.hive.cli.CliSessionState in project hive by apache.
the class HCatBaseTest method setUp.
@Before
public void setUp() throws Exception {
if (driver == null) {
setUpHiveConf();
driver = DriverFactory.newDriver(hiveConf);
client = new HiveMetaStoreClient(hiveConf);
SessionState.start(new CliSessionState(hiveConf));
}
}
use of org.apache.hadoop.hive.cli.CliSessionState in project hive by apache.
the class TestPassProperties method Initialize.
public void Initialize() throws Exception {
hiveConf = new HiveConf(this.getClass());
hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR);
hiveConf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
driver = DriverFactory.newDriver(hiveConf);
SessionState.start(new CliSessionState(hiveConf));
new File(TEST_WAREHOUSE_DIR).mkdirs();
int numRows = 3;
input = new String[numRows];
for (int i = 0; i < numRows; i++) {
String col1 = "a" + i;
String col2 = "b" + i;
input[i] = i + "," + col1 + "," + col2;
}
HcatTestUtils.createTestDataFile(INPUT_FILE_NAME, input);
server = new PigServer(ExecType.LOCAL);
}
use of org.apache.hadoop.hive.cli.CliSessionState in project hive by apache.
the class TestHCatLoaderComplexSchema method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws Exception {
HiveConf hiveConf = new HiveConf(TestHCatLoaderComplexSchema.class);
hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
hiveConf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
driver = DriverFactory.newDriver(hiveConf);
SessionState.start(new CliSessionState(hiveConf));
// props = new Properties();
// props.setProperty("fs.default.name", cluster.getProperties().getProperty("fs.default.name"));
}
Aggregations