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

TestDatanodeLayoutUpgrade fails on Windows.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      TestDatanodeLayoutUpgrade fails on Windows due to some Linux-specific file system path handling and incorrect handling of hard links unpacked from a tarball.

        Issue Links

          Activity

          Hide
          cnauroth Chris Nauroth added a comment -

          Here is a patch correcting the 2 problems:

          1. The test code built the test data directories using string concatenation. It used File.separator, but at this point, test.build.data has forward slashes instead of back slashes. Passing through a File instance converts the slashes. Then, calling toURI gives a result in URI format, which avoids spurious warnings in the logs about not following proper URI syntax.
          2. The test works by unpacking a tarball containing blocks from an HDFS version before the use of block ID-based layout. On Windows, we don't call the tar utility and instead unpack tarballs in Java code. FileUtil#unpackEntries was not coded to be aware of hard links, so it would incorrectly handle them by creating a 0-byte file.
          Show
          cnauroth Chris Nauroth added a comment - Here is a patch correcting the 2 problems: The test code built the test data directories using string concatenation. It used File.separator , but at this point, test.build.data has forward slashes instead of back slashes. Passing through a File instance converts the slashes. Then, calling toURI gives a result in URI format, which avoids spurious warnings in the logs about not following proper URI syntax. The test works by unpacking a tarball containing blocks from an HDFS version before the use of block ID-based layout. On Windows, we don't call the tar utility and instead unpack tarballs in Java code. FileUtil#unpackEntries was not coded to be aware of hard links, so it would incorrectly handle them by creating a 0-byte file.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Patch LGTM +1, (non binding).

          Show
          brahmareddy Brahma Reddy Battula added a comment - Patch LGTM +1, (non binding).
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 19m 21s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
          +1 javac 7m 30s There were no new javac warning messages.
          +1 javadoc 9m 37s There were no new javadoc warning messages.
          +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 3m 21s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 34s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 5m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 56s Tests passed in hadoop-common.
          +1 hdfs tests 160m 51s Tests passed in hadoop-hdfs.
              231m 16s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12738171/HDFS-8554.001.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / b3ffa87
          hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11252/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11252/artifact/patchprocess/testrun_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11252/testReport/
          Java 1.7.0_55
          uname Linux asf909.gq1.ygridcore.net 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
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11252/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 19m 21s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 30s There were no new javac warning messages. +1 javadoc 9m 37s There were no new javadoc warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 3m 21s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 5m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 56s Tests passed in hadoop-common. +1 hdfs tests 160m 51s Tests passed in hadoop-hdfs.     231m 16s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12738171/HDFS-8554.001.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / b3ffa87 hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11252/artifact/patchprocess/testrun_hadoop-common.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11252/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11252/testReport/ Java 1.7.0_55 uname Linux asf909.gq1.ygridcore.net 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 Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11252/console This message was automatically generated.
          Hide
          xyao Xiaoyu Yao added a comment -

          The patch looks good to me. +1

          Show
          xyao Xiaoyu Yao added a comment - The patch looks good to me. +1
          Hide
          cnauroth Chris Nauroth added a comment -

          Brahma and Xiaoyu, thank you for your code reviews. I have committed this to trunk and branch-2.

          Show
          cnauroth Chris Nauroth added a comment - Brahma and Xiaoyu, thank you for your code reviews. I have committed this to trunk and branch-2.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #7989 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7989/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7989 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7989/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #223 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/223/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #223 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/223/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #953 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/953/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #953 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/953/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2151/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2151/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #212 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/212/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #212 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/212/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #221 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/221/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #221 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/221/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2169 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2169/)
          HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2169 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2169/ ) HDFS-8554 . TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth. (cnauroth: rev 0e80d51983942dca3348c8a8401bad3ecbaab010) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

            People

            • Assignee:
              cnauroth Chris Nauroth
              Reporter:
              cnauroth Chris Nauroth
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development