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

RBF: The operation of renaming a multi-subcluster directory to a single-cluster directory should throw ioexception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • rbf
    • Reviewed

    Description

      The operation of renaming a multi-subcluster directory to a single-cluster directory may cause inconsistent behavior of the file system. This operation should throw exception to be reasonable.

      Examples are as follows:
      1. add  hash_all mount point   `hdfs dfsrouteradmin -add /tmp/foo subcluster1,subcluster2  /tmp/foo -order HASH_ALL`
      2. add   mount point   `hdfs dfsrouteradmin -add /user/foo subcluster1 /user/foo`
      3. mkdir dir for all subcluster.  ` hdfs dfs -mkdir /tmp/foo/123 `

      4. check dir and all subclusters will have dir `/tmp/foo/123`
      `hdfs dfs -ls /tmp/foo/` : will show dir `/tmp/foo/123`;
      `hdfs dfs -ls hdfs://subcluster1/tmp/foo/` : will show dir `hdfs://subcluster1/tmp/foo/123`;
      `hdfs dfs -ls hdfs://subcluster2/tmp/foo/` : will show dir `hdfs://subcluster2/tmp/foo/123`;

      5. rename `/tmp/foo/123` to `/user/foo/123`. The op will succeed. `hdfs dfs -mv /tmp/foo/123 /user/foo/123 `

      6. check dir again, rbf cluster still show dir `/tmp/foo/123`
      `hdfs dfs -ls /tmp/foo/` : will show dir `/tmp/foo/123`;
      `hdfs dfs -ls hdfs://subcluster1/tmp/foo/` : will no dirs;
      `hdfs dfs -ls hdfs://subcluster2/tmp/foo/` : will show dir `hdfs://subcluster2/tmp/foo/123`;

      The step 5 should throw exception.
       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              max2049 Max Xie
              max2049 Max Xie
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: