当前位置:   article > 正文

集群搭建系列(六) hive 2.3.7_apache-hive-2.3.7-bin.tar.gz

apache-hive-2.3.7-bin.tar.gz

备份下载地址:
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/

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
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>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
hive-env.sh 授权
vim conf/hive-env.sh
  • 1
  • 2

在这里插入图片描述

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

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/633540
推荐阅读
相关标签
  

闽ICP备14008679号