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

Ayush Saxena commented on HDFS-13835:
-------------------------------------

Thanx [~ramkumar] and [~elgoiri] for the discussion.

I guess 
bq. ./hdfs dfsrouteradmin -update /apps ns1,ns2 /tmp1,/tmp2 -order RANDOM  (And 
if i try to add any files to the mount entry /apps its giving errors)

This statement seems to be the culprit to me.

Firstly before update the scenerio was somewhat like:
/apps pointed to ns1-->/tmp1 and ns2-->/tmp2  (for which the actual 
destinations exists) 

After the update
/apps pointed to ns1-->/tmp1,/tmp2 and ns2-->/tmp1,/tmp2 (these destination 
doesn't exist)

The intention was to keep the dest pointing as before only but if we see in the 
update command::

While parsing the arguments we split the namespace only with COMMA not the 
destinations.

{code:java}
    String mount = parameters[i++];
    String[] nss = parameters[i++].split(",");
    String dest = parameters[i++];
{code}

And we consider the destination as one.while putting it in the destMap.The 
following logic in the code might give more clarity. 


{code:java}
   Map<String, String> destMap = new LinkedHashMap<>();
    for (String ns : nss) {
      destMap.put(ns, dest);
    }
{code}

The command is made in way such that if you give ns1,ns2 and dest as /tmp it 
will mount ns1-->/tmp and ns2-->/tmp.This seems quite obvious too if we provide 
more number of destinations than the namespace.how we will actually decide 
which one destinations goes to one NS.

So I guess ORDER change has nothing as such related which could stop creating a 
file if the destination exist.It deals just with the logic where to direct the 
request.Here the error message received also gives the HINT

bq.  No such file or directory:

Pls correct if I misunderstood something in the context :)



> RBF: Unable to add files after changing the order
> -------------------------------------------------
>
>                 Key: HDFS-13835
>                 URL: https://issues.apache.org/jira/browse/HDFS-13835
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: venkata ram kumar ch
>            Assignee: venkata ram kumar ch
>            Priority: Critical
>
> When  a mount point it pointing to multiple sub cluster by default the order 
> is HASH.
> But After changing the order from HASH to RANDOM i am unable to add files to 
> that mount point.



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

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

Reply via email to