[ https://issues.apache.org/jira/browse/HDFS-14722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16906194#comment-16906194 ]
xuzq commented on HDFS-14722: ----------------------------- Thanks [~ayushtkn] for the comment, and I attach a new patch, please review. In addition to this problem, I think there is some bugs in *getListing*, please check it. *Bug one*: ||source||target namespace||destination||owner||group||permission|| |/mnt/test1|ns0|/mnt/test1|test1|test1|755| |/mnt/test2|ns1|/mnt/test2|test2|test2|755| The mount entry as above, the code as blew should return result? And the result like: /mnt/test1 and /mnt/test2 {code:java} routerProtocol.getListing("/mnt", HdfsFileStatus.EMPTY_NAME, false){code} *Bug two:* ||source||target namespace||destination||owner||group||permission|| |/mnt|ns0|/mnt|mnt|mnt|755| |/mnt/test1|ns1|/mnt/test1|mnt|mnt|755| |/test1|ns2|/test1|test1|test1|755| The mount entry as above, the code as blew. The owner of *test1* should be mnt instead of test1? */test1* not the child of */mnt*, */mnt/test1* is the child of */mnt*. {code:java} routerProtocol.getListing("/mnt", HdfsFileStatus.EMPTY_NAME, false) {code} [~elgoiri] [~hexiaoqiao] [~ayushtkn] please confirm it. If these are bugs, I will create new Jira to fix them. > RBF: GetMountPointStatus should return mountTable information when > getFileInfoAll throw IOException > --------------------------------------------------------------------------------------------------- > > Key: HDFS-14722 > URL: https://issues.apache.org/jira/browse/HDFS-14722 > Project: Hadoop HDFS > Issue Type: Bug > Components: rbf > Reporter: xuzq > Assignee: xuzq > Priority: Major > Attachments: HDFS-14722-trunk-001.patch, HDFS-14722-trunk-002.patch, > HDFS-14722-trunk-003.patch > > > When IOException in getFileInfoAll, we should return the mountTable > informations instead of super information. > Code like: > {code:java} > // RouterClientProtocol#getMountPointStatus > try { > String mName = name.startsWith("/") ? name : "/" + name; > MountTableResolver mountTable = (MountTableResolver) subclusterResolver; > MountTable entry = mountTable.getMountPoint(mName); > if (entry != null) { > RemoteMethod method = new RemoteMethod("getFileInfo", > new Class<?>[] {String.class}, new RemoteParam()); > HdfsFileStatus fInfo = getFileInfoAll( > entry.getDestinations(), method, mountStatusTimeOut); > if (fInfo != null) { > permission = fInfo.getPermission(); > owner = fInfo.getOwner(); > group = fInfo.getGroup(); > childrenNum = fInfo.getChildrenNum(); > } else { > permission = entry.getMode(); > owner = entry.getOwnerName(); > group = entry.getGroupName(); > } > } > } catch (IOException e) { > LOG.error("Cannot get mount point: {}", e.getMessage()); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org