use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestLdapUtils method testCreateCandidatePrincipalsForUserWithDomain.
@Test
public void testCreateCandidatePrincipalsForUserWithDomain() {
HiveConf conf = new HiveConf();
String userWithDomain = "user1@mycompany.com";
List<String> expected = Arrays.asList(userWithDomain);
List<String> actual = LdapUtils.createCandidatePrincipals(conf, userWithDomain);
assertEquals(expected, actual);
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class TestLdapUtils method testCreateCandidatePrincipals.
@Test
public void testCreateCandidatePrincipals() {
HiveConf conf = new HiveConf();
conf.setVar(HiveConf.ConfVars.HIVE_SERVER2_PLAIN_LDAP_BASEDN, "dc=mycompany,dc=com");
conf.setVar(HiveConf.ConfVars.HIVE_SERVER2_PLAIN_LDAP_USERDNPATTERN, "cn=%s,ou=CORP1,dc=mycompany,dc=com:cn=%s,ou=CORP2,dc=mycompany,dc=com");
List<String> expected = Arrays.asList("cn=user1,ou=CORP1,dc=mycompany,dc=com", "cn=user1,ou=CORP2,dc=mycompany,dc=com");
List<String> actual = LdapUtils.createCandidatePrincipals(conf, "user1");
Collections.sort(expected);
Collections.sort(actual);
assertEquals(expected, actual);
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class BeeLineOpts method getShowHeader.
public boolean getShowHeader() {
if (beeLine.isBeeLine()) {
return showHeader;
} else {
boolean header;
HiveConf conf = beeLine.getCommands().getHiveConf(true);
header = HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_CLI_PRINT_HEADER);
return header;
}
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class BeeLine method getPromptForCli.
String getPromptForCli() {
String prompt;
// read prompt configuration and substitute variables.
HiveConf conf = getCommands().getHiveConf(true);
prompt = conf.getVar(HiveConf.ConfVars.CLIPROMPT);
prompt = getCommands().substituteVariables(conf, prompt);
return prompt + getFormattedDb() + "> ";
}
use of org.apache.hadoop.hive.conf.HiveConf in project hive by apache.
the class StreamingTestUtils method newHiveConf.
public HiveConf newHiveConf(String metaStoreUri) {
HiveConf conf = new HiveConf(this.getClass());
conf.set("fs.raw.impl", RawFileSystem.class.getName());
if (metaStoreUri != null) {
conf.setVar(HiveConf.ConfVars.METASTOREURIS, metaStoreUri);
}
conf.setBoolVar(HiveConf.ConfVars.METASTORE_EXECUTE_SET_UGI, true);
conf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, true);
return conf;
}
Aggregations