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

Unable to tell if HS2Service is opened, it can fail close #470

Open
EggDice opened this issue Sep 14, 2021 · 0 comments
Open

Unable to tell if HS2Service is opened, it can fail close #470

EggDice opened this issue Sep 14, 2021 · 0 comments

Comments

@EggDice
Copy link

EggDice commented Sep 14, 2021

If the close() method is called on HS2Service it is possible that the _iprot is already closed, and it raises an exception:

File "/Users/eggdice/.pyenv/versions/3.6.2/lib/python3.6/site-packages/impala/hiveserver2.py", line 71, in close
    self.service.close()
  File "/Users/eggdice/.pyenv/versions/3.6.2/lib/python3.6/site-packages/impala/hiveserver2.py", line 1171, in close
    self.client._iprot.trans.close()
  File "/Users/eggdice/.pyenv/versions/3.6.2/lib/python3.6/site-packages/thrift/transport/TTransport.py", line 156, in close
    return self.__trans.close()
  File "/Users/eggdice/.pyenv/versions/3.6.2/lib/python3.6/site-packages/impala/_thrift_api.py", line 162, in close
    self.__http.close()
AttributeError: 'NoneType' object has no attribute 'close'

It should handle this edge case or it should expose an isOpen() method

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