【发布时间】:2017-05-03 11:49:48
【问题描述】:
我在 hadoop 2.7.3 中安装了 oozie 4.3.0。 oozie 和 hadoop 服务已启动并正在运行。我尝试执行 oozie 分发附带的示例 map reduce 作业,当我检查作业日志时,它包含这些错误。
2016-12-20 10:46:11,615 INFO ActionStartXCommand:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@:start:] Start action [0000000-161220104605103-oozie-hado-W@:start:] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2016-12-20 10:46:11,615 INFO ActionStartXCommand:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@:start:] [***0000000-161220104605103-oozie-hado-W@:start:***]Action status=DONE
2016-12-20 10:46:11,616 INFO ActionStartXCommand:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@:start:] [***0000000-161220104605103-oozie-hado-W@:start:***]Action updated in DB!
2016-12-20 10:46:11,912 INFO WorkflowNotificationXCommand:520 - SERVER[data01.teg.io] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@:start:] No Notification URL is defined. Therefore nothing to notify for job 0000000-161220104605103-oozie-hado-W@:start:
2016-12-20 10:46:11,921 INFO WorkflowNotificationXCommand:520 - SERVER[data01.teg.io] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000000-161220104605103-oozie-hado-W] ACTION[] No Notification URL is defined.Therefore nothing to notify for job 0000000-161220104605103-oozie-hado-W
2016-12-20 10:46:11,959 INFO ActionStartXCommand:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@mr-node] Start action [0000000-161220104605103-oozie-hado-W@mr-node] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2016-12-20 10:46:12,146 INFO HadoopAccessorService:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@mr-node] Processing configuration file [/srv/oozie-4.3.0/distro/target/oozie-4.3.0-distro/oozie-4.3.0/conf/action-conf/default.xml] for action [default] and hostPort [*]
2016-12-20 10:46:12,148 INFO HadoopAccessorService:520 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@mr-node] Processing configuration file [/srv/oozie-4.3.0/distro/target/oozie-4.3.0-distro/oozie-4.3.0/conf/action-conf/map-reduce.xml] for action [map-reduce] and hostPort [*]
2016-12-20 10:46:13,232 ERROR ActionStartXCommand:517 - SERVER[data01.teg.io] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@mr-node] Error,
java.lang.NoSuchFieldError: HADOOP_CLASSPATH
at org.apache.hadoop.mapreduce.v2.util.MRApps.setClasspath(MRApps.java:248)
at org.apache.hadoop.mapred.YARNRunner.createApplicationSubmissionContext(YARNRunner.java:458)
at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:285)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
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:1698)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:575)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:570)
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:1698)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:570)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:561)
at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:1183)
at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1369)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:234)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:65)
at org.apache.oozie.command.XCommand.call(XCommand.java:287)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:332)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:261)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:179)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
我在 google 中搜索了每个链接,但所提出的解决方法/解决方案都没有奏效。任何人都知道为什么会发生此错误。
我可以毫无问题地运行 map reduce 作业,并且我可以在 shell 提示符下使用“hadoop classpath”命令查看类路径详细信息。
我的 job.properties 文件
nameNode=hdfs://localhost:54310
jobTracker=localhost:8032
queueName=default
examplesRoot=examples
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}apps/map-reduce/workflow.xml
outputDir=map-reduce
并且 workflow.xml 没有变化,只是标准文件随 oozie 分发而来。
oozie-site.xml 配置文件是
<configuration>
<!--
Refer to the oozie-default.xml file for the complete list of
Oozie configuration properties and their default values.
-->
<!-- Proxyuser Configuration -->
<property>
<name>oozie.service.ProxyUserService.proxyuser.hadoop.hosts</name>
<value>*</value>
<description>
List of hosts the '#USER#' user is allowed to perform 'doAs'
operations.
The '#USER#' must be replaced with the username o the user who is
allowed to perform 'doAs' operations.
The value can be the '*' wildcard or a list of hostnames.
For multiple users copy this property and replace the user name
in the property name.
</description>
</property>
<property>
<name>oozie.service.ProxyUserService.proxyuser.hadoop.groups</name>
<value>*</value>
<description>
List of groups the '#USER#' user is allowed to impersonate users
from to perform 'doAs' operations.
The '#USER#' must be replaced with the username o the user who is
allowed to perform 'doAs' operations.
The value can be the '*' wildcard or a list of groups.
For multiple users copy this property and replace the user name
in the property name.
</description>
</property>
<property>
<name>oozie.service.WorkflowAppService.system.libpath</name>
<value>hdfs:///user/hadoop/share/lib/</value>
<description>
System library path to use for workflow applications.
This path is added to workflow application if their job properties sets
the property 'oozie.use.system.libpath' to true.
</description>
</property>
<property>
<name>oozie.action.retry.interval</name>
<value>1</value>
<description>
The interval between retries of an action in case of failure
</description>
</property>
<property>
<name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
<value>*=/srv/hadoop-2.7.3/etc/hadoop</value>
<description>
Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the HOST:PORT of
the Hadoop service (JobTracker, YARN, HDFS). The wildcard '*' configuration is
used when there is no exact match for an authority. The HADOOP_CONF_DIR contains
the relevant Hadoop *-site.xml files. If the path is relative is looked within
the Oozie configuration directory; though the path can be absolute (i.e. to point
to Hadoop client conf/ directories in the local filesystem.
</description>
</property>
</configuration>
以及用来运行的命令
$ bin/oozie job -oozie http://localhost:11000/oozie -config /srv/oozie-4.3.0/distro/target/oozie-4.3.0-distro/oozie-4.3.0/examples/apps/map-reduce/job.properties -run
$ bin/oozie job -oozie http://localhost:11000/oozie -log 0000003-161218192921381-oozie-hado-W
【问题讨论】:
-
@youngHobbit:我无法解读你的反对票,请告诉我你期望的或有助于理解的细节?
-
我没有对你的帖子投反对票。稍后我会看看你的帖子。谢谢。
标签: hadoop mapreduce hadoop-yarn oozie hadoop2