HDFS-2947. On startup NN throws an NPE in the metrics system. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1243826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db187cf40e
commit
1b2ecc6336
|
@ -196,3 +196,5 @@ HDFS-2912. Namenode not shutting down when shared edits dir is inaccessible. (Bi
|
||||||
HDFS-2917. HA: haadmin should not work if run by regular user (eli)
|
HDFS-2917. HA: haadmin should not work if run by regular user (eli)
|
||||||
|
|
||||||
HDFS-2939. TestHAStateTransitions fails on Windows. (Uma Maheswara Rao G via atm)
|
HDFS-2939. TestHAStateTransitions fails on Windows. (Uma Maheswara Rao G via atm)
|
||||||
|
|
||||||
|
HDFS-2947. On startup NN throws an NPE in the metrics system. (atm)
|
||||||
|
|
|
@ -534,16 +534,16 @@ public class NameNode {
|
||||||
String nsId = getNameServiceId(conf);
|
String nsId = getNameServiceId(conf);
|
||||||
String namenodeId = HAUtil.getNameNodeId(conf, nsId);
|
String namenodeId = HAUtil.getNameNodeId(conf, nsId);
|
||||||
this.haEnabled = HAUtil.isHAEnabled(conf, nsId);
|
this.haEnabled = HAUtil.isHAEnabled(conf, nsId);
|
||||||
this.allowStaleStandbyReads = HAUtil.shouldAllowStandbyReads(conf);
|
|
||||||
this.haContext = createHAContext();
|
|
||||||
try {
|
|
||||||
initializeGenericKeys(conf, nsId, namenodeId);
|
|
||||||
initialize(conf);
|
|
||||||
if (!haEnabled) {
|
if (!haEnabled) {
|
||||||
state = ACTIVE_STATE;
|
state = ACTIVE_STATE;
|
||||||
} else {
|
} else {
|
||||||
state = STANDBY_STATE;;
|
state = STANDBY_STATE;;
|
||||||
}
|
}
|
||||||
|
this.allowStaleStandbyReads = HAUtil.shouldAllowStandbyReads(conf);
|
||||||
|
this.haContext = createHAContext();
|
||||||
|
try {
|
||||||
|
initializeGenericKeys(conf, nsId, namenodeId);
|
||||||
|
initialize(conf);
|
||||||
state.prepareToEnterState(haContext);
|
state.prepareToEnterState(haContext);
|
||||||
state.enterState(haContext);
|
state.enterState(haContext);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue