2017-02-06 4 views
2

spark-submitをシェルラッパーから実行しようとしています。ジョブはコマンドラインから正常に実行されますが、oozieを介してスケジューリングすると失敗しました。ここoozie spark-submitによるシェルアクション

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> 
関連する問題