进入到hive的lib目录:cd /hive-3.1.2/lib
删除guava: rm -rf guava-19.0.jar
复制:cp /hadoop-3.3.1/share/hadoop/common/lib/[root@hadoop1 lib]# ls | grep guava guava-27.0-jre.jar /hive-3.1.2/lib
hive-env.sh 配置文件
进入hive的配置文件目录:cd /hive-3.1.2/conf
修改hive-env.sh.template模板配置文件的名字为hive-env.sh:
mv hive-env.sh.template hive-env.sh
将下面内容复制进去:
dadoop的安装目录:export HADOOP_HOME=/home/bisuser/hadoop/hadoop-3.3.1
hive的配置文件目录:export HIVE_CONF_DIR=/home/bisuser/hive/hive-3.1.2/conf
hive的jar包的目录:export HIVE_AUX_JARS_PATH=/home/bisuser/hive/hive-3.1.2/lib
hive-site.xml 配置文件(新的配置文件)
4.上传mysql的驱动jar包到/hive/hive-3.1.2/lib下 5.初始化元数据在hive的根目录下:bin/schematool -initSchema -dbType mysql -verbos 6. 启动metastore服务javax.jdo.option.ConnectionURL jdbc:mysql://mysql1:3306/hive?createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 javax.jdo.option.connectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword 123456 hive.server2.thrift.bind.host hadoop1 hive.metastore.uris thrift://hadoop1:9083 hive.metastore.event.db.notification.api.auth false
前台启动:/hive-3.1.2/bin/hive --service metastore
前台开启debug日志:/hive-3.1.2/bin/hive --service metastore --hiveconfhive.root.logger=DEBUG,console
缺点:Ctrl+c 就会结束
后台启动:nohup /hive-3.1.2/bin/hive --service metastore &



