2017-02-06 129 views
2

我想從殼包裝運行火花提交。而作業從命令行運行良好,但通過oozie進行調度時失敗。oozie shell的動作與火花提交

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream 
at org.apache.spark.deploy.SparkSubmitArguments.handle(SparkSubmitArguments.scala:394) 
at org.apache.spark.launcher.SparkSubmitOptionParser.parse(SparkSubmitOptionParser.java:163) 
at org.apache.spark.deploy.SparkSubmitArguments.(SparkSubmitArguments.scala:97) 
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:114) 
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) 

這是我的工作流程:

<workflow-app name="OozieTest1" xmlns="uri:oozie:workflow:0.5"> 
    <start to="CopyTest"/> 
    <kill name="Kill"> 
     <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> 
    </kill> 
<action name="CopyTest"> 
     <shell xmlns="uri:oozie:shell-action:0.1"> 
      <job-tracker>${jobTracker}</job-tracker> 
      <name-node>${nameNode}</name-node> 
      <exec>lib/copy.sh</exec> 
       <argument>hdfs://xxxxxx/user/xxxxxx/oozie-test/file-list/xxx_xxx_201610.lst</argument> 
       <argument>hdfs://xxxxxx/user/xxxxxx/oozie-test/sample</argument> 
       <argument>hdfs://xxxxxx/user/xxxxxx/oozie-test/output</argument> 
       <argument>IMMUN</argument> 
       <argument>N</argument> 
       <argument>hdfs://xxxxxx/user/xxxxxx/oozie-test/resources/script-constants.properties</argument> 
      <file>hdfs://xxxxxx/user/xxxxxx/oozie-test/lib/copy.sh#copy.sh</file> 
      <file>hdfs://xxxxxx/user/xxxxxx/oozie-test/lib/xxxx_Integration.jar#xxxx_Integration.jar</file> 
     <capture-output/> 
     </shell> 
     <ok to="End"/> 
     <error to="Kill"/> 
    </action> 
    <end name="End"/> 
</workflow-app> 

回答

0

這取決於火花,Hadoop和您使用Oozie的是什麼版本。但很可能你有一些依賴性問題。 (jar丟失)我真的會推薦檢查你的依賴關係。在這裏你可以找到完整的工作示例here

在這個例子中,Hadoop和火花版本如下:

<hadoop.version>2.6.0-cdh5.4.7</hadoop.version> 
<spark.version>1.3.0-cdh5.4.7</spark.version>