Skip to content
Snippets Groups Projects
Unverified Commit a49dfa93 authored by n.fraison's avatar n.fraison Committed by Sean Owen
Browse files

[SPARK-18119][SPARK-CORE] Namenode safemode check is only performed on one...

[SPARK-18119][SPARK-CORE] Namenode safemode check is only performed on one namenode which can stuck the startup of SparkHistory server

## What changes were proposed in this pull request?

Instead of using the setSafeMode method that check the first namenode used the one which permitts to check only for active NNs
## How was this patch tested?

manual tests

Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark

 before opening a pull request.

This commit is contributed by Criteo SA under the Apache v2 licence.

Author: n.fraison <n.fraison@criteo.com>

Closes #15648 from ashangit/SPARK-18119.

(cherry picked from commit f42db0c0)
Signed-off-by: default avatarSean Owen <sowen@cloudera.com>
parent 57dbc682
No related branches found
No related tags found
No related merge requests found
......@@ -663,9 +663,9 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
false
}
// For testing.
private[history] def isFsInSafeMode(dfs: DistributedFileSystem): Boolean = {
dfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_GET)
/* true to check only for Active NNs status */
dfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_GET, true)
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment