0
Ich versuche, Kerberos zu imitieren, um eine Verbindung zu Bienenstock, aber es gss init Ausnahme gibt.Kerberos Identitätswechsel für Hive (Beeline)
UserGroupInformation ugi = kinit.generateKerberosTicket(configResources, keytab, principal);
serGroupInformation ugiProxy = UserGroupInformation.createProxyUser("shashi", ugi.getCurrentUser());
ugiProxy.doAs(new PrivilegedExceptionAction<Void>(){
@Override
public Void run() throws Exception {
Connection con = DriverManager.getConnection("jdbc:hive2://quickstart.cloudera:10000/default;principal=hive/[email protected]", "shashi", "");
Statement stmt = con.createStatement();
String sql = "show databases ";
ResultSet res = stmt.executeQuery(sql);
if (res.next()) {
System.out.println("DB names ---- >" +res.getString(1));
}
makeHiveJdbcConnection();
return null;
}
aber folgende Ausnahme zu bekommen.
java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://quickstart.cloudera:10000/default;principal=hive/[email protected]: GSS initiate failed
Irgendwelche Anhaltspunkte für dieses Problem?