You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/05/11 20:08:00 UTC
[jira] [Updated] (SPARK-31456) If shutdownhook is added with
priority Integer.MIN_VALUE, it's supposed to be called the last, but it
gets called before other positive priority shutdownhook
[ https://issues.apache.org/jira/browse/SPARK-31456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun updated SPARK-31456:
----------------------------------
Affects Version/s: 1.6.3
2.0.2
2.1.3
2.2.3
2.3.4
> If shutdownhook is added with priority Integer.MIN_VALUE, it's supposed to be called the last, but it gets called before other positive priority shutdownhook
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SPARK-31456
> URL: https://issues.apache.org/jira/browse/SPARK-31456
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 1.6.3, 2.0.2, 2.1.3, 2.2.3, 2.3.4, 2.4.5
> Environment: macOS Mojave 10.14.6
> Reporter: Xiaolei Liu
> Priority: Major
>
> https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/ShutdownHookManager.scala
> Since shutdownHookManager use below method to do the comparison.
> override def compareTo(other: SparkShutdownHook): Int = {
> other.priority - priority
> }
> Which will cause :
> (Int)(25 - Integer.MIN_VALUE) < 0
> Then the shutdownhook with Integer.Min_VALUE would not be called the last.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org