标签:复制 查看 als postgre mys enabled 搜索 安装 src
wget https://mirrors.aliyun.com/apache/hive/hive-2.3.7/apache-hive-2.3.7-bin.tar.gz
tar -zxvf apache-hive-2.3.7-bin.tar.gz -C /opt/module/
mv apache-hive-2.3.7-bin/ hive-2.3.7
vim /etc/profile
export HIVE_HOME=/opt/module/hive-2.3.7
export PATH=$PATH:$HIVE_HOME/bin
source /etc/profile
<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.ConnectionURL</name>
<value>jdbc:mysql://192.168.130.77:3306/hive</value>
<description>
JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
For example, jdbc:postgresql://myhost/db?ssl=true for postgres database.
</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>Username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>123456</value>
<description>password to use against metastore database</description>
</property>
数据库驱动为mysql驱动com.mysql.jdbc.Driver,URL改为mysql的hive2(自定义)数据库,用户名密码为自己数据库对应的用户名密码
修改hive配置的一些目录,指定到自己选择的目录,搜索以?${system 开头的 value 替换为自己的目录,我这里替换为:/opt/module/hive-2.3.7/hive下相关目录
<property>
<name>hive.exec.local.scratchdir</name>
<value>/opt/module/hive-2.3.7/hive</value>
<description>Local scratch space for Hive jobs</description>
</property>
<property>
<name>hive.downloaded.resources.dir</name>
<value>/opt/module/hive-2.3.7/hive/downloads</value>
<description>Temporary local directory for added resources in the remote file system.</description>
</property>
<property>
<name>hive.querylog.location</name>
<value>/opt/module/hive-2.3.7/hive/querylog</value>
<description>Location of Hive run time structured log file</description>
</property>
<property>
<name>hive.server2.logging.operation.log.location</name>
<value>/opt/module/hive-2.3.7/hive/server2_logs</value>
<description>Top level directory where operation logs are stored if logging functionality is enabled</description>
</property
修改权限验证为false
<property>
<name>hive.server2.enable.doAs</name>
<value>false</value>
<description>
Setting this property to true will have HiveServer2 execute
Hive operations as the user making the calls to it.
</description>
</property>
mv mysql-connector-java-8.0.18.jar /opt/soft/hive/lib/
cd /opt/module/hive-2.3.7/bin
hive
create database myhivedb2;
hdfs dfs -ls -R /user/hive/
标签:复制 查看 als postgre mys enabled 搜索 安装 src
原文地址:https://www.cnblogs.com/hziwei/p/12795206.html