使用Hortonworks HDP 2.3预览沙箱(oozie:4.2.0.2.3.0.0-2130,spark:1.3和Hadoop:2.7.1.2.3.0.0-2130),我试图使用"yarn-cluster"调用oozie spark动作主 . Oozie Spark Action中提供的示例用于在"local" master上运行spark操作 .
同一页面也建议能够在Yarn上运行,火花装配 jar 应该可用于火花动作 .
我有两个问题
-
我们如何为Spark Action提供火花装配 jar ?我应该在oozie spark动作中使用jar元素吗?
-
我在提交作业时没有明确添加程序集jar时出现以下错误
Using properties file: null
Using properties file: null
Parsed arguments:
master yarn-master
deployMode cluster
executorMemory 512m
executorCores null
totalExecutorCores null
propertiesFile null
extraSparkProperties Map()
driverMemory null
driverCores null
driverExtraClassPath null
driverExtraLibraryPath null
driverExtraJavaOptions null
supervise false
queue null
numExecutors 3
files null
pyFiles null
archives null
mainClass com.foo.bar.spark.examples.WordCountSparkJob
primaryResource hdfs://sandbox.hortonworks.com:8020/apps/foo/sandbox.hortonworks.com/1.201-SNAPSHOT/oozieapp/lib/abc-1.201-SNAPSHOT.jar
name Spark Example
childArgs [inputpath=hdfs://sandbox.hortonworks.com:8020/tmp/bcp_examples/input/]
jars null
verbose true
Default properties from null:
Error: Could not load YARN classes. This copy of Spark may not have been compiled with YARN support.
Run with --help for usage help or --verbose for debug output
Intercepting System.exit(-1)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], exit code [-1]
感谢有关如何解决问题的任何指示 .
2 回答
对于YARN,未针对火花动作在HDP2.3中与Oozie一起分发的默认sharelib .
如果您已通过hortonworks发行版安装了spark,那么您只需使用已安装的版本替换sparkl动作的sharelib内容即可 .
例如 . (作为oozie用户)
此错误是由类
org.apache.spark.deploy.yarn.Client
无法加载引起的 . 它包含在spark-assembly jar中,可以在/usr/hdp/current/spark-client/lib/
中找到 . 将此文件添加到hdfs://hd-host:port/user/oozie/share/lib/spark
后,您必须重新启动oozie才能使其立即生效 .