-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-3410] The priority of shutdownhook for ApplicationMaster should not be integer literal #2283
Conversation
…ook for ApplicationMaster higher than the priority of shutdown hook for HDFS
QA tests have started for PR 2283 at commit
|
This change makes this shutdown hook lower than |
@srowen It's confused but lower value is higher priority. |
Ah I see. That's fine, I just wasn't sure which the intent was since I think the original description is missing a word. |
QA tests have finished for PR 2283 at commit
|
Ah, sorry it's my wrong. I confirm the logic of ShutdownHookManager, and higher value is higher priority. |
test this please. |
Jenkins, retest this please . |
I don't think this is really necessary as I see the value of the Filesystem one as a public api now and changing its value would break compatibility, but I'm ok with it. Yes yarn-alpha has this defined. Higher value is higher priority. I would rather leave it at value 30 or at least some priorities in between, so I would rather see + 20. 30 is also what mapreduce uses so if Hadoop would to add others in we would be better off to imitate MR. |
@sarutak can you please either upmerge or close this |
Thank you for notification. I've rebased. |
QA tests have started for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
thanks, can you please also address my concerns in the comment above. |
@tgravescs I agree with +20, and how about asserting the priority is between HDFS's and MR's? |
QA tests have started for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
ShutdownHookManager.get().addShutdownHook(cleanupHook, 30) | ||
|
||
// Use higher priority than FileSystem. | ||
val priority = 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarutak an assertion is a good idea. Could you change the priority back to 30 instead of 20? Also instead of having 20 hardcoded in 2 different places can you make one static for this something like:
val SHUTDOWN_HOOK_PRIORITY: int = 30
in the ApplicationMaster object area.
@tgravescs Oh, I mistook. The priority is duplicated. |
QA tests have started for PR 2283 at commit
|
QA tests have started for PR 2283 at commit
|
QA tests have started for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
QA tests have started for PR 2283 at commit
|
QA tests have finished for PR 2283 at commit
|
+1 looks good. Thanks @sarutak |
I think, it need to keep the priority of shutdown hook for ApplicationMaster than the priority of shutdown hook for o.a.h.FileSystem depending on changing the priority for FileSystem.