集群搭建系列(六) hive 2.3.7

备份下载地址:
1 mysql 驱动
https://download.csdn.net/download/cs261244787/13721913
2 hive2.3.7
https://download.csdn.net/download/cs261244787/13721810

1 下载、解压、上传 mysql connector
wget https://mirrors.tuna.tsinghua.edu.cn/apache/hive/hive-2.3.7/apache-hive-2.3.7-bin.tar.gz

tar -zxvf apache-hive-2.3.7-bin.tar.gz

cp mysql-connector-java-5.1.48.jar apache-hive-2.3.7-bin/

2 Hive-site.xml ( beeline、Hive 路径指定、)

进入 conf 除了 DriverName不用修改。 其余都要修改

<configuration>
	<property>
	    <name>hive.metastore.warehouse.dir</name>
	    <value>/user/hive/warehouse</value>
	    <description>location of default database for the warehouse</description>
	</property>
	<property>
	    <name>hive.exec.scratchdir</name>
	    <value>/user/hdfs/tmp</value>
	</property>
        <property>
 	       <name>javax.jdo.option.ConnectionURL</name>
	        <value>jdbc:mysql://修改:3306/metastore?characterEncoding=utf8&amp;useSSL=false</value>
	        <description>JDBC connect string for a JDBC metastore</description>
        </property>
        <property>
	        <name>javax.jdo.option.ConnectionDriverName</name>
	        <value>com.mysql.jdbc.Driver</value>
	        <description>Driver class name for a JDBC metastore</description>
        </property>
        <property>
	        <name>javax.jdo.option.ConnectionUserName</name>
	        <value>hive</value>
	        <description>username to use against metastore database</description>
        </property>
        <property>
	        <name>javax.jdo.option.ConnectionPassword</name>
	        <value>修改</value>
	        <description>password to use against metastore database</description>
        </property>
	<property>
	    <name>hive.metastore.schema.verification</name>
	    <value>true</value>
	 </property>
         <!-- local dir -->
	<property>
		<name>hive.exec.local.scratchdir</name>
		<value>/opt/hadoop/apache-hive-2.3.7-bin/tmp/hive</value>
	</property>
	<property>
		<name>hive.querylog.location</name>
		<value>/opt/hadoop/apache-hive-2.3.7-bin/logs/hive</value>
	</property>
	<property>
	        <name>hive.server2.authentication</name>
        	<value>NONE</value>
	</property>
	<property>
	        <name>hive.server2.thrift.bind.host</name>
	        <value>修改</value>
	</property>
	<property>
	        <name>hive.server2.thrift.port</name>
	        <value>10000</value>
        <description>TCP port number to listen on, default 10000</description>
	</property>
	<property>
        	<name>hive.server2.thrift.http.port</name>
	        <value>10001</value>
	</property>
	<property>
        	<name>hive.server2.thrift.client.user</name>
	        <value>修改</value>
        <description>Username to use against thrift client</description>
	</property>
	<property>
        	<name>hive.server2.thrift.client.password</name>
	        <value>修改</value>
        <description>Password to use against thrift client</description>
	</property>	
</configuration>

3 环境变量
[wftapp@biz-145 conf]$ vim /etc/profile
[wftapp@biz-145 conf]$ sudo vim /etc/profile
[wftapp@biz-145 conf]$ source /etc/profile
[wftapp@biz-145 conf]$ cat /etc/profile |grep HIVE
export HIVE_HOME=/opt/hadoop/hive
export PATH=$PATH:$HIVE_HOME/bin
hive-env.sh 授权
vim conf/hive-env.sh

在这里插入图片描述

4 授权
授权 给 tmp hive job 会使用到
hdfs dfs -ls /tmp
hdfs dfs -chmod  -R 777  /user/hdfs/tmp
hdfs dfs -chmod  -R 777  /tmp

在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值