Amend HDFS-2795. Fix PersistBlocks failure due to an NPE in isPopulatingReplQueues()
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1232510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0c1450ca5d
commit
4c7a6c6c3f
|
@ -3681,7 +3681,8 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPopulatingReplQueues() {
|
public boolean isPopulatingReplQueues() {
|
||||||
if (!haContext.getState().shouldPopulateReplQueues()) {
|
if (haContext != null && // null during startup!
|
||||||
|
!haContext.getState().shouldPopulateReplQueues()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// safeMode is volatile, and may be set to null at any time
|
// safeMode is volatile, and may be set to null at any time
|
||||||
|
|
Loading…
Reference in New Issue