XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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.

      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()));
      }
      

        Attachments

        1. HDFS-14756.002.patch
          3 kB
          Chen Zhang
        2. HDFS-14756.001.patch
          3 kB
          Chen Zhang

          Activity

            People

            • Assignee:
              zhangchen Chen Zhang
              Reporter:
              zhangchen Chen Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: