hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-14756) RBF: getQuotaUsage may ignore some folders
Date Wed, 21 Aug 2019 19:11:00 GMT

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

Hudson commented on HDFS-14756:
-------------------------------

FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #17161 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/17161/])
HDFS-14756. RBF: getQuotaUsage may ignore some folders. Contributed by (inigoiri: rev 93595febaa6673eea369911c3f7fcd75d4915dbc)
* (edit) hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java
* (edit) hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterQuota.java


> RBF: getQuotaUsage may ignore some folders
> ------------------------------------------
>
>                 Key: HDFS-14756
>                 URL: https://issues.apache.org/jira/browse/HDFS-14756
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Chen Zhang
>            Assignee: Chen Zhang
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: HDFS-14756.001.patch, HDFS-14756.002.patch
>
>
> {{getValidQuotaLocations}} want to filter duplicate subfolders, but it used wrong method
to determine the parent folder. In this logic, if we have 2 mountpoint like /miui and /miuiads,
then /miuiads will be ignored.
> {code:java}
> private List<RemoteLocation> getValidQuotaLocations(String path)
>     throws IOException {
>   final List<RemoteLocation> locations = getQuotaRemoteLocations(path);
>   // NameService -> Locations
>   ListMultimap<String, RemoteLocation> validLocations =
>       ArrayListMultimap.create();
>   for (RemoteLocation loc : locations) {
>     final String nsId = loc.getNameserviceId();
>     final Collection<RemoteLocation> dests = validLocations.get(nsId);
>     // Ensure the paths in the same nameservice is different.
>     // Do not include parent-child paths.
>     boolean isChildPath = false;
>     for (RemoteLocation d : dests) {
>       if (StringUtils.startsWith(loc.getDest(), d.getDest())) {
>         isChildPath = true;
>         break;
>       }
>     }
>     if (!isChildPath) {
>       validLocations.put(nsId, loc);
>     }
>   }
>   return Collections
>       .unmodifiableList(new ArrayList<>(validLocations.values()));
> }
> {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