Hive集成mysql后登录频繁报警问题

Hive中频繁报警的问题

最近在研究大数据开发,碰到的小问题汇总在这。

在我们使用Hive集成mysql之后,我们多窗口运行hive的时候,有时候会在shell中报一堆警告。虽然不影响正常的使用,但是相信大多数程序员都有强迫症,我也一样,为此我看着很烦。

警告如下:

Thu Feb 14 17:02:17 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

图片如下:
在这里插入图片描述

警报原因:

产生报警,是因为我搭建的Hive集成mysql,Hive使用MySql作为metadata的存储,使得我们可以多窗口同时登录Hive,而MySql为5.7.25版本,版本需要在连接串中指定是否采用SSL连接。

解决方案:

所以我们只需修改Hive的 hive-site.xml,在连接串中加入指定SSL为false即可:

 <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://ut07:3306/hive?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false</value>
  </property>

猜你喜欢

转载自blog.csdn.net/dh12313012/article/details/87285580
今日推荐