use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestPlainSaslHelper method testDoAsSetting.
/**
* Test setting {@link HiveConf.ConfVars}} config parameter
* HIVE_SERVER2_ENABLE_DOAS for unsecure mode
*/
public void testDoAsSetting() {
HiveConf hconf = new HiveConf();
hconf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
assertTrue("default value of hive server2 doAs should be true", hconf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS));
CLIService cliService = new CLIService(null);
cliService.init(hconf);
ThriftCLIService tcliService = new ThriftBinaryCLIService(cliService, null);
tcliService.init(hconf);
TProcessorFactory procFactory = PlainSaslHelper.getPlainProcessorFactory(tcliService);
assertEquals("doAs enabled processor for unsecure mode", procFactory.getProcessor(null).getClass(), TSetIpAddressProcessor.class);
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestChainFilter method setup.
@Before
public void setup() {
conf = new HiveConf();
factory = new ChainFilterFactory(factory1, factory2, factory3);
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestCustomQueryFilter method setup.
@Before
public void setup() {
conf = new HiveConf();
conf.set("hive.root.logger", "DEBUG,console");
factory = new CustomQueryFilterFactory();
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestGroupFilter method setup.
@Before
public void setup() {
conf = new HiveConf();
conf.set("hive.root.logger", "DEBUG,console");
factory = new GroupFilterFactory();
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestLdapUtils method testCreateCandidatePrincipalsForUserDn.
@Test
public void testCreateCandidatePrincipalsForUserDn() {
HiveConf conf = new HiveConf();
String userDn = "cn=user1,ou=CORP,dc=mycompany,dc=com";
List<String> expected = Arrays.asList(userDn);
List<String> actual = LdapUtils.createCandidatePrincipals(conf, userDn);
assertEquals(expected, actual);
}
Aggregations