我需要使用Hadoop中的数据在我的PHP应用程序中创建一个报告。我已经在本地的机器上安装了hiveserver2。我试图通过以下示例从我的hiveserver2代码中找到一种连接到PHP的方法。
但他们中的任何一个都不为我工作。我已经更改了第一个链接中提到的hivesite.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,请帮助我。
发布于 2016-05-07 15:06:29
我可以使用https://github.com/QwertyManiac/hive-hs2-php-thrift从php连接到hive服务器。我关闭了终端,并在更改了hive服务器的配置后再次打开,然后使用新打开的终端启动了服务器。
https://stackoverflow.com/questions/37047058
复制相似问题