/** * Given the configuration for this node, return a Configuration object for * the other node in an HA setup. * * @param myConf the configuration of this node * @return the configuration of the other node in an HA setup */ public static Configuration getConfForOtherNode( Configuration myConf) { String nsId = DFSUtil.getNamenodeNameServiceId(myConf); String otherNn = getNameNodeIdOfOtherNode(myConf, nsId); // Look up the address of the active NN. Configuration confForOtherNode = new Configuration(myConf); NameNode.initializeGenericKeys(confForOtherNode, nsId, otherNn); return confForOtherNode; }
/** * Given the configuration for this node, return a Configuration object for * the other node in an HA setup. * * @param myConf the configuration of this node * @return the configuration of the other node in an HA setup */ public static Configuration getConfForOtherNode( Configuration myConf) { String nsId = DFSUtil.getNamenodeNameServiceId(myConf); String otherNn = getNameNodeIdOfOtherNode(myConf, nsId); // Look up the address of the active NN. Configuration confForOtherNode = new Configuration(myConf); NameNode.initializeGenericKeys(confForOtherNode, nsId, otherNn); return confForOtherNode; }
String otherNnId = HAUtil.getNameNodeIdOfOtherNode(conf, nsId); return new BlockTokenSecretManager(updateMin*60*1000L, lifetimeMin*60*1000L, thisNnId.compareTo(otherNnId) < 0 ? 0 : 1, null,
String otherNnId = HAUtil.getNameNodeIdOfOtherNode(conf, nsId); return new BlockTokenSecretManager(updateMin*60*1000L, lifetimeMin*60*1000L, thisNnId.compareTo(otherNnId) < 0 ? 0 : 1, null,