hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ayush Saxena (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-14722) RBF: GetMountPointStatus should return mountTable information when getFileInfoAll throw IOException
Date Sat, 24 Aug 2019 03:34:00 GMT

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

Ayush Saxena commented on HDFS-14722:
-------------------------------------

Committed to trunk.
Thanx [~xuzq_zander] for the contribution and [~elgoiri] for the review!!!

> 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,
HDFS-14722-trunk-004.patch, HDFS-14722-trunk-005.patch, HDFS-14722-trunk-006.patch, HDFS-14722-trunk-bug-discuss.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
(v8.3.2#803003)

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


Mime
View raw message