我正在尝试通过hue web界面运行一些scala jar。 提交作业时,它没有出现以下错误:
java.lang.NoClassDefFoundError: org/apache/spark/deploy/SparkSubmit
和完整的日志:
2017-08-24 08:31:49,438 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@:start:] Start action [0000025-170823093043124-oozie-oozi-W@:start:] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2017-08-24 08:31:49,438 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@:start:] [***0000025-170823093043124-oozie-oozi-W@:start:***]Action status=DONE
2017-08-24 08:31:49,438 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@:start:] [***0000025-170823093043124-oozie-oozi-W@:start:***]Action updated in DB!
2017-08-24 08:31:49,470 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W
2017-08-24 08:31:49,470 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@:start:] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W@:start:
2017-08-24 08:31:49,483 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Start action [0000025-170823093043124-oozie-oozi-W@spark-8ee5] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2017-08-24 08:31:49,516 INFO SparkActionExecutor:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Added into spark action configuration mapred.child.env=SPARK_HOME=.,HDP_VERSION=2.6.3.0-57
2017-08-24 08:31:50,421 INFO SparkActionExecutor:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Trying to get job [job_1503473462790_0052], attempt [1]
2017-08-24 08:31:50,437 INFO SparkActionExecutor:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] checking action, hadoop job ID [job_1503473462790_0052] status [RUNNING]
2017-08-24 08:31:50,439 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] [***0000025-170823093043124-oozie-oozi-W@spark-8ee5***]Action status=RUNNING
2017-08-24 08:31:50,439 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] [***0000025-170823093043124-oozie-oozi-W@spark-8ee5***]Action updated in DB!
2017-08-24 08:31:50,451 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W@spark-8ee5
2017-08-24 08:32:00,098 INFO CallbackServlet:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] callback for action [0000025-170823093043124-oozie-oozi-W@spark-8ee5]
2017-08-24 08:32:00,154 INFO SparkActionExecutor:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Trying to get job [job_1503473462790_0052], attempt [1]
2017-08-24 08:32:00,244 INFO SparkActionExecutor:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] action completed, external ID [job_1503473462790_0052]
2017-08-24 08:32:00,247 WARN SparkActionExecutor:523 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, org/apache/spark/deploy/SparkSubmit
2017-08-24 08:32:00,247 WARN SparkActionExecutor:523 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] Launcher exception: org/apache/spark/deploy/SparkSubmit
java.lang.NoClassDefFoundError: org/apache/spark/deploy/SparkSubmit
at org.apache.oozie.action.hadoop.SparkMain.run(SparkMain.java:222)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:58)
at org.apache.oozie.action.hadoop.SparkMain.main(SparkMain.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:239)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:170)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.deploy.SparkSubmit
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 16 more
2017-08-24 08:32:00,293 INFO ActionEndXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] ERROR is considered as FAILED for SLA
2017-08-24 08:32:00,358 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@Kill] Start action [0000025-170823093043124-oozie-oozi-W@Kill] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2017-08-24 08:32:00,358 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@Kill] [***0000025-170823093043124-oozie-oozi-W@Kill***]Action status=DONE
2017-08-24 08:32:00,358 INFO ActionStartXCommand:520 - SERVER[BigData] USER[energia] GROUP[-] TOKEN[] APP[kafka-scala] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@Kill] [***0000025-170823093043124-oozie-oozi-W@Kill***]Action updated in DB!
2017-08-24 08:32:00,435 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@Kill] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W@Kill
2017-08-24 08:32:00,435 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W
2017-08-24 08:32:00,435 INFO WorkflowNotificationXCommand:520 - SERVER[BigData] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000025-170823093043124-oozie-oozi-W] ACTION[0000025-170823093043124-oozie-oozi-W@spark-8ee5] No Notification URL is defined. Therefore nothing to notify for job 0000025-170823093043124-oozie-oozi-W@spark-8ee5
请帮忙吗?
答案 0 :(得分:1)
这可能是一个快速的解决方案。 在您的色调工作流窗口中,单击右上角的文件图标转到工作区文件夹。创建一个' lib'那里的文件夹,如果还没有。
转到本地系统中的SPARK_HOME文件夹(/usr/hdp/2.5../spark/lib)并检查那里的所有可用罐子。将这些jar上传到工作区中的lib文件夹。 如果您想要运行pyspark作业,请在' python'中上传罐子。火花之家的文件夹。
重新运行工作流程。
P.S:我想这些罐子可以添加到oozie共享库的sharelib文件夹中并更新oozie库。 (在线检查命令)。这可能会解决将这些jar添加到每个工作流文件夹的问题。