E1:hive跑mr时报错,java.lang.IllegalArgumentException: The value of property yarn.resourcemanager.zk-address must not be null
报错信息如下:
ERROR : FAILED: Hive Internal Error: java.lang.IllegalArgumentException(The value of property yarn.resourcemanager.zk-address must not be null)
java.lang.IllegalArgumentException: The value of property yarn.resourcemanager.zk-address must not be null
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1357)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1338)
at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.initialize(ExecDriver.java:181)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2649)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2335)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2011)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1709)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1703)
at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:224)
at org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:316)
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:1729)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:329)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
INFO : Completed executing command(queryId=root_20221219104550_1dbd0a00-3b2c-4082-bc55-e25d0e80717d); Time taken: 3.172 seconds
INFO : Concurrency mode is disabled, not creating a lock manager
Error: Error while processing statement: FAILED: Hive Internal Error: java.lang.IllegalArgumentException(The value of property yarn.resourcemanager.zk-address must not be null) (state=08S01,code=12)
报错截图如下:
查看Hadoop官方文档
配置了ResourceManager HA, yarn-site中对zk的配置名称需要修改一下:
<!-- 指定 zookeeper 集群的地址 -->
<property>
<!-- <name>yarn.resourcemanager.zk-address</name> -->
<!-- 查看hadoop官网yarn ha文档,配置了yarn ha,zk的配置名称是下面这个 -->
<name>hadoop.zk.address</name>
<value>xxx:2181,xxx:2181,xxx:2181</value>
</property>