How to exclude a jar from oozie user lib path


How to exclude a jar from oozie user lib path



I have two actions in an oozie job. One spark and one java action.


<workflow-app name="batch-publisher" xmlns="uri:oozie:workflow:0.5">
<start to="spark-a5b5"/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="spark-a5b5">
<spark xmlns="uri:oozie:spark-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>oozie.libpath</name>
<value>${nameNode}/user/hdfs/sps-batch-bi/Jars/</value>
</property>
<property>
<name>oozie.use.system.libpath</name>
<value>true</value>
</property>
</configuration>
<master>yarn</master>
<mode>client</mode>
<name>MySpark2</name>
<class>com.sps.analytics.batch.bi.BatchApp</class>
<jar>${nameNode}/user/hue/oozie/workspaces/hue-oozie-1530039666.55/lib/sps-analytics-batch-bi-assembly-0.1.jar</jar>
<spark-opts>--driver-memory 4G --executor-memory 4G --num-executors 2</spark-opts>
<arg>/user/hdfs/config.yaml</arg>
<arg>/user/hdfs/Detail.xlsx</arg>
<arg>spark</arg>
</spark>
<ok to="java-8283"/>
<error to="Kill"/>
</action>
<action name="java-8283">
<java>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>oozie.launcher.mapreduce.map.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/tableau/lib64/tableausdk/</value>
</property>
<property>
<name>oozie.launcher.mapreduce.user.classpath.first</name>
<value>true</value>
</property>
</configuration>
<main-class>com.sps.analytics.bi.publisher.PublisherApp</main-class>
<arg>sps-data-bi-dev</arg>
<arg>count_logged/20180615</arg>
<arg>count_logged_hyper</arg>
<arg>default</arg>
<arg>default</arg>
<file>/user/sps/bi-publisher/config/application.properties#application.properties</file>
</java>
<ok to="End"/>
<error to="Kill"/>
</action>
<end name="End"/>
</workflow-app>



Both actions have assembly jars and the dependencies in these assembly jars are conflicting in my action. How can I exclude a jar from my workflow action.



When i specify user classpath first it is loading all the jars from both my assembly jars.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift