2016-05-05 53 views
0

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

  1. https://github.com/QwertyManiac/hive-hs2-php-thrift
  2. https://github.com/dryangkun/php-hiveserver2

但任何人都没有为我工作。我已经更改了第一个链接中提到的hive-site.xml的配置,如下所示。

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

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

Uncaught exception 'Thrift\Exception\TTransportException' with message 'TSocket: timed out reading 4 bytes from localhost:10000' in /Users/lazhcm10385/projects/hive/hive-hs2-php-thrift/thrift/Thrift/Transport/TSocket.php:274 

请帮助我,如果有人有适当的文档连接到使用PHP的hiveserver2。

回答