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

specify retry times for rpc #82

Open
allenlz opened this issue Jun 25, 2015 · 2 comments
Open

specify retry times for rpc #82

allenlz opened this issue Jun 25, 2015 · 2 comments

Comments

@allenlz
Copy link

allenlz commented Jun 25, 2015

retry times is hard coded here:
https://github.com/cloudera/impyla/blob/v0.10.0/impala/_rpc/hiveserver2.py#L127

Sometimes, user want to retry 0 times if failed, because retry won't help due to some error like memory limit.
Would you expose the retry times to dbapi?

Thanks.

@laserson
Copy link
Contributor

Sorry for the long delay. Will look into this shortly.

@szehon
Copy link
Contributor

szehon commented Aug 5, 2015

I hit this issue too.

For information, if Impyla is run against Hive and timeout error occurs, retrying an executeStatement is not useful, as HiveServer2 behavior is to automatically cleanup a session on a disconnect. Thus the retried executeStatement will get :

"org.apache.hive.service.cli.HiveSQLException: Invalid SessionHandle: SessionHandle"

In fact, the implicit retry is harmful in this case as it makes it so that the application has no indication that the error happened and the need to open a new session.

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

3 participants