-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
HIVE-27023: Add setting to prevent tez session from being opened duri… #4015
Conversation
Kudos, SonarCloud Quality Gate passed! |
@abstractdog @ramesh0201 So in this case with this config you can avoid to have a tez session? Is this safe? I can imagine a use case for it. What do you think? |
I don't get when this exactly happens: in the supported infrastructure (beeline + hiveserver2) if we don't configure an initial session pool in hiveserver2 (hive.server2.tez.initialize.default.sessions=false), there shouldn't be any tez session |
@abstractdog - The issue can happen when Hive action is used in Oozie - https://github.com/apache/oozie/blob/d4e36739d798589567ac331b348e8786c876aefa/sharelib/hive/src/main/java/org/apache/oozie/action/hadoop/HiveMain.java#L312 |
thanks for clarifying @maswin
this makes me think that in case there are operations using the tez session and then oozie does some DML operations, this can still happen, right? so the root cause looks independent of the fact that you reproduced it with DML-only scenario, so this fix is more likely hiding the problem, which is cleaning up scratch directories before tez sessions are closed, which is unexpected and needs to be fixed |
Ahh, true. This happens because the tez session is opened in a separate thread in async mode via beginStart() -
And before closing the session we don't wait for the tez session to close. But it might also be beneficial to provide the setting to disable opening tez session everytime due to resource wastage. |
@maswin : basically it makes sense to prevent tez sessions to be opened at all
|
@maswin: I just reopened this, I think it looks good, let me merge if the tests pass |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.8) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
reopened again as I forgot about this :) |
@maswin can you please rebase this PR on top of master? |
@abstractdog : Done |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
…ng startup (apache#4015) (Alagappan Maruthappan reviewed by Laszlo Bodor)
…ng startup (apache#4015) (Alagappan Maruthappan reviewed by Laszlo Bodor)
…ng startup (apache#4015) (Alagappan Maruthappan reviewed by Laszlo Bodor)
What changes were proposed in this pull request?
A setting to disable tez session being preemptively opened during startup of hive cli.
Why are the changes needed?
DML only operations won't need a tez session to be opened. Oozie action that launches hive cli for DML only operations need this setting. Sometimes before the tez session thread could complete, the oozie hive action completes its DML operations and clears the scratch folders causing the tez session to fail with following exception:
Does this PR introduce any user-facing change?
New config value, otherwise no.
How was this patch tested?
Manually tested