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

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

Thanks for the update, [~bharatviswa]

- bq. The below code snippet can be optimized using URI. The code in 
[Util#getAddressesList] does the same thing as below using URIs.
I meant we can take the following code from _Util#getAddressesList_. We don't 
need to create the InetSocketAddress's here. (Sorry I was not clear).
This way we can also make sure that the format of the URI is correct.
{code}
        String authority = uri.getAuthority();
    Preconditions.checkArgument(authority != null && !authority.isEmpty(),
        "URI has no authority: " + uri);

    String[] parts = StringUtils.split(authority, ';');
    for (int i = 0; i < parts.length; i++) {
      parts[i] = parts[i].trim();
    }
{code}

- Not sure if we should check for the scheme to be _qjournal_ in 
_DFSUtil#getJournalNodeAddresses()_. This check is performed during 
_FSEditLog#initJournals_ anyway.

- In TestGetConf, for the _shared.edits.dir_ value, we should have a journal 
node address/hostname different from the namenodeIds.
It is confusing if the namenodeIds - nn0 and nn1 and journal node hostnames are 
the same.

- A nitpick: you can assign the JournalUri scheme and authority to a variable 
and add the journalId as and when required.
{code}
        String journalsBaseUri = "qjournal://node1:9820;node2:9820;node3:9820"
        .
        .
        conf.set(DFS_NAMENODE_SHARED_EDITS_DIR_KEY+".ns1",
        journalsBaseUri + "/ns1");
{code}
- Can you please rename _DFSUtil#journal_ to represent its intended function 
(for example, journalsUri).

> 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, HDFS-12486.04.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