use of org.apache.hive.jdbc.miniHS2.MiniHS2 in project hive by apache.
the class TestHS2AuthzContext method beforeTest.
@BeforeClass
public static void beforeTest() throws Exception {
Class.forName(MiniHS2.getJdbcDriverName());
HiveConf conf = new HiveConf();
conf.setVar(ConfVars.HIVE_AUTHORIZATION_MANAGER, MockedHiveAuthorizerFactory.class.getName());
conf.setVar(ConfVars.HIVE_AUTHENTICATOR_MANAGER, SessionStateUserAuthenticator.class.getName());
conf.setBoolVar(ConfVars.HIVE_AUTHORIZATION_ENABLED, true);
conf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
conf.setBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS, false);
miniHS2 = new MiniHS2(conf);
miniHS2.start(new HashMap<String, String>());
}
use of org.apache.hive.jdbc.miniHS2.MiniHS2 in project hive by apache.
the class TestHS2AuthzSessionContext method beforeTest.
@BeforeClass
public static void beforeTest() throws Exception {
Class.forName(MiniHS2.getJdbcDriverName());
HiveConf conf = new HiveConf();
conf.setVar(ConfVars.HIVE_AUTHORIZATION_MANAGER, MockedHiveAuthorizerFactory.class.getName());
conf.setVar(ConfVars.HIVE_AUTHENTICATOR_MANAGER, SessionStateUserAuthenticator.class.getName());
conf.setBoolVar(ConfVars.HIVE_AUTHORIZATION_ENABLED, true);
conf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
conf.setBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS, false);
miniHS2 = new MiniHS2(conf);
miniHS2.start(new HashMap<String, String>());
}
use of org.apache.hive.jdbc.miniHS2.MiniHS2 in project hive by apache.
the class TestJdbcWithSQLAuthUDFBlacklist method startHS2.
public void startHS2(HiveConf conf) throws Exception {
Class.forName(MiniHS2.getJdbcDriverName());
conf.setVar(ConfVars.HIVE_AUTHORIZATION_MANAGER, SQLStdHiveAuthorizerFactory.class.getName());
conf.setVar(ConfVars.HIVE_AUTHENTICATOR_MANAGER, SessionStateUserAuthenticator.class.getName());
conf.setBoolVar(ConfVars.HIVE_AUTHORIZATION_ENABLED, true);
conf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
conf.setBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS, false);
miniHS2 = new MiniHS2(conf);
miniHS2.start(new HashMap<String, String>());
}
use of org.apache.hive.jdbc.miniHS2.MiniHS2 in project hive by apache.
the class TestJdbcWithSQLAuthorization method beforeTest.
@BeforeClass
public static void beforeTest() throws Exception {
Class.forName(MiniHS2.getJdbcDriverName());
HiveConf conf = new HiveConf();
conf.setVar(ConfVars.HIVE_AUTHORIZATION_MANAGER, SQLStdHiveAuthorizerFactory.class.getName());
conf.setVar(ConfVars.HIVE_AUTHENTICATOR_MANAGER, SessionStateUserAuthenticator.class.getName());
conf.setBoolVar(ConfVars.HIVE_AUTHORIZATION_ENABLED, true);
conf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
conf.setBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS, false);
miniHS2 = new MiniHS2(conf);
miniHS2.start(new HashMap<String, String>());
}
use of org.apache.hive.jdbc.miniHS2.MiniHS2 in project hive by apache.
the class TestJdbcWithMiniLlap method beforeTest.
@BeforeClass
public static void beforeTest() throws Exception {
Class.forName(MiniHS2.getJdbcDriverName());
String confDir = "../../data/conf/llap/";
if (confDir != null && !confDir.isEmpty()) {
HiveConf.setHiveSiteLocation(new URL("file://" + new File(confDir).toURI().getPath() + "/hive-site.xml"));
System.out.println("Setting hive-site: " + HiveConf.getHiveSiteLocation());
}
conf = new HiveConf();
conf.setBoolVar(ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
conf.addResource(new URL("file://" + new File(confDir).toURI().getPath() + "/tez-site.xml"));
miniHS2 = new MiniHS2(conf, MiniClusterType.LLAP);
dataFileDir = conf.get("test.data.files").replace('\\', '/').replace("c:", "");
kvDataFilePath = new Path(dataFileDir, "kv1.txt");
Map<String, String> confOverlay = new HashMap<String, String>();
miniHS2.start(confOverlay);
miniHS2.getDFS().getFileSystem().mkdirs(new Path("/apps_staging_dir/anonymous"));
}
Aggregations