mapreduce.job运行报错

来源:互联网 发布:网络黑白pdf 编辑:程序博客网 时间:2024/06/05 05:25

最近学习hadoop,经典案例wordcount运行报错。异常如下:
org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist

17/08/23 00:14:33 INFO input.FileInputFormat: Total input paths to process : 117/08/23 00:14:33 INFO mapreduce.JobSubmitter: number of splits:117/08/23 00:14:33 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1503472337233_000117/08/23 00:14:34 INFO impl.YarnClientImpl: Submitted application application_1503472337233_000117/08/23 00:14:34 INFO mapreduce.Job: The url to track the job: http://hadoop-server-152:8088/proxy/application_1503472337233_0001/17/08/23 00:14:34 INFO mapreduce.Job: Running job: job_1503472337233_000117/08/23 00:14:42 INFO mapreduce.Job: Job job_1503472337233_0001 running in uber mode : false17/08/23 00:14:42 INFO mapreduce.Job:  map 0% reduce 0%17/08/23 00:14:48 INFO mapreduce.Job:  map 100% reduce 0%17/08/23 00:14:50 INFO mapreduce.Job: Task Id : attempt_1503472337233_0001_r_000000_0, Status : FAILEDContainer launch failed for container_1503472337233_0001_01_000003 : org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)        at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.instantiateException(SerializedExceptionPBImpl.java:152)        at org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize(SerializedExceptionPBImpl.java:106)        at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$Container.launch(ContainerLauncherImpl.java:155)        at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$EventProcessor.run(ContainerLauncherImpl.java:369)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)        at java.lang.Thread.run(Thread.java:745)

网上查询说的是yarn-site.xml需要添加配置

<property>       <name>yarn.nodemanager.aux-services</name>      <value>mapreduce_shuffle</value> </property>

但是我确定,我之前配置的就有这个。后来发现这个配置项

<property><name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name><value>org.apache.hadoop.mapred.ShuffleHandler</value></property>

看了下好像是指定mapreduce中shuffle的类,添加该配置后,启动成功。
另外:目前我发现jar包里Job发布类如果有错误,也会报这个错。

job.setOutputValueClass(Text.class);

假如我的outputValueClass设置的Text.class,但是reduce类里面是别的类型,就报了这个错误。

原创粉丝点击