【问题标题】:oozie shell action with spark-submitoozie shell 动作与 spark-submit
【发布时间】:2017-02-06 10:28:09
【问题描述】:

我正在尝试从 shell 包装器运行 spark-submit。虽然作业从命令行运行良好,但在通过 oozie 调度时失败。

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>

【问题讨论】:

    标签: shell apache-spark oozie


    【解决方案1】:

    这取决于你使用什么版本的 spark、hadoop 和 oozie。但很可能你有一些依赖问题。 (jar 丢失)我真的建议检查您的依赖项。在这里你可以找到完整的工作示例here

    在本例中,hadoop 和 spark 版本如下:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-05
      • 1970-01-01
      • 1970-01-01
      • 2016-06-30
      • 1970-01-01
      • 2017-12-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多