0

I wrote a script to connect to HBase using Thrift Server. Each minute this script fetches 3200 records from HBase and updates some information and saves it. The first 30-45 minutes this is working fine on the Ambari Hadoop cluster. After that a query exception occurs:

exception 'Thrift\Exception\TTransportException'
with message 'TSocket: timed out reading 4 bytes from 192.168.1.55:9090'
in /home/responsive/thrift/thrift/lib/Thrift/Transport/TSocket.php:274

To resolve this error, I restarted the Thrift service and then it is working fine again, but I don't know why this error occurs.

Do you have any idea what is causing this?

trincot
  • 317,000
  • 35
  • 244
  • 286
Jain Hemant
  • 150
  • 2
  • 19
  • Have u set any timeout ? – Sashidhar Thallam Aug 04 '17 at 18:57
  • Welcome to StackOverflow! I updated your question, formatting the error message and removing some unnecessary text at the end. Also shortened the title to the essence. – trincot Aug 04 '17 at 22:28
  • @SashidharThallam Yes I have set below time out in.Please help me if know this answer. $socket = new TSocket(THRIFT_HOST, THRIFT_PORT); $socket->setSendTimeout(10000); $socket->setRecvTimeout(20000); $transport = new TBufferedTransport( $socket ); $protocol = new TBinaryProtocol( $transport ); $client = new HbaseClient( $protocol ); $transport->open(); – Jain Hemant Aug 16 '17 at 07:07

0 Answers0