hive 安装启动时常见问题

1.1. 常见问题

 

现象:hive中的mr只能执行一次,如果执行第二次就会报这个错误;

 

 

 

l 解决方案

n Yarn-site.xml;不要配置ha(高可用)

<?xml version="1.0"?>

<configuration>

<!-- 配置yarn -->

<property>

        <name>yarn.nodemanager.aux-services</name>

        <value>mapreduce_shuffle</value>

    </property>

    <property>

        <name>yarn.nodemanager.env-whitelist</name>

        <value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value>

    </property>

 

    <!-- resourcemanager的地址 -->

    <property>

        <name>yarn.resourcemanager.hostname</name>

        <value>node-1</value>

    </property>

</configuration>

高可用需要修改;(要怨官方文档);

http://hadoop.apache.org/docs/r3.1.1/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.htm

 

 

 

<?xml version="1.0"?>

<configuration>

<!-- 配置yarn -->

<property>

        <name>yarn.nodemanager.aux-services</name>

        <value>mapreduce_shuffle</value>

    </property>

    <property>

        <name>yarn.nodemanager.env-whitelist</name>

        <value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value>

    </property>

 

    <!-- yarn开启ha -->

    <property>

        <name>yarn.resourcemanager.ha.enabled</name>

        <value>true</value>

    </property>

    <!-- yarn董事会的名字 -->

    <property>

        <name>yarn.resourcemanager.cluster-id</name>

        <value>jh-yarn</value>

    </property>

    <!-- 董事会列表 -->

    <property>

        <name>yarn.resourcemanager.ha.rm-ids</name>

        <value>rm1,rm2</value>

    </property>

    <!-- hostname,webapp-->

    <property>

        <name>yarn.resourcemanager.hostname.rm1</name>

        <value>node-1</value>

    </property>

     <property>

        <name>yarn.resourcemanager.webapp.address.rm1</name>

        <value>node-1:8088</value>

    </property>

    <!-- 第二台 -->

    <property>

        <name>yarn.resourcemanager.hostname.rm2</name>

        <value>node-2</value>

    </property>

    <property>

        <name>yarn.resourcemanager.webapp.address.rm2</name>

        <value>node-2:8088</value>

    </property>

    <!-- zookeeper -->

    <property>

        <name>hadoop.zk.address</name>

        <value>node-1:2181,node-2:2181,node-3:2181</value>

    </property>

</configuration>

一定要保证四台机器的配置是一样的
重启高用用(hadoop)

 

1.1.1. Jar包冲突(guava)

 

 

 

hadoop下面的guava-27.0-jre.jar(%hadoop_home%\share\hadoop\common\lib)复制到hivelib下面(删除老的,留下新的)(%hive_home%/lib)

posted @ 2020-11-27 10:47  shan_zhayidian  阅读(129)  评论(0编辑  收藏  举报