我使用的是hive 1.2.0和hadoop 2.6.0。每当我在我的机器上运行配置单元时...选择查询工作正常但在count(*)
的情况下它显示以下错误:
此任务的诊断消息:容器启动失败 container_1434646588807_0001_01_000005: org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException:auxService:mapreduce_shuffle不存在 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 在 org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.instantiateException(SerializedExceptionPBImpl.java:168) 在 org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize(SerializedExceptionPBImpl.java:106) 在 org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl $ Container.launch(ContainerLauncherImpl.java:155) 在 org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl $ EventProcessor.run(ContainerLauncherImpl.java:369) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
失败:执行错误,返回代码2 org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce Jobs推出: Stage-Stage-1:Map:1 Reduce:1 HDFS读取:0 HDFS写入:0 FAIL 总MapReduce CPU使用时间:0毫秒
答案 0 :(得分:19)
请在yarn-site.xml中使用它;当您将框架设置为用作纱线时,它会开始查找这些值。
<configuration>
<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>
</configuration>
答案 1 :(得分:0)
当您将框架设置为用作纱线时,它会开始查找这些值。我在Java Map reduce中面临同样的错误。当我将配置设置如下:
Configuration conf = new Configuration();
conf.set("mapreduce.framework.name", "yarn");
Container launch failed for container_1448364218966_0001_01_000002 : 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:168)
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:744)
我通过设置以下内容解决了这个问题:
<configuration>
<!-- Site specific YARN configuration properties -->
<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>
</configuration>
〜