Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hive - thrift.transport.TTransport.TTransportException: TSocket read 0 bytes #9

Open
RotemAmergi opened this issue Sep 4, 2017 · 0 comments

Comments

@RotemAmergi
Copy link

Hi ,
I am using your code with Hive
'https://github.com/big-data-europe/docker-hive'

I get this error :
Traceback (most recent call last):
File "./onefold.py", line 513, in
main()
File "./onefold.py", line 509, in main
loader.run()
File "./onefold.py", line 422, in run
self.load_dw()
File "./onefold.py", line 377, in load_dw
if self.dw.table_exists(self.dw_database_name, self.dw_table_name):
File "/home/mongo-hive/dw_util.py", line 292, in table_exists
r = self.execute_sql(database_name, "show tables", True)
File "/home/mongo-hive/dw_util.py", line 91, in execute_sql
conn = pyhs2.connect(host=self.host, port=self.port, authMechanism="NOSASL", database='default',user=self.user,password=self.password)
File "/usr/local/lib/python2.7/dist-packages/pyhs2/init.py", line 7, in connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyhs2/connections.py", line 47, in init
res = self.client.OpenSession(TOpenSessionReq(username=user, password=password, configuration=configuration))
File "/usr/local/lib/python2.7/dist-packages/pyhs2/TCLIService/TCLIService.py", line 154, in OpenSession
return self.recv_OpenSession()
File "/usr/local/lib/python2.7/dist-packages/pyhs2/TCLIService/TCLIService.py", line 165, in recv_OpenSession
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
File "/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py", line 148, in readMessageBegin
name = self.trans.readAll(sz)
File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 60, in readAll
chunk = self.read(sz - have)
File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 161, in read
self.__rbuf = BufferIO(self.__trans.read(max(sz, self.__rbuf_size)))
File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line 132, in read
message='TSocket read 0 bytes')
thrift.transport.TTransport.TTransportException: TSocket read 0 bytes

This is the way I run the script :
./onefold.py --mongo mongodb://mongodb_1:27017
--source_db test
--source_collection Data
--hiveserver_host localhost
--hiveserver_port 10000

How can i fix it ?

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant