Created 09-07-2018 10:17 AM
Hi,
I have 4 node HDPcluster . In that second node I installed Hiveserver2 and apache lamp server.
I want to connect HiveServer2 to PHP. Is there any way to connect. I tried but unable to resolve the issue.
Could anybody suggest any idea or blog.
Thanks.
Created 09-07-2018 12:39 PM
You can use ODBC to connect to hiveserver2 with php. You can download and install the odbc client and then use the dbc connect for php: http://php.net/manual/es/function.odbc-connect.php
Created 09-08-2018 06:51 AM
Hi thanks for quick reply @Felix Albani
I tried but i didn't find out any way to connect. I am getting below error.
Opened transport
Fatal error: Uncaught exception
'Thrift\Exception\TApplicationException' with message 'Invalid method
name: 'OpenSession'' in
/var/www/html/hs2/hive/org/apache/hive/service/cli/thrift/TCLIService.php:89
Stack trace:
#0
/var/www/html/hs2/hive/org/apache/hive/service/cli/thrift/TCLIService.php(56):
org\apache\hive\service\cli\thrift\TCLIServiceClient->recv_OpenSession()
#1 /var/www/html/hs2/HS2Client.php(40):
org\apache\hive\service\cli\thrift\TCLIServiceClient->OpenSession(Object(org\apache\hive\service\cli\thrift\TOpenSessionReq))
#2 {main}
thrown in /var/www/html/hs2/hive/org/apache/hive/service/cli/thrift/TCLIService.php on line 89
Could you pls let me know any solution.