Fiware Cosmos Hive connection with Python -
i´m trying send hive queries fiware cosmos using following python code:
with pyhs2.connect(host='cosmos.lab.fiware.org',port=10000, authmechanism="plain", user='xxx', password="xxx", database ="xxx" ) conn: print ("pyhs --- %s seconds ---" % ( time.time() - start_time)) conn.cursor() cur: print ("conn ok --- %s seconds ---" % ( time.time() - start_time)) cur.execute("add jar /usr/local/apache-hive-0.13.0-bin/lib/json-serde-1.3.1-snapshot-jar-with-dependencies.jar")
but following error:
raceback (most recent call last): file "script2.py", line 40, in <module> database ="default" ) conn: file "/usr/local/lib/python2.7/site-packages/pyhs2/__init__.py", line 7, in connect return connection(*args, **kwargs) file "/usr/local/lib/python2.7/site-packages/pyhs2/connections.py", line 46, in __init__ transport.open() file "/usr/local/lib/python2.7/site-packages/pyhs2/cloudera/thrift_sasl.py", line 74, in open status, payload = self._recv_sasl_message() file "/usr/local/lib/python2.7/site-packages/pyhs2/cloudera/thrift_sasl.py", line 92, in _recv_sasl_message header = self._trans.readall(5) file "/usr/local/lib64/python2.7/site-packages/thrift/transport/ttransport.py", line 58, in readall chunk = self.read(sz - have) file "/usr/local/lib64/python2.7/site-packages/thrift/transport/tsocket.py", line 105, in read buff = self.handle.recv(sz) socket.error: [errno 104] connection reset peer
two months ago connect same code. changes or solution?
thanks in advance.
Comments
Post a Comment