Skip to content

Commit

Permalink
[SPARK-18119][SPARK-CORE] Namenode safemode check is only performed o…
Browse files Browse the repository at this point in the history
…n 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 <[email protected]>

Closes apache#15648 from ashangit/SPARK-18119.
  • Loading branch information
n.fraison authored and Robert Kruszewski committed Dec 2, 2016
1 parent c421b2f commit 5a45b55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

/**
Expand Down

0 comments on commit 5a45b55

Please sign in to comment.