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

RBF: GetMountPointStatus should return mountTable information when getFileInfoAll throw IOException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • rbf
    • None
    • 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-bug-discuss.patch
          9 kB
          ZanderXu
        2. HDFS-14722-trunk-006.patch
          5 kB
          ZanderXu
        3. HDFS-14722-trunk-005.patch
          5 kB
          ZanderXu
        4. HDFS-14722-trunk-004.patch
          6 kB
          ZanderXu
        5. HDFS-14722-trunk-003.patch
          7 kB
          ZanderXu
        6. HDFS-14722-trunk-002.patch
          7 kB
          ZanderXu
        7. HDFS-14722-trunk-001.patch
          2 kB
          ZanderXu

        Activity

          People

            xuzq_zander ZanderXu
            xuzq_zander ZanderXu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: