使用PHP连接到hiveserver2

时间:2016-05-05 09:30:13

标签: php hadoop hiveql hadoop-plugins

我需要使用Hadoop中的数据在我的PHP应用程序中创建一个报告。我在本地机器上安装了hiveserver2。我尝试使用以下示例找到一种从我的PHP代码连接到hiveserver2的方法。

  1. https://github.com/QwertyManiac/hive-hs2-php-thrift
  2. https://github.com/dryangkun/php-hiveserver2
  3. 但他们中的任何一个都不适合我。我已经更改了第一个链接中提到的hive-site.xml的配置,如下所示。

    Sheet1!"A2:B2"

    我在第一个链接中运行PHP文件时出现以下错误。

    <property>
    <name>hive.server2.authentication</name>
    <value>NOSASL</value>
    <description>
      Expects one of [nosasl, none, ldap, kerberos, pam, custom]
    

    如果有人有正确的文档可以使用PHP连接到hiveserver2,请帮助我。

1 个答案:

答案 0 :(得分:0)

我可以使用https://github.com/QwertyManiac/hive-hs2-php-thrift从php连接到hive服务器。我关闭终端并在更改配置单元服务器的配置后再次打开,然后使用新打开的终端启动服务器。