Conversation
and return if there is inordinate delay.
rishitesh
reviewed
Jul 17, 2018
| try { | ||
| return f.get(); | ||
| // Time out if it takes more than 30 seconds | ||
| return f.get(30, TimeUnit.SECONDS); |
Contributor
There was a problem hiding this comment.
Won't it be best to shutdown "hmsQueriesExecutorService" in case of shutdown, which calls catalog.close();
Contributor
There was a problem hiding this comment.
Ok. anyway, that is called. So why was the queries waiting?
Author
There was a problem hiding this comment.
The query waits for the result on a future. A different thread runs the query and gets the result. The hive query kept on retrying ( from hive code ) and the future was indefinite wait. It looks like the hive thingy retries for a very very long time...
So thought of timing this out after 30 seconds. Please mind, this is the query on the metastore.
8b43301 to
2b254d9
Compare
2c254f0 to
0f2888f
Compare
a466d26 to
ea127bd
Compare
99ec79c to
c7b84fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This causes delay in shutdown etc. also even if hive query is failing due to cluster being down.
Changes proposed in this pull request
Do not wait for more than 30 seconds for any hive query. Added a timeout.
Patch testing
(Fill in the details about how this patch was tested)
ReleaseNotes.txt changes
(Does this change require an entry in ReleaseNotes.txt? If yes, has it been added to it?)
Other PRs
(Does this change require changes in other projects- store, spark, spark-jobserver, aqp? Add the links of PR of the other subprojects that are related to this change)