Skip to content

Conversation

@kneeraj
Copy link

@kneeraj kneeraj commented Jul 11, 2018

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)

and return if there is inordinate delay.
@kneeraj kneeraj requested review from rishitesh and sumwale July 11, 2018 13:37
try {
return f.get();
// Time out if it takes more than 30 seconds
return f.get(30, TimeUnit.SECONDS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it be best to shutdown "hmsQueriesExecutorService" in case of shutdown, which calls catalog.close();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. anyway, that is called. So why was the queries waiting?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kneeraj kneeraj requested a review from dshirish July 31, 2018 09:58
@sumwale sumwale force-pushed the master branch 5 times, most recently from 8b43301 to 2b254d9 Compare October 1, 2021 09:23
@sumwale sumwale force-pushed the master branch 5 times, most recently from 2c254f0 to 0f2888f Compare October 18, 2021 17:01
@sumwale sumwale force-pushed the master branch 2 times, most recently from a466d26 to ea127bd Compare April 12, 2022 10:05
@sumwale sumwale force-pushed the master branch 2 times, most recently from 99ec79c to c7b84fa Compare June 12, 2022 04:19
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

Successfully merging this pull request may close these issues.

3 participants