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

Jinglun edited comment on HDFS-14739 at 9/23/19 10:23 AM:
----------------------------------------------------------

Hi [~xuzq_zander], I ran into the same problem recently. The root cause is in 
RouterClientProtocol.getListing() it passes a broken child to 
getMountPointStatus(). The patchv03 RouterClientProtocol.getListing()#829~831 
makes sense to me, you pass the full path of child to it.

If I understand right, v03 RouterClientProtocol.getListing()#748~764 is used 
when there is no default namespace nor a / mount. For example:

/dir-0/dir-1 ns0->/dir

/dir-0/dir-2 ns1->/dir

If we list /dir-0, we will expect a result \{dir-1, dir-2}. So we must catch 
the IOException, or the exception will be thrown to the client. I think we 
should add a test case for this.

 

*Correct me if I'm wrong: if we list /dir-non-exist, we will expect an 
Exception rather than {}.* Because {} means /dir-non-exist is an empty dir. 
This case seems not handled in v03.  Here we need a test case.

 

About the unit test, I've make 
TestRouterMountTable.testMountTablePermissionsNoDest() stronger in HDFS-14867. 
Hope it can help.


was (Author: lijinglun):
Hi [~xuzq_zander], I ran into the same problem recently. The root cause is in 
RouterClientProtocol.getListing() it passes a broken child to 
getMountPointStatus(). The patchv03 RouterClientProtocol.getListing()#829~831 
makes sense to me, you pass the full path of child to it.

If I understand right, v03 RouterClientProtocol.getListing()#748~764 is used 
when there is no default namespace nor a / mount. Shouldn't we simply let it 
fail when there is no default and / mount ? I mean why we need to catch the 
IOException, could we just let it throw ?

About the unit test, I've make 
TestRouterMountTable.testMountTablePermissionsNoDest() stronger in HDFS-14867. 
Hope it can help, just for reference.

> RBF: LS command for mount point shows wrong owner and permission information.
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-14739
>                 URL: https://issues.apache.org/jira/browse/HDFS-14739
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: xuzq
>            Assignee: xuzq
>            Priority: Major
>         Attachments: HDFS-14739-trunk-001.patch, HDFS-14739-trunk-002.patch, 
> HDFS-14739-trunk-003.patch, image-2019-08-16-17-15-50-614.png, 
> image-2019-08-16-17-16-00-863.png, image-2019-08-16-17-16-34-325.png
>
>
> ||source||target namespace||destination||owner||group||permission||
> |/mnt|ns0|/mnt|mnt|mnt_group|755|
> |/mnt/test1|ns1|/mnt/test1|mnt_test1|mnt_test1_group|755|
> |/test1|ns1|/test1|test1|test1_group|755|
> When do getListing("/mnt"), the owner of  */mnt/test1* should be *mnt_test1* 
> instead of *test1* in result.
>  
> And if the mount table as blew, we should support getListing("/mnt") instead 
> of throw IOException when dfs.federation.router.default.nameservice.enable is 
> false.
> ||source||target namespace||destination||owner||group||permission||
> |/mnt/test1|ns0|/mnt/test1|test1|test1|755|
> |/mnt/test2|ns1|/mnt/test2|test2|test2|755|
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to