You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ayush Saxena (JIRA)" <ji...@apache.org> on 2019/02/03 16:48:00 UTC

[jira] [Commented] (HDFS-13507) RBF: Remove update functionality from routeradmin's add cmd

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

Ayush Saxena commented on HDFS-13507:
-------------------------------------

Thanx Everyone for the discussion.

A minor doubt, Before this change we were able to add destinations multiple times using add so we were able to have a mount table entry with say of this layout

/src — pointing to destinations ns1-/tmp and ns2-/tmp2 by using the add command twice.

In the first part add /src ns1 /tmp and second time add /src ns2 /tmp2.

But now second time we will get exception and as I see at the implementation layer:
{code:java}
 public boolean addMount(String[] parameters, int i) throws IOException {
    // Mandatory parameters
    String mount = parameters[i++];
    String[] nss = parameters[i++].split(",");
    String dest = parameters[i++];
{code}
The command is designed to take multiple namespaces but single destination. It is capable of mounting /src to /tmp in both ns1 and ns2. We can't have different destination for the two namespaces.

Checked the update command too.

It even follows the same dynamic.
{code:java}
 public boolean updateMount(String[] parameters, int i) throws IOException {
    // Mandatory parameters
    String mount = parameters[i++];
    String[] nss = parameters[i++].split(",");
    String dest = parameters[i++];
{code}
Multiple namespaces and same destination. Using the update too shall not cover the above said use case. As using update in the present scenario will overwrite the actual destination and will be inline with what we are capable of doing with add.

Not sure what was the actual design; Whether the use case is a valid one or was just happened since the add command allowed us to outsmart the logic. Since a one time execution of the add command also didn't allow us this neither does the update command.

Pls correct if I am missing some part of discussion , logic or misunderstood the patch. :)

> RBF: Remove update functionality from routeradmin's add cmd
> -----------------------------------------------------------
>
>                 Key: HDFS-13507
>                 URL: https://issues.apache.org/jira/browse/HDFS-13507
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Wei Yan
>            Assignee: Gang Li
>            Priority: Minor
>              Labels: incompatible
>         Attachments: HDFS-13507-HDFS-13891.003.patch, HDFS-13507-HDFS-13891.004.patch, HDFS-13507.000.patch, HDFS-13507.001.patch, HDFS-13507.002.patch
>
>
> Follow up the discussion in HDFS-13326. We should remove the "update" functionality from routeradmin's add cmd, to make it consistent with RPC calls.
> Note that: this is an incompatible change.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org