You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Tianyin Xu (JIRA)" <ji...@apache.org> on 2016/01/25 11:12:39 UTC
[jira] [Created] (HDFS-9693) Trim the user config of
{{dfs.ha.namenode.id}}
Tianyin Xu created HDFS-9693:
--------------------------------
Summary: Trim the user config of {{dfs.ha.namenode.id}}
Key: HDFS-9693
URL: https://issues.apache.org/jira/browse/HDFS-9693
Project: Hadoop HDFS
Issue Type: Bug
Components: ha
Affects Versions: 2.7.1
Reporter: Tianyin Xu
Priority: Minor
In {{hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java}}, we trim the config value of parameter {{dfs.ha.namenode.id}} in one place but not the other.
{code}
public static String getNameNodeId(Configuration conf, String nsId) {
String namenodeId = conf.getTrimmed(DFS_HA_NAMENODE_ID_KEY);
...
{code}
{code}
public static List<String> getNameNodeIdOfOtherNodes(Configuration conf, String nsId) {
...
String myNNId = conf.get(DFSConfigKeys.DFS_HA_NAMENODE_ID_KEY);
...
{code}
The latter one would cause problem if the user's configs contains extra space.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)