华为云服务器基于hadoop2.7.5安装hive2.3.7 (3)

解决方法:

[root@k8s-master ~]# cd /opt/hive/bin [root@k8s-master ~]# vim hive #注释掉以下的语句 #if [ "$SKIP_HBASECP" = false ]; then # # HBase detection. Need bin/hbase and a conf dir for building classpath entries. # # Start with BigTop defaults for HBASE_HOME and HBASE_CONF_DIR. # HBASE_HOME=${HBASE_HOME:-"/usr/lib/hbase"} # HBASE_CONF_DIR=${HBASE_CONF_DIR:-"/etc/hbase/conf"} # if [[ ! -d $HBASE_CONF_DIR ]] ; then # # not explicitly set, nor in BigTop location. Try looking in HBASE_HOME. # HBASE_CONF_DIR="$HBASE_HOME/conf" # fi # # look for the hbase script. First check HBASE_HOME and then ask PATH. # if [[ -e $HBASE_HOME/bin/hbase ]] ; then # HBASE_BIN="$HBASE_HOME/bin/hbase" # fi # HBASE_BIN=${HBASE_BIN:-"$(which hbase)"} # perhaps we\'ve located HBase. If so, include its details on the classpath # if [[ -n $HBASE_BIN ]] ; then # # exclude ZK, PB, and Guava (See HIVE-2055) # # depends on HBASE-8438 (hbase-0.94.14+, hbase-0.96.1+) for `hbase mapredcp` command # for x in $($HBASE_BIN mapredcp 2>> ${STDERR} | tr \':\' \'\n\') ; do # if [[ $x == *zookeeper* || $x == *protobuf-java* || $x == *guava* ]] ; then # continue # fi # # TODO: should these should be added to AUX_PARAM as well? # export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${x}" # done # fi #fi # --skiphbasecp) # SKIP_HBASECP=true # shift # ;; 5.2 Hive客户端提示"WARN: Establishing SSL connection without server’s identity verification is not recommended."

问题定位: 控制台提示"不建议不使用服务器身份验证建立SSL连接。产生的原因是使用JDBC连接MySQL服务器时没有设置useSSL的参数。" 该警告信息不处理的话,会输出太多无用的信息。

解决方案:

可以设置useSSL=false,如下所示

[root@k8s-master ~]# cd /opt/hive/conf [root@k8s-master conf]# vim hive-site.xml <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://k8s-master:3306/hive?createDatabaseIfNotExist=true&amp;characterEncoding=utf8&amp;useSSL=false</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>

参考文章链接:https://blog.csdn.net/pengjunlee/article/details/81607890

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzydzz.html