pythonhivedatabase-connectionprotocolsimpala

Error after upgrading impyla to 0.12.0


I used to connect to impala with impyla 0.9.0. But after I upgraded impyla to 0.12.0, I was told that Specifying the protocol argument is no longer necessary because impyla only supports HiveServer2.. So I deleted protocol from config file. Then I keep getting error as following when I tried to connect with Impala:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "data_pipelines/tasks/impala_task.py", line 96, in run
    cursor = self.get_cursor()
  File "data_pipelines/tasks/impala_task.py", line 65, in get_cursor
    timeout=_load_impala_timeout()).cursor()
  File "/Library/Python/2.7/site-packages/impala/hiveserver2.py", line 88, in cursor
    session = self.service.open_session(user, configuration)
  File "/Library/Python/2.7/site-packages/impala/hiveserver2.py", line 798, in open_session
    resp = self._rpc('OpenSession', req)
  File "/Library/Python/2.7/site-packages/impala/hiveserver2.py", line 724, in _rpc
    response = self._execute(func_name, request)
  File "/Library/Python/2.7/site-packages/impala/hiveserver2.py", line 741, in _execute
    return func(request)
  File "/Library/Python/2.7/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 175, in OpenSession
    return self.recv_OpenSession()
  File "/Library/Python/2.7/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 191, in recv_OpenSession
    raise x
thrift.Thrift.TApplicationException: Invalid method name: 'OpenSession'

Has anyone ever met the same problem before? Does anyone know how to fix it and how can I connect to Impala with Impyla 0.12.0? Thanks in advance!


Solution

  • It is resolved by changing the port, according to Impyla Github issue