I am running Hive queries
from Python
using PyHive
. One of the query is taking around 12-15 minutes to complete. I could see it completed on Hadoop
ResourceManager UI
, however I am seeing bellow timeout error on Python
.
Error:Traceback (most recent call last): File "/home/mrjadav/python/thunderbolt.py", line 704, in main() File "/home/mrjadav/python/thunderbolt.py", line 662, in main getColoLatency() File "/home/mrjadav/python/thunderbolt.py", line 582, in getColoLatency dataSet = saveHqlResultToXls(queryString=queryString, caption='Colo Latency Breakdown', configuration=g_hive_config_heavy) File "/home/mrjadav/python/thunderbolt.py", line 636, in saveHqlResultToXls dataSet=cursor.fetchall() File "/home/y/lib/python2.7/site-packages/pyhive/common.py", line 136, in fetchall return list(iter(self.fetchone, None)) File "/home/y/lib/python2.7/site-packages/pyhive/common.py", line 105, in fetchone self._fetch_while(lambda: not self._data and self._state != self._STATE_FINISHED) File "/home/y/lib/python2.7/site-packages/pyhive/common.py", line 45, in _fetch_while self._fetch_more() File "/home/y/lib/python2.7/site-packages/pyhive/hive.py", line 386, in _fetch_more response = self._connection.client.FetchResults(req) File "/home/y/lib/python2.7/site-packages/TCLIService/TCLIService.py", line 714, in FetchResults return self.recv_FetchResults() File "/home/y/lib/python2.7/site-packages/TCLIService/TCLIService.py", line 726, in recv_FetchResults (fname, mtype, rseqid) = iprot.readMessageBegin() File "/home/y/lib/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py", line 134, in readMessageBegin sz = self.readI32() File "/home/y/lib/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py", line 217, in readI32 buff = self.trans.readAll(4) File "/home/y/lib/python2.7/site-packages/thrift/transport/TTransport.py", line 60, in readAll chunk = self.read(sz - have) File "/home/y/lib/python2.7/site-packages/thrift_sasl/init.py", line 166, in read self._read_frame() File "/home/y/lib/python2.7/site-packages/thrift_sasl/init.py", line 170, in _read_frame header = self._trans.readAll(4) File "/home/y/lib/python2.7/site-packages/thrift/transport/TTransport.py", line 60, in readAll chunk = self.read(sz - have) File "/home/y/lib/python2.7/site-packages/thrift/transport/TSocket.py", line 117, in read buff = self.handle.recv(sz) error: [Errno 110] Connection timed out