Hive架构及安装部署(远程数据库模式MySQL)
生活随笔
收集整理的這篇文章主要介紹了
Hive架构及安装部署(远程数据库模式MySQL)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
hive架構(gòu)
hive部署
#hive安裝 https://cwiki.apache.org/confluence/display/Hive/AdminManual+Metastore+Administration yum install -y mysql-server systemctl start mysqld mysql show databses; use mysql; select host,user,password from user; grant all privileges on '*' to 'root'@'%' identified by '123456' with grant option; flush privileges; chkconfig mysqld on #文件名必須是hive-site.xml mv /opt/bigdata/hive-2.3.4/conf/hive-default.xml.template /opt/bigdata/hive-2.3.4/conf/hive-site.xml vim /opt/bigdata/hive-2.3.4/conf/hive-site.xml #光標(biāo)行定位到<configuration>標(biāo)簽下面一行,使用末行模式刪除配置文件內(nèi)容 :.,$-1d<property><name>hive.metastore.warehouse.dir</name><value>/user/hive/warehouse</value></property><property><name>javax.jdo.option.ConnectionURL</name><value>jdbc:mysql://192.168.145.20:3306/hive234?createDatabaseIfNotExist=true</value></property><property><name>javax.jdo.option.ConnectionDriverName</name><value>com.mysql.jdbc.Driver</value></property><property><name>javax.jdo.option.ConnectionUserName</name><value>root</value></property><property><name>javax.jdo.option.ConnectionPassword</name><value>123456</value></property> vim /etc/profileexport HIVE_HOME=/opt/bigdata/hive-2.3.4export PATH=$PATH:/home/zxl/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HBASE_HOME/bin:$SPARK_HOME/bin:$HIVE_HOME/bin source /etc/profile scp 192.168.145.20:/software/software/mysql-connector-java-5.1.26-bin.jar $HIVE_HOME/lib [root@nfs-n0 hive-2.3.4]# ll lib |grep mysql schematool -dbType mysql -initSchema use hive234 show tables; #57 rows in set (0.00 sec) hive #啟動 #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> show tables; OK Time taken: 4.096 seconds hive> show databases; OK default Time taken: 0.034 seconds, Fetched: 1 row(s) hive> create table tbl(id int,age int); OK Time taken: 0.659 seconds hive> show tables; OK tbl Time taken: 0.043 seconds, Fetched: 1 row(s) hive>總結(jié)
以上是生活随笔為你收集整理的Hive架构及安装部署(远程数据库模式MySQL)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用azkaban调度spark任务
- 下一篇: Linkis计算中间件部署过程记录