Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14722

RBF: GetMountPointStatus should return mountTable information when getFileInfoAll throw IOException

    XMLWordPrintableJSON

    Details

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

      Description

      When IOException in getFileInfoAll, we should return the mountTable informations instead of super information.

      Code like:

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

        Attachments

        1. HDFS-14722-trunk-001.patch
          2 kB
          xuzq
        2. HDFS-14722-trunk-002.patch
          7 kB
          xuzq
        3. HDFS-14722-trunk-003.patch
          7 kB
          xuzq
        4. HDFS-14722-trunk-004.patch
          6 kB
          xuzq
        5. HDFS-14722-trunk-005.patch
          5 kB
          xuzq
        6. HDFS-14722-trunk-006.patch
          5 kB
          xuzq
        7. HDFS-14722-trunk-bug-discuss.patch
          9 kB
          xuzq

          Activity

            People

            • Assignee:
              xuzq_zander xuzq
              Reporter:
              xuzq_zander xuzq
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: