hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From أنس الليثي <dev.fano...@gmail.com>
Subject Connecting PHP application to Hive Thrift Server 2
Date Sun, 08 Mar 2015 11:59:32 GMT
Dears

I am using this client <https://github.com/garamon/php-thrift-hive-client> to
connect to hive thrift server but the server is throwing the following
exception


*2015-03-08 14:54:15,097 ERROR org.apache.thrift.server.TThreadPoolServer:
Error occurred during processing of message.*
*java.lang.RuntimeException:
org.apache.thrift.transport.TTransportException: Invalid status -128*
* at
org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)*
* at
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:227)*
* at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)*
* at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)*
* at java.lang.Thread.run(Thread.java:745)*
*Caused by: org.apache.thrift.transport.TTransportException: Invalid status
-128*
* at
org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:230)*
* at
org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184)*
* at
org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)*
* at
org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:262)*
* at
org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)*
* at
org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)*
* ... 4 more*




Also the sample code I am using is below

*<?php*
*$GLOBALS['THRIFT_ROOT'] = dirname(__FILE__) . '/lib';*
*require_once $GLOBALS['THRIFT_ROOT'] .
'/packages/hive_service/ThriftHive.php';*
*require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TSocket.php';*
*require_once $GLOBALS['THRIFT_ROOT'] . '/protocol/TBinaryProtocol.php';*
*require_once dirname(__FILE__) . '/ThriftHiveClientEx.php';*
*$transport = new TSocket('10.62.82.16', 10000);*
*$client = new ThriftHiveClientEx(new TBinaryProtocol($transport));*
*$transport->open();*
*$client->execute('SHOW TABLES');*
*var_dump($client->fetchAll());*
*$transport->close();*


Although when connecting using beeline everything works fine.

What is the problem here ?

-- 
Anas Rabei
Senior Software Developer
Mubasher.info
anas.rabei@mubasher.info

Mime
View raw message