From ececeea8f2ba47b8618e22e52bc839f4f9ac511b Mon Sep 17 00:00:00 2001 From: Yiqun Lin Date: Thu, 1 Mar 2018 17:51:43 +0800 Subject: [PATCH] HDFS-13202. Fix the outdated javadocs in HAUtil. Contributed by Chao Sun. --- .../main/java/org/apache/hadoop/hdfs/HAUtil.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java index 1d294beb50..fd63b698c9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java @@ -147,10 +147,10 @@ public static String getNameNodeIdFromAddress(final Configuration conf, } /** - * Get the NN ID of the other node in an HA setup. + * Get the NN ID of the other nodes in an HA setup. * * @param conf the configuration of this node - * @return the NN ID of the other node in this nameservice + * @return a list of NN IDs of other nodes in this nameservice */ public static List getNameNodeIdOfOtherNodes(Configuration conf, String nsId) { Preconditions.checkArgument(nsId != null, @@ -183,26 +183,26 @@ public static List getNameNodeIdOfOtherNodes(Configuration conf, String } /** - * Given the configuration for this node, return a Configuration object for - * the other node in an HA setup. + * Given the configuration for this node, return a list of configurations + * for the other nodes in an HA setup. * * @param myConf the configuration of this node - * @return the configuration of the other node in an HA setup + * @return a list of configuration of other nodes in an HA setup */ public static List getConfForOtherNodes( Configuration myConf) { String nsId = DFSUtil.getNamenodeNameServiceId(myConf); - List otherNn = getNameNodeIdOfOtherNodes(myConf, nsId); + List otherNodes = getNameNodeIdOfOtherNodes(myConf, nsId); // Look up the address of the other NNs - List confs = new ArrayList(otherNn.size()); + List confs = new ArrayList(otherNodes.size()); myConf = new Configuration(myConf); // unset independent properties for (String idpKey : HA_SPECIAL_INDEPENDENT_KEYS) { myConf.unset(idpKey); } - for (String nn : otherNn) { + for (String nn : otherNodes) { Configuration confForOtherNode = new Configuration(myConf); NameNode.initializeGenericKeys(confForOtherNode, nsId, nn); confs.add(confForOtherNode);