[ 
https://issues.apache.org/jira/browse/HDFS-12486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16172542#comment-16172542
 ] 

Hanisha Koneru commented on HDFS-12486:
---------------------------------------

Thanks for the improvement, [~bharatviswa].

A few comments:

- Even though {{DFS_NAMENODE_SHARED_EDITS_DIR_KEY}} is included in the Namenode 
specific keys, it should not be. It should have been a nameservice specific 
key. But changing that now would break backward-compatibility. So can you log a 
warning if the configuration has shared edits set as a namenode specific key 
like _dfs.namenode.shared.edits.dir.ns1.nn1_.

- In _DFSUtil#getJournalNodeAddresses_, there should be a check whether the 
shared edits value is a URI or not. For example, 
{quote}
*qjournal://journal1:9820;journal2:9820;journal3:9820}*                         
                is valid
*qjournal://journal1:9820;qjournal://journal2:9820;qjournal://journal3:9820*    
       is not valid
{quote}

- The below code snippet can be optimized using URI. The code in  
[[Util#getAddressesList]] does the same thing as below using URIs.
{code}
String[] journalList = journal.trim().replace("qjournal://", "").split(";");
for (String value : journalList) {
  if (value.contains("/")) {
    String[] addr = value.split("/");
    journalNodeList.add(getHostName(addr[0]));
  } else {
    journalNodeList.add(getHostName(value));
  }
}
{code}

- In _TestGetConf#testGetJournalNodes_, can we have valid shared.edit.dir 
values for testing.
For example, *qjournal://nn0:9820;qjournal://nn1:9820/ns1* is not a valid value 
for shared.edits.dir. It should instead be something like 
*qjournal://jn0:9820;jn1:9820;jn2:9820/ns1*

> GetConf to get journalnodeslist
> -------------------------------
>
>                 Key: HDFS-12486
>                 URL: https://issues.apache.org/jira/browse/HDFS-12486
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>         Attachments: HDFS-12486.01.patch, HDFS-12486.02.patch, 
> HDFS-12486.03.patch
>
>
> GetConf command to list journal nodes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to