将impyla升级到0.12.0后出错

ddhy6vgd  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(457)

我以前和 Impala 有联系 impyla 0.9.0. 但在我升级之后 impyla 到0.12.0,我被告知 Specifying the protocol argument is no longer necessary because impyla only supports HiveServer2. . 所以我删除了 protocol 从配置文件。当我尝试与 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'

以前有人遇到过同样的问题吗?有人知道如何修复它吗?我如何用impyla 0.12.0连接到impala?提前谢谢!

xu3bshqb

xu3bshqb1#

根据impyla github的问题,可以通过改变端口来解决这个问题

相关问题