which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/jdk1.8.0_112/bin:/usr/local/hadoop-3.3.6/bin:/usr/local/hadoop-3.3.6/sbin:/root/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/apache-hive-3.1.3-bin/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-3.3.6/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Hive Session ID = 4fc56454-1c46-4f18-9af3-cde0d53fecf2
Logging initialized using configuration in jar:file:/opt/apache-hive-3.1.3-bin/lib/hive-common-3.1.3.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Hive Session ID = 26336a34-9d27-4fbb-9314-c6137c9e7d03
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/jdk1.8.0_112/bin:/usr/local/hadoop-3.3.6/bin:/usr/local/hadoop-3.3.6/sbin:/opt/hive/bin:/root/bin)
Hive Session ID = d4f5afa7-fc5d-4985-9889-a2aa8842d1ae
Logging initialized using configuration in jar:file:/opt/hive/lib/hive-common-3.1.3.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Hive Session ID = 440763e5-41d1-4d8e-8c70-aa007f51c429
2024-10-28 21:10:55: Starting Hive Metastore Server
##如果想后台运行可以写成如下命令
hive --service metastore &
复制代码
3.2、131上必要配置
1. 上传hive安装包、解压到指定位置
[root@master ~]# tar xf apache-hive-3.1.3-bin.tar.gz -C /opt/apps
[root@master ~]# cd /opt/apache-hive-3.1.3-bin
[root@master ~]# mv apache-hive-3.1.3-bin hive
复制代码
2. 配置情况变量
vi /etc/profile
export HIVE_HOME=/opt/hive
export PATH=$PATH:$HIVE_HOME/bin
复制代码
source /etc/profile
3. 修改hive配置
vi /opt/hive/conf/hive-site.xml
<configuration>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://192.168.128.130:9083</value>
</property>
</configuration>
复制代码
4. 毗连hive
[root@zhangsan opt]# hive
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/jdk1.8.0_112/bin:/usr/local/hadoop-3.3.6/bin:/usr/local/hadoop-3.3.6/sbin:/opt/hive/bin:/root/bin)
Hive Session ID = 636bdaf9-c925-4a7f-9c4c-87e298982598
Logging initialized using configuration in jar:file:/opt/hive/lib/hive-common-3.1.3.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Hive Session ID = f52e0b08-66cb-4026-b07e-4bf016129df3