【发布时间】:2017-05-12 13:08:17
【问题描述】:
我正在尝试使用来自另一个 Job 的 java 操作的 Java Client API 提交 Oozie 作业。集群正在使用 Kerberos。
这是我的代码:
// get a OozieClient for local Oozie
String oozieUrl = "http://hadooputl02.northamerica.xyz.net:11000/oozie/";
AuthOozieClient wc = new AuthOozieClient(oozieUrl);
wc.setDebugMode(1);
// create a workflow job configuration and set the workflow application path
Properties conf = wc.createConfiguration();
conf.setProperty(OozieClient.APP_PATH, wfAppPath);
conf.setProperty("jobTracker", "yarnRM");
conf.setProperty("nameNode", "hdfs://ingestiondev");
// submit and start the workflow job
String jobId = wc.run(conf);
System.out.println("Workflow job submitted");
但我收到以下错误:
org.apache.oozie.action.hadoop.JavaMainException: IO_ERROR :
java.io.IOException: Error while connecting Oozie server. No of retries = 1. Exception = Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
...
Caused by: AUTHENTICATION : Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
...
Caused by: org.apache.hadoop.security.authentication.client.AuthenticationException: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
...
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
我相信代码中还需要一些东西才能让节点/用户通过 kerberos 访问 oozie 服务器。
谁能指出在 Kerberized 集群上使用 Oozie Java API 的正确方法?
谢谢!
【问题讨论】:
标签: hadoop kerberos oozie java