首页 > 解决方案 > Presto 与 hive 的集成不起作用

问题描述

我在单节点 centos7 上安装了 Hadoop 3.2.1 和 hadoop 顶部安装了 hive 3.1.2,并希望与 Presto 搜索引擎集成,这样我就可以看到 hive 的数据库到 presto-server-0.229.Hive 运行良好并且能够创建表,我已经在官方文档的帮助下完成了 presto-server-0.229 的安装和配置。但我无法从 presto 访问数据库。

  Here are my all configuration details:

  Hive-site.xml:
  <property>
          <name>javax.jdo.option.ConnectionURL</name>
          <value>jdbc:mysql://10.0.0.96/metastore_db?createDatabaseIfNotExist=true</value>
          <description>metadata is stored in a MySQL server</description>
          </property>

          <property>
          <name>javax.jdo.option.ConnectionDriverName</name>
          <value>com.mysql.jdbc.Driver</value>
          <description>MySQL JDBC driver class</description>
          </property>

          <property>
          <name>javax.jdo.option.ConnectionUserName</name>
          <value>hiveuser</value>
          <description>user name for connecting to mysql server </description>
          </property>

          <property>
          <name>javax.jdo.option.ConnectionPassword</name>
          <value>hivepassword</value>
          <description>password for connecting to mysql server </description>
          </property>

          <property>
          <name>hive.metastore.uris</name>
          <value>thrift://10.0.0.96:9083</value>
          <description>Hive metastore Thrift server</description>
          </property>
  Presto Directories and files details:
  drwxrwxrwx  3 root root     98 Nov 21 05:58 bin
  drwxr-xr-x  3 root root     87 Nov 22 10:55 etc
  drwxrwxrwx  2 root root   8192 Nov 21 05:30 lib
  -rwxrwxrwx  1 root root 191539 Nov 15 05:57 NOTICE
  drwxrwxrwx 31 root root   4096 Nov 21 05:30 plugin
  -rwxrwxrwx  1 root root    126 Nov 15 05:57 README.txt
  [root@master presto-server-0.229]# cd etc/
  [root@master etc]# ll
  total 12
  drwxr-xr-x 2 root root  51 Nov 23 20:38 catalog
  -rwxrwxrwx 1 root root 240 Nov 22 10:55 config.properties
  -rwxrwxrwx 1 root root 171 Nov 21 05:33 jvm.config
  -rwxrwxrwx 1 root root 104 Nov 21 05:31 node.properties
  [root@master etc]# cd catalog
  [root@master catalog]# ll
  total 8
  -rwxrwxrwx 1 root root 173 Nov 23 20:38 hive.properties
  -rw-r--r-- 1 root root  19 Nov 21 06:01 jmx.properties
  [root@master catalog]# cd ..
  [root@master etc]# cd ..
  [root@master presto-server-0.229]# cd bin/
  [root@master bin]# ll
  total 14708
  -rwxrwxrwx 1 root root     1450 Oct  9 21:28 launcher
  -rwxrwxrwx 1 root root       78 Nov 15 06:12 launcher.properties
  -rwxrwxrwx 1 root root    14173 Oct  9 21:28 launcher.py
  -rwxr-xr-x 1 root root 15033453 Dec 15  2018 presto
  drwxrwxrwx 4 root root       47 Nov 15 06:12 procname

  -rwxrwxrwx 1 root root 173 Nov 23 20:38 hive.properties
  -rw-r--r-- 1 root root  19 Nov 21 06:01 jmx.properties

  hive.properties file configuration:

  [root@master catalog]# cat hive.properties
  connector.name=hive-hadoop3
  hive.metastore.uri=thrift://10.0.0.96:9083

  Please help me 

标签: hadoophiveprestotrino

解决方案


Presto .229 不支持 Hive 3。

当前支持 Hive 3:

  • Starburst Presto 323-econnector.name尽管如此hive-hadoop2
  • 通过 Qubole 平台上的 Presto(我不知道配置细节)。

Presto 在 Hive 3 支持方面的工作正在进行中,您可以在此处跟踪它:https ://github.com/prestosql/presto/issues/1218 。

由于您可能会遇到不适合 SO 的后续故障排除问题,因此我建议您加入#troubleshootingPresto Community Slack上。如果您使用Starburst Presto选项,则#starburst该松弛处也有通道。


推荐阅读