Member since
11-12-2018
7
Posts
0
Kudos Received
0
Solutions
08-05-2019
12:08 PM
Need to run oozie workflow with spark-action. The spark-action should be running with a different user from the user who has done the kinit while submitting the oozie job. Can able to do this using spark-submit by passing --principal and --keytab options. Tried to pass the same thing on the oozie spark action by adding them in <spark-opts> But it's failing with the following exception Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, Login failure for tempUser1@REALM from keytab /etc/security/keytabs/tempUser1.keytab: javax.security.auth.login.LoginException: Unable to obtain password from user
java.io.IOException: Login failure for tempUser1@REALM from keytab /etc/security/keytabs/tempUser1.keytab: javax.security.auth.login.LoginException: Unable to obtain password from user Here's my workflow: <workflow-app xmlns="uri:oozie:workflow:0.3" name="spark-wf">
<start to="spark-node"/>
<action name="spark-node">
<spark xmlns="uri:oozie:spark-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<master>yarn-cluster</master>
<name>${jobName}</name>
<class>${className}</class>
<jar>${workflowAppUri}/${jarPath}</jar>
<spark-opts>--executor-memory ${executorMemory} --executor-cores ${executorCores} --num-executors ${numExecutors} --driver-java-options ${driverJavaOptions} --principal ${kerbPrincipal} --keytab ${kerbKeytab}</spark-opts>
<arg>${arg1}</arg>
<arg>${arg2}</arg>
</spark>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app> Is there any way that I can execute the oozie spark action on a different user than the user who has done the kinit on the machine?
... View more
Labels:
- Labels:
-
Apache Oozie
06-13-2019
05:44 PM
If we add jars in the lib directory of the application root directory, oozie automatically distributing the jars to it's distributed cache. In my case, I have tried to add the jar which is already in the lib directory. So, I just need to remove the below line from my workflow definition. <spark-opts>--jars ${workflowAppUri}/lib/${dependencyJar}</spark-opts> And also I have tested that if you want to attach the jars that are not available in your lib directory, you can mention like below in your workflow definition. <spark-opts>--jars ${nameNode}/tmp/{someJar}</spark-opts>
... View more
06-12-2019
11:14 AM
Have created a spark action which uses a dependency jar. So I have used below config in workflow.xml to pass the dependency jar <spark-opts>--jars ${workflowAppUri}/lib/${dependencyJar}</spark-opts> But got below error 2019-06-12 07:00:35,140 WARN SparkActionExecutor:523 - SERVER[manager-0] USER[root] GROUP[-] TOKEN[] APP[spark-wf] JOB[0000068-190611183932696-oozie-root-W] ACTION[0000068-190611183932696-oozie-root-W@spark-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, Attempt to add (hdfs://${nameNode}/${workflowAppUri}/lib/${dependencyJar}) multiple times to the distributed cache. Have seen similar issues like duplicate jars between oozie and spark2 sharelib directory. Have tried the solution people are suggesting. But nothing resolves this
... View more
Labels:
- Labels:
-
Apache Oozie
-
Apache Spark