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

Balancer should handle fs.defaultFS trailing slash in HA

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: balancer & mover
    • Labels:
      None
    • Environment:

      Centos 6.6

      Description

      When balancer is launched, it should test if there is already a /system/balancer.id file in HDFS.

      When the file doesn't exist, the balancer don't want to run :

      15/08/14 16:35:12 INFO balancer.Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox]
      15/08/14 16:35:12 INFO balancer.Balancer: parameters = Balancer.Parameters[BalancingPolicy.Node, threshold=10.0, max idle iteration = 5, number of nodes to be excluded = 0, number of nodes to be included = 0]
      Time Stamp Iteration# Bytes Already Moved Bytes Left To Move Bytes Being Moved
      15/08/14 16:35:14 INFO balancer.KeyManager: Block token params received from NN: update interval=10hrs, 0sec, token lifetime=10hrs, 0sec
      15/08/14 16:35:14 INFO block.BlockTokenSecretManager: Setting block keys
      15/08/14 16:35:14 INFO balancer.KeyManager: Update block keys every 2hrs, 30mins, 0sec
      15/08/14 16:35:14 INFO block.BlockTokenSecretManager: Setting block keys
      15/08/14 16:35:14 INFO balancer.KeyManager: Block token params received from NN: update interval=10hrs, 0sec, token lifetime=10hrs, 0sec
      15/08/14 16:35:14 INFO block.BlockTokenSecretManager: Setting block keys
      15/08/14 16:35:14 INFO balancer.KeyManager: Update block keys every 2hrs, 30mins, 0sec
      java.io.IOException: Another Balancer is running.. Exiting ...
      Aug 14, 2015 4:35:14 PM Balancing took 2.408 seconds

      Looking at the audit log file when trying to run the balancer, the balancer create the /system/balancer.id and then delete it on exiting ...

      2015-08-14 16:37:45,844 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=getfileinfo src=/system/balancer.id dst=null perm=null proto=rpc
      2015-08-14 16:37:45,900 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=create src=/system/balancer.id dst=null perm=hdfs:hadoop:rw-r----- proto=rpc
      2015-08-14 16:37:45,919 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=getfileinfo src=/system/balancer.id dst=null perm=null proto=rpc
      2015-08-14 16:37:46,090 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=getfileinfo src=/system/balancer.id dst=null perm=null proto=rpc
      2015-08-14 16:37:46,112 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=getfileinfo src=/system/balancer.id dst=null perm=null proto=rpc
      2015-08-14 16:37:46,117 INFO FSNamesystem.audit: allowed=true ugi=hdfs@SANDBOX.HADOOP (auth:KERBEROS) ip=/x.x.x.x cmd=delete src=/system/balancer.id dst=null perm=null proto=rpc

      The error seems to be located in org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java

      The function checkAndMarkRunning return null even if the /system/balancer.id doesn't exist before entering this function; if it exists, then it is deleted and the balancer exit with the same error.


      private OutputStream checkAndMarkRunning() throws IOException {
      try {
      if (fs.exists(idPath))

      { // try appending to it so that it will fail fast if another balancer is // running. IOUtils.closeStream(fs.append(idPath)); fs.delete(idPath, true); }

      final FSDataOutputStream fsout = fs.create(idPath, false);
      // mark balancer idPath to be deleted during filesystem closure
      fs.deleteOnExit(idPath);
      if (write2IdFile)

      { fsout.writeBytes(InetAddress.getLocalHost().getHostName()); fsout.hflush(); }

      return fsout;
      } catch(RemoteException e) {
      if(AlreadyBeingCreatedException.class.getName().equals(e.getClassName()))

      { return null; }

      else

      { throw e; }

      }
      }


      Regards

      1. HDFS-8897-branch-2.006.patch
        11 kB
        John Zhuge
      2. HDFS-8897.006.patch
        11 kB
        John Zhuge
      3. HDFS-8897.005.patch
        8 kB
        John Zhuge
      4. HDFS-8897.004.patch
        7 kB
        John Zhuge
      5. HDFS-8897.003.patch
        7 kB
        John Zhuge
      6. HDFS-8897.002.patch
        6 kB
        John Zhuge
      7. HDFS-8897.001.patch
        3 kB
        John Zhuge

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #10260 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10260/)
          HDFS-8897. Balancer should handle fs.defaultFS trailing slash in HA. (weichiu: rev a428d4f50e8caf553fb19a26200ec58f0b83da5d)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUtil.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #10260 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10260/ ) HDFS-8897 . Balancer should handle fs.defaultFS trailing slash in HA. (weichiu: rev a428d4f50e8caf553fb19a26200ec58f0b83da5d) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUtil.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
          Hide
          jzhuge John Zhuge added a comment -

          Thanks Wei-Chiu Chuang for the review and commit !

          Show
          jzhuge John Zhuge added a comment - Thanks Wei-Chiu Chuang for the review and commit !
          Hide
          jojochuang Wei-Chiu Chuang added a comment -

          Committed it to trunk, branch-2 and branch-2.8. Thanks John Zhuge for contributing the patch and LINTE for reporting the bug!

          Show
          jojochuang Wei-Chiu Chuang added a comment - Committed it to trunk, branch-2 and branch-2.8. Thanks John Zhuge for contributing the patch and LINTE for reporting the bug!
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 13m 38s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 8m 52s branch-2 passed
          +1 compile 0m 39s branch-2 passed with JDK v1.8.0_101
          +1 compile 0m 44s branch-2 passed with JDK v1.7.0_101
          +1 checkstyle 0m 29s branch-2 passed
          +1 mvnsite 0m 54s branch-2 passed
          +1 mvneclipse 0m 19s branch-2 passed
          +1 findbugs 1m 59s branch-2 passed
          +1 javadoc 0m 56s branch-2 passed with JDK v1.8.0_101
          +1 javadoc 1m 37s branch-2 passed with JDK v1.7.0_101
          +1 mvninstall 0m 46s the patch passed
          +1 compile 0m 36s the patch passed with JDK v1.8.0_101
          +1 javac 0m 36s the patch passed
          +1 compile 0m 41s the patch passed with JDK v1.7.0_101
          +1 javac 0m 41s the patch passed
          +1 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 132 unchanged - 6 fixed = 132 total (was 138)
          +1 mvnsite 0m 50s the patch passed
          +1 mvneclipse 0m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 2m 10s the patch passed
          +1 javadoc 0m 52s the patch passed with JDK v1.8.0_101
          +1 javadoc 1m 34s the patch passed with JDK v1.7.0_101
          +1 unit 47m 25s hadoop-hdfs in the patch passed with JDK v1.7.0_101.
          +1 asflicense 0m 24s The patch does not generate ASF License warnings.
          138m 13s



          Reason Tests
          JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.snapshot.TestSnapshotDeletion



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:b59b8b7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823139/HDFS-8897-branch-2.006.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 6b7fbae5c987 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision branch-2 / 01fc975
          Default Java 1.7.0_101
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_101
          findbugs v3.0.0
          JDK v1.7.0_101 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16397/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16397/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 13m 38s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 52s branch-2 passed +1 compile 0m 39s branch-2 passed with JDK v1.8.0_101 +1 compile 0m 44s branch-2 passed with JDK v1.7.0_101 +1 checkstyle 0m 29s branch-2 passed +1 mvnsite 0m 54s branch-2 passed +1 mvneclipse 0m 19s branch-2 passed +1 findbugs 1m 59s branch-2 passed +1 javadoc 0m 56s branch-2 passed with JDK v1.8.0_101 +1 javadoc 1m 37s branch-2 passed with JDK v1.7.0_101 +1 mvninstall 0m 46s the patch passed +1 compile 0m 36s the patch passed with JDK v1.8.0_101 +1 javac 0m 36s the patch passed +1 compile 0m 41s the patch passed with JDK v1.7.0_101 +1 javac 0m 41s the patch passed +1 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 132 unchanged - 6 fixed = 132 total (was 138) +1 mvnsite 0m 50s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 10s the patch passed +1 javadoc 0m 52s the patch passed with JDK v1.8.0_101 +1 javadoc 1m 34s the patch passed with JDK v1.7.0_101 +1 unit 47m 25s hadoop-hdfs in the patch passed with JDK v1.7.0_101. +1 asflicense 0m 24s The patch does not generate ASF License warnings. 138m 13s Reason Tests JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.snapshot.TestSnapshotDeletion Subsystem Report/Notes Docker Image:yetus/hadoop:b59b8b7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823139/HDFS-8897-branch-2.006.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 6b7fbae5c987 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2 / 01fc975 Default Java 1.7.0_101 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_101 findbugs v3.0.0 JDK v1.7.0_101 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16397/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16397/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch branch-2.006:

          • Backport to branch-2 with minor conflicts
          Show
          jzhuge John Zhuge added a comment - Patch branch-2.006: Backport to branch-2 with minor conflicts
          Hide
          jzhuge John Zhuge added a comment -
          Show
          jzhuge John Zhuge added a comment - Sure Wei-Chiu Chuang .
          Hide
          jojochuang Wei-Chiu Chuang added a comment -

          +1
          Test failures are unrelated. Will commit by end of today.

          John Zhuge can you also provide a branch-2 patch? There are some conflicts when I tried to cherry pick the commit.

          Show
          jojochuang Wei-Chiu Chuang added a comment - +1 Test failures are unrelated. Will commit by end of today. John Zhuge can you also provide a branch-2 patch? There are some conflicts when I tried to cherry pick the commit.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 11s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 6m 53s trunk passed
          +1 compile 0m 45s trunk passed
          +1 checkstyle 0m 28s trunk passed
          +1 mvnsite 0m 50s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 41s trunk passed
          +1 javadoc 0m 54s trunk passed
          +1 mvninstall 0m 47s the patch passed
          +1 compile 0m 41s the patch passed
          +1 javac 0m 41s the patch passed
          +1 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 130 unchanged - 7 fixed = 130 total (was 137)
          +1 mvnsite 0m 48s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 48s the patch passed
          +1 javadoc 0m 52s the patch passed
          -1 unit 56m 45s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          75m 38s



          Reason Tests
          Failed junit tests hadoop.tracing.TestTracing
            hadoop.security.TestRefreshUserMappings



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822855/HDFS-8897.006.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 6e6d12c17333 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / c4b77ae
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16367/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16367/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16367/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 11s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 53s trunk passed +1 compile 0m 45s trunk passed +1 checkstyle 0m 28s trunk passed +1 mvnsite 0m 50s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 41s trunk passed +1 javadoc 0m 54s trunk passed +1 mvninstall 0m 47s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed +1 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 130 unchanged - 7 fixed = 130 total (was 137) +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 48s the patch passed +1 javadoc 0m 52s the patch passed -1 unit 56m 45s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 75m 38s Reason Tests Failed junit tests hadoop.tracing.TestTracing   hadoop.security.TestRefreshUserMappings Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822855/HDFS-8897.006.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 6e6d12c17333 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / c4b77ae Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/16367/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16367/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16367/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 006:

          • Fix checkstyle

          Unit test failures in 005 were unrelated.

          Show
          jzhuge John Zhuge added a comment - Patch 006: Fix checkstyle Unit test failures in 005 were unrelated.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 15s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 7m 11s trunk passed
          +1 compile 0m 45s trunk passed
          +1 checkstyle 0m 27s trunk passed
          +1 mvnsite 0m 51s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 41s trunk passed
          +1 javadoc 0m 55s trunk passed
          +1 mvninstall 0m 49s the patch passed
          +1 compile 0m 42s the patch passed
          +1 javac 0m 42s the patch passed
          -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 130 unchanged - 7 fixed = 131 total (was 137)
          +1 mvnsite 0m 49s the patch passed
          +1 mvneclipse 0m 9s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 50s the patch passed
          +1 javadoc 0m 57s the patch passed
          -1 unit 77m 40s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          97m 20s



          Reason Tests
          Failed junit tests hadoop.tracing.TestTracing
            hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl
            hadoop.security.TestRefreshUserMappings



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822759/HDFS-8897.005.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux d49ecbadf827 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 82c9e06
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16356/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16356/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16356/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16356/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 11s trunk passed +1 compile 0m 45s trunk passed +1 checkstyle 0m 27s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 41s trunk passed +1 javadoc 0m 55s trunk passed +1 mvninstall 0m 49s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 130 unchanged - 7 fixed = 131 total (was 137) +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 50s the patch passed +1 javadoc 0m 57s the patch passed -1 unit 77m 40s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 97m 20s Reason Tests Failed junit tests hadoop.tracing.TestTracing   hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl   hadoop.security.TestRefreshUserMappings Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822759/HDFS-8897.005.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux d49ecbadf827 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 82c9e06 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16356/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/16356/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16356/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16356/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 005:

          • Fix checkstyle
          Show
          jzhuge John Zhuge added a comment - Patch 005: Fix checkstyle
          Hide
          jzhuge John Zhuge added a comment -

          Test failures are unrelated.

          Show
          jzhuge John Zhuge added a comment - Test failures are unrelated.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 11s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 7m 5s trunk passed
          +1 compile 0m 47s trunk passed
          +1 checkstyle 0m 28s trunk passed
          +1 mvnsite 0m 54s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 45s trunk passed
          +1 javadoc 0m 57s trunk passed
          +1 mvninstall 0m 53s the patch passed
          +1 compile 0m 44s the patch passed
          +1 javac 0m 45s the patch passed
          -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 5 new + 136 unchanged - 1 fixed = 141 total (was 137)
          +1 mvnsite 0m 52s the patch passed
          +1 mvneclipse 0m 9s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 54s the patch passed
          +1 javadoc 0m 52s the patch passed
          -1 unit 61m 53s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          81m 36s



          Reason Tests
          Failed junit tests hadoop.tracing.TestTracing
            hadoop.security.TestRefreshUserMappings



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822745/HDFS-8897.004.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 2c973faf9bb5 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 8f9b618
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16355/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16355/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16355/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16355/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 11s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 5s trunk passed +1 compile 0m 47s trunk passed +1 checkstyle 0m 28s trunk passed +1 mvnsite 0m 54s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 45s trunk passed +1 javadoc 0m 57s trunk passed +1 mvninstall 0m 53s the patch passed +1 compile 0m 44s the patch passed +1 javac 0m 45s the patch passed -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 5 new + 136 unchanged - 1 fixed = 141 total (was 137) +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 54s the patch passed +1 javadoc 0m 52s the patch passed -1 unit 61m 53s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 81m 36s Reason Tests Failed junit tests hadoop.tracing.TestTracing   hadoop.security.TestRefreshUserMappings Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12822745/HDFS-8897.004.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 2c973faf9bb5 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 8f9b618 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16355/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/16355/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16355/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16355/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 004:

          • Fix checkstyle
          • Extract reusable code into trimUri
          Show
          jzhuge John Zhuge added a comment - Patch 004: Fix checkstyle Extract reusable code into trimUri
          Hide
          jzhuge John Zhuge added a comment - - edited

          Unit test errors were unrelated. They were likely caused by test environment. The failed tests pass locally.

          Show
          jzhuge John Zhuge added a comment - - edited Unit test errors were unrelated. They were likely caused by test environment. The failed tests pass locally.
          Hide
          jzhuge John Zhuge added a comment -

          Look into checkstyle and unit test errors.

          Show
          jzhuge John Zhuge added a comment - Look into checkstyle and unit test errors.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 14s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 6m 46s trunk passed
          +1 compile 0m 43s trunk passed
          +1 checkstyle 0m 28s trunk passed
          +1 mvnsite 0m 51s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 42s trunk passed
          +1 javadoc 0m 55s trunk passed
          +1 mvninstall 0m 48s the patch passed
          +1 compile 0m 41s the patch passed
          +1 javac 0m 41s the patch passed
          -0 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 3 new + 136 unchanged - 1 fixed = 139 total (was 137)
          +1 mvnsite 0m 47s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 45s the patch passed
          +1 javadoc 0m 52s the patch passed
          -1 unit 71m 53s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          90m 46s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer
            hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped
            hadoop.hdfs.TestRollingUpgrade



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820764/HDFS-8897.003.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 1a4cbedc70fb 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / ef501b1
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16268/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16268/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16268/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16268/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 46s trunk passed +1 compile 0m 43s trunk passed +1 checkstyle 0m 28s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 42s trunk passed +1 javadoc 0m 55s trunk passed +1 mvninstall 0m 48s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed -0 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 3 new + 136 unchanged - 1 fixed = 139 total (was 137) +1 mvnsite 0m 47s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 45s the patch passed +1 javadoc 0m 52s the patch passed -1 unit 71m 53s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 90m 46s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped   hadoop.hdfs.TestRollingUpgrade Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820764/HDFS-8897.003.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 1a4cbedc70fb 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / ef501b1 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16268/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/16268/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16268/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16268/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 003:

          • Fix checkstyle
          • Only sanitize defaultUri for hdfs scheme
          • Move new test code into a separate method because the original method is too long
          Show
          jzhuge John Zhuge added a comment - Patch 003: Fix checkstyle Only sanitize defaultUri for hdfs scheme Move new test code into a separate method because the original method is too long
          Hide
          jzhuge John Zhuge added a comment - - edited

          Fixing checkstyle and unt test failures.

          Show
          jzhuge John Zhuge added a comment - - edited Fixing checkstyle and unt test failures.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 17s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 8m 42s trunk passed
          +1 compile 0m 59s trunk passed
          +1 checkstyle 0m 32s trunk passed
          +1 mvnsite 1m 13s trunk passed
          +1 mvneclipse 0m 14s trunk passed
          +1 findbugs 2m 4s trunk passed
          +1 javadoc 1m 0s trunk passed
          +1 mvninstall 1m 1s the patch passed
          +1 compile 1m 0s the patch passed
          +1 javac 1m 0s the patch passed
          -0 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 135 unchanged - 2 fixed = 136 total (was 137)
          +1 mvnsite 0m 52s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 48s the patch passed
          +1 javadoc 0m 56s the patch passed
          -1 unit 76m 46s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          99m 38s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.mover.TestMover
            hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
            hadoop.hdfs.server.balancer.TestBalancerWithMultipleNameNodes



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820683/HDFS-8897.002.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 0762b310c5a0 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 414fbfa
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16234/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16234/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16234/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16234/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 17s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 42s trunk passed +1 compile 0m 59s trunk passed +1 checkstyle 0m 32s trunk passed +1 mvnsite 1m 13s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 2m 4s trunk passed +1 javadoc 1m 0s trunk passed +1 mvninstall 1m 1s the patch passed +1 compile 1m 0s the patch passed +1 javac 1m 0s the patch passed -0 checkstyle 0m 24s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 135 unchanged - 2 fixed = 136 total (was 137) +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 48s the patch passed +1 javadoc 0m 56s the patch passed -1 unit 76m 46s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 99m 38s Reason Tests Failed junit tests hadoop.hdfs.server.mover.TestMover   hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.balancer.TestBalancerWithMultipleNameNodes Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820683/HDFS-8897.002.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 0762b310c5a0 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 414fbfa Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16234/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/16234/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16234/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16234/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 002:

          • Fix DFSUtil#getNameServiceUris to sanitize fs.defaultFS property
          • Update a unit test in TestDFSUtil
          Show
          jzhuge John Zhuge added a comment - Patch 002: Fix DFSUtil#getNameServiceUris to sanitize fs.defaultFS property Update a unit test in TestDFSUtil
          Hide
          jzhuge John Zhuge added a comment -

          Another criteria to hit this issue is that property dfs.namenode.rpc-address can not be set.

          Show
          jzhuge John Zhuge added a comment - Another criteria to hit this issue is that property dfs.namenode.rpc-address can not be set.
          Hide
          jojochuang Wei-Chiu Chuang added a comment -

          If we add the code to start the balancer with that namenodes, you will see Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox] without the fix.

          I see. Please move that code to where balancer is not yet start.

          This case is tricky because {fs.defaultFS}} is valid but with a trailing slash, everything else works fine except Balancer, otherwise users would have detected the problem much earlier in other ways.

          It looks to me that whenever the URI fs.defaultFS is used, the consumer of the URI takes either the scheme, the authority, the host or the port of the URI, but the path component is ignored, at least when the scheme is hdfs.

          Show
          jojochuang Wei-Chiu Chuang added a comment - If we add the code to start the balancer with that namenodes, you will see Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox] without the fix. I see. Please move that code to where balancer is not yet start. This case is tricky because {fs.defaultFS}} is valid but with a trailing slash, everything else works fine except Balancer, otherwise users would have detected the problem much earlier in other ways. It looks to me that whenever the URI fs.defaultFS is used, the consumer of the URI takes either the scheme, the authority, the host or the port of the URI, but the path component is ignored, at least when the scheme is hdfs.
          Hide
          jzhuge John Zhuge added a comment -

          Wei-Chiu Chuang Thanks for the review.

          I played with the test case a bit, but it did not reproduce the exact symptom. (i.e. showing two namenodes in the log like

          The added section in test case only makes sure the namenodes collection passed to Balancer.run has the same number of entries as the normal test before. If we add the code to start the balancer with that namenodes, you will see Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox] without the fix. You think that is necessary, we can add it.

          if fs.defaultFS is hdfs://sandbox/abc

          This case is tricky because {fs.defaultFS}} is valid but with a trailing slash, everything else works fine except Balancer, otherwise users would have detected the problem much earlier in other ways.

          Show
          jzhuge John Zhuge added a comment - Wei-Chiu Chuang Thanks for the review. I played with the test case a bit, but it did not reproduce the exact symptom. (i.e. showing two namenodes in the log like The added section in test case only makes sure the namenodes collection passed to Balancer.run has the same number of entries as the normal test before. If we add the code to start the balancer with that namenodes , you will see Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox] without the fix. You think that is necessary, we can add it. if fs.defaultFS is hdfs://sandbox/abc This case is tricky because {fs.defaultFS}} is valid but with a trailing slash, everything else works fine except Balancer, otherwise users would have detected the problem much earlier in other ways.
          Hide
          jojochuang Wei-Chiu Chuang added a comment -

          Hi John Zhuge thanks for contributing the patch. I reviewed your patch and also did a small investigation. Below is my comment:

          • I played with the test case a bit, but it did not reproduce the exact symptom. (i.e. showing two namenodes in the log like
            balancer.Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox]

            ). I suggest you could change HATestUtil#setFailoverConfigurations. This method is called by the test case and it updates fs.defaultFS before Balancer is run. For example, you could update the last line in the method like this:

            conf.set("fs.defaultFS", "hdfs://" + logicalName + "/");
            

            With this change, I was able to reproduce the bug.

          • I think the fix could work, but it looks more like a hack. For example, it also looks invalid to me if fs.defaultFS is hdfs://sandbox/abc, but your fix wouldn't catch this case. I suggest a proper fix might be to remove the path component in the URI.

          Thanks again and I look forward to your feedback.

          Show
          jojochuang Wei-Chiu Chuang added a comment - Hi John Zhuge thanks for contributing the patch. I reviewed your patch and also did a small investigation. Below is my comment: I played with the test case a bit, but it did not reproduce the exact symptom. (i.e. showing two namenodes in the log like balancer.Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox] ). I suggest you could change HATestUtil#setFailoverConfigurations . This method is called by the test case and it updates fs.defaultFS before Balancer is run. For example, you could update the last line in the method like this: conf.set( "fs.defaultFS" , "hdfs: //" + logicalName + "/" ); With this change, I was able to reproduce the bug. I think the fix could work, but it looks more like a hack. For example, it also looks invalid to me if fs.defaultFS is hdfs://sandbox/abc , but your fix wouldn't catch this case. I suggest a proper fix might be to remove the path component in the URI. Thanks again and I look forward to your feedback.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 31s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 9m 41s trunk passed
          +1 compile 1m 1s trunk passed
          +1 checkstyle 0m 33s trunk passed
          +1 mvnsite 1m 7s trunk passed
          +1 mvneclipse 0m 15s trunk passed
          +1 findbugs 2m 11s trunk passed
          +1 javadoc 1m 9s trunk passed
          +1 mvninstall 1m 3s the patch passed
          +1 compile 0m 57s the patch passed
          +1 javac 0m 57s the patch passed
          +1 checkstyle 0m 30s the patch passed
          +1 mvnsite 1m 5s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 2m 15s the patch passed
          +1 javadoc 1m 3s the patch passed
          -1 unit 93m 15s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 37s The patch does not generate ASF License warnings.
          119m 5s



          Reason Tests
          Failed junit tests hadoop.hdfs.TestCrcCorruption
            hadoop.hdfs.server.datanode.TestDataNodeUUID
            hadoop.hdfs.security.TestDelegationTokenForProxyUser
            hadoop.cli.TestHDFSCLI
            hadoop.hdfs.server.namenode.TestEditLog
            hadoop.fs.TestSymlinkHdfsFileContext
          Timed out junit tests org.apache.hadoop.hdfs.TestLeaseRecovery2



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820238/HDFS-8897.001.patch
          JIRA Issue HDFS-8897
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux f27aca48ab6a 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / da6adf5
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/16195/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16195/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16195/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 31s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 9m 41s trunk passed +1 compile 1m 1s trunk passed +1 checkstyle 0m 33s trunk passed +1 mvnsite 1m 7s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 2m 11s trunk passed +1 javadoc 1m 9s trunk passed +1 mvninstall 1m 3s the patch passed +1 compile 0m 57s the patch passed +1 javac 0m 57s the patch passed +1 checkstyle 0m 30s the patch passed +1 mvnsite 1m 5s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 15s the patch passed +1 javadoc 1m 3s the patch passed -1 unit 93m 15s hadoop-hdfs in the patch failed. +1 asflicense 0m 37s The patch does not generate ASF License warnings. 119m 5s Reason Tests Failed junit tests hadoop.hdfs.TestCrcCorruption   hadoop.hdfs.server.datanode.TestDataNodeUUID   hadoop.hdfs.security.TestDelegationTokenForProxyUser   hadoop.cli.TestHDFSCLI   hadoop.hdfs.server.namenode.TestEditLog   hadoop.fs.TestSymlinkHdfsFileContext Timed out junit tests org.apache.hadoop.hdfs.TestLeaseRecovery2 Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12820238/HDFS-8897.001.patch JIRA Issue HDFS-8897 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f27aca48ab6a 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / da6adf5 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/16195/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16195/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16195/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jzhuge John Zhuge added a comment -

          Patch 001:

          • Remove the trailing slashes from defaultUri
          Show
          jzhuge John Zhuge added a comment - Patch 001: Remove the trailing slashes from defaultUri
          Hide
          gsbiju Biju Nair added a comment -

          Is there a way to submit a patch? We had the same issue on our clusters.

          Show
          gsbiju Biju Nair added a comment - Is there a way to submit a patch? We had the same issue on our clusters.
          Hide
          Alexandre LINTE LINTE added a comment -

          Xu Chen, I don't have the time to do it right now.
          At the moment I just modified my cluster configuration to avoid the error.

          Show
          Alexandre LINTE LINTE added a comment - Xu Chen , I don't have the time to do it right now. At the moment I just modified my cluster configuration to avoid the error.
          Hide
          xuchenCN Xu Chen added a comment -

          LINTE I was encounter this issue too , when I use hdfs balancer command , did you to do this patch ?

          Show
          xuchenCN Xu Chen added a comment - LINTE I was encounter this issue too , when I use hdfs balancer command , did you to do this patch ?
          Hide
          Alexandre LINTE LINTE added a comment -

          Thank you for your attention.
          In fact the balancer seems to look at 2 values :

          • fs.defaultFS
          • dfs.nameservices

          I had fs.defaultFS => hdfs://sandbox/ and dfs.nameservices => sandbox.
          I remove the / at the end of fs.defaultFS and it solves my error.

          Balancer should use only one of these values.

          Regards,

          Show
          Alexandre LINTE LINTE added a comment - Thank you for your attention. In fact the balancer seems to look at 2 values : fs.defaultFS dfs.nameservices I had fs.defaultFS => hdfs://sandbox/ and dfs.nameservices => sandbox. I remove the / at the end of fs.defaultFS and it solves my error. Balancer should use only one of these values. Regards,
          Hide
          rakeshr Rakesh R added a comment -

          My observation about the case is - Balancer is seeing two nameservice IDs but both are pointing to the same cluster, one with hdfs://sandbox/ slash and other hdfs://sandbox. While running balancer it will establish NameNodeConnectors and internally creates the idFilePath balancer.id to prevent simultaneous balancer operations. Since both nameservice IDs are pointing to the same cluster, for the first connector balancer.id creation will be succeeded and then again tries to create the balancer.id for the second connector it sees idFilePath already exists and resulting in failure. IMHO, we could find the reason for two occurrences of the same cluster ID to understand it well, right?

          It was working fine with hdfs 2.6.0.

          The validation to prevent the simultaneous balancing has modified in 2.7.1, thats the reason you are not seeing any problem with 2.6.0 version.

          Show
          rakeshr Rakesh R added a comment - My observation about the case is - Balancer is seeing two nameservice IDs but both are pointing to the same cluster, one with hdfs://sandbox/ slash and other hdfs://sandbox . While running balancer it will establish NameNodeConnectors and internally creates the idFilePath balancer.id to prevent simultaneous balancer operations. Since both nameservice IDs are pointing to the same cluster, for the first connector balancer.id creation will be succeeded and then again tries to create the balancer.id for the second connector it sees idFilePath already exists and resulting in failure. IMHO, we could find the reason for two occurrences of the same cluster ID to understand it well, right? It was working fine with hdfs 2.6.0. The validation to prevent the simultaneous balancing has modified in 2.7.1, thats the reason you are not seeing any problem with 2.6.0 version.
          Hide
          Alexandre LINTE LINTE added a comment -

          Hi,

          Below a part of hdfs-site.xml, namenode HA is used, maybe the origin for this issue ?
          It was working fine with hdfs 2.6.0.


          <property>
          <name>dfs.nameservices</name>
          <value>sandbox</value>
          </property>

          <property>
          <name>dfs.ha.namenodes.sandbox</name>
          <value>nn1,nn2</value>
          </property>

          Show
          Alexandre LINTE LINTE added a comment - Hi, Below a part of hdfs-site.xml, namenode HA is used, maybe the origin for this issue ? It was working fine with hdfs 2.6.0. — <property> <name>dfs.nameservices</name> <value>sandbox</value> </property> <property> <name>dfs.ha.namenodes.sandbox</name> <value>nn1,nn2</value> </property> —
          Hide
          rakeshr Rakesh R added a comment -

          I could see hdfs://sandbox appears two times

          15/08/14 16:35:12 INFO balancer.Balancer: namenodes = [hdfs://sandbox/, hdfs://sandbox]

          Is that duplicate entries? am I miss anything?

          Show
          rakeshr Rakesh R added a comment - I could see hdfs://sandbox appears two times 15/08/14 16:35:12 INFO balancer.Balancer: namenodes = [hdfs: //sandbox/, hdfs://sandbox] Is that duplicate entries? am I miss anything?
          Hide
          rakeshr Rakesh R added a comment -

          Hi LINTE, Thanks for reporting this. Jira description is confusing a bit, could you please give more details about your test scenario and the expected output.

          Show
          rakeshr Rakesh R added a comment - Hi LINTE , Thanks for reporting this. Jira description is confusing a bit, could you please give more details about your test scenario and the expected output.

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              Alexandre LINTE LINTE
            • Votes:
              1 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development