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

[SPARK-3410] The priority of shutdownhook for ApplicationMaster should not be integer literal #2283

Closed
wants to merge 8 commits into from

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Sep 5, 2014

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.

…ook for ApplicationMaster higher than the priority of shutdown hook for HDFS
@SparkQA
Copy link

SparkQA commented Sep 5, 2014

QA tests have started for PR 2283 at commit 717aba2.

  • This patch merges cleanly.

@srowen
Copy link
Member

srowen commented Sep 5, 2014

This change makes this shutdown hook lower than FileSystem's, whereas it used to be higher. Also does this compile for yarn-alpha too? Given the time it went in, it probably works with all supported Hadoop versions but worth checking.

@sarutak
Copy link
Member Author

sarutak commented Sep 5, 2014

@srowen It's confused but lower value is higher priority.

@srowen
Copy link
Member

srowen commented Sep 5, 2014

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.

@SparkQA
Copy link

SparkQA commented Sep 5, 2014

QA tests have finished for PR 2283 at commit 717aba2.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class AddJar(path: String) extends LeafNode with Command

@sarutak
Copy link
Member Author

sarutak commented Sep 5, 2014

Ah, sorry it's my wrong. I confirm the logic of ShutdownHookManager, and higher value is higher priority.

@sarutak sarutak changed the title [SPARK-3410] The priority of shutdownhook for ApplicationMaster should not be integer literal, rather than refer constant. [SPARK-3410] The priority of shutdownhook for ApplicationMaster should not be integer literal Sep 5, 2014
@sarutak
Copy link
Member Author

sarutak commented Sep 5, 2014

test this please.

@sarutak
Copy link
Member Author

sarutak commented Sep 5, 2014

Jenkins, retest this please .

@tgravescs
Copy link
Contributor

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.

@tgravescs
Copy link
Contributor

@sarutak can you please either upmerge or close this

@sarutak
Copy link
Member Author

sarutak commented Sep 12, 2014

Thank you for notification. I've rebased.

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have started for PR 2283 at commit 2f0aee3.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have finished for PR 2283 at commit 2f0aee3.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor

thanks, can you please also address my concerns in the comment above.

@sarutak
Copy link
Member Author

sarutak commented Sep 13, 2014

@tgravescs I agree with +20, and how about asserting the priority is between HDFS's and MR's?

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have started for PR 2283 at commit 54eb68f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have finished for PR 2283 at commit 54eb68f.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

ShutdownHookManager.get().addShutdownHook(cleanupHook, 30)

// Use higher priority than FileSystem.
val priority = 20
Copy link
Contributor

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.

@sarutak
Copy link
Member Author

sarutak commented Sep 13, 2014

@tgravescs Oh, I mistook. The priority is duplicated.
Now I've modified. Thanks!

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have started for PR 2283 at commit e8ce90b.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have started for PR 2283 at commit ce86eb9.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have started for PR 2283 at commit bd6cc53.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have finished for PR 2283 at commit e8ce90b.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have finished for PR 2283 at commit ce86eb9.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 13, 2014

QA tests have finished for PR 2283 at commit bd6cc53.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 14, 2014

QA tests have started for PR 2283 at commit 1d44fef.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 14, 2014

QA tests have finished for PR 2283 at commit 1d44fef.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor

+1 looks good. Thanks @sarutak

@asfgit asfgit closed this in cc14644 Sep 15, 2014
@sarutak sarutak deleted the SPARK-3410 branch April 11, 2015 05:22
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.

4 participants