使用 PHP 连接到 hiveserver2
Connect to hiveserver2 using PHP
我需要使用 Hadoop 中的数据在我的 PHP 应用程序中创建一个报告。我在我的本地机器上安装了 hiveserver2。我尝试使用以下示例从我的 PHP 代码中找到一种连接到 hiveserver2 的方法。
但是他们中的任何一个都不适合我。我已经更改了 hive-site.xml 的配置,如下面的第一个 link 中所述。
<property>
<name>hive.server2.authentication</name>
<value>NOSASL</value>
<description>
Expects one of [nosasl, none, ldap, kerberos, pam, custom]
当我 运行 第一个 link 中的 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 的正确文档,请帮助我。
我可以使用 https://github.com/QwertyManiac/hive-hs2-php-thrift 从 php 连接到配置单元服务器。我在更改配置单元服务器配置后关闭终端并再次打开,然后使用新打开的终端启动服务器。
我需要使用 Hadoop 中的数据在我的 PHP 应用程序中创建一个报告。我在我的本地机器上安装了 hiveserver2。我尝试使用以下示例从我的 PHP 代码中找到一种连接到 hiveserver2 的方法。
但是他们中的任何一个都不适合我。我已经更改了 hive-site.xml 的配置,如下面的第一个 link 中所述。
<property>
<name>hive.server2.authentication</name>
<value>NOSASL</value>
<description>
Expects one of [nosasl, none, ldap, kerberos, pam, custom]
当我 运行 第一个 link 中的 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 的正确文档,请帮助我。
我可以使用 https://github.com/QwertyManiac/hive-hs2-php-thrift 从 php 连接到配置单元服务器。我在更改配置单元服务器配置后关闭终端并再次打开,然后使用新打开的终端启动服务器。