Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change

      Description

      FileStatus implements Comparable interface without type, so Collections.binarySearch do not work for a FileStatus list. This changes the interface to require FileStatus. See also HADOOP-14683.

      1. HADOOP-12209.patch
        5 kB
        Yong Zhang
      2. HADOOP-12209.patch
        5 kB
        Yong Zhang

        Issue Links

          Activity

          Hide
          ajisakaa Akira Ajisaka added a comment -

          This broke HADOOP-14683. Can we revert this from branch-2, branch-2.8, and branch-2.8.2?

          Show
          ajisakaa Akira Ajisaka added a comment - This broke HADOOP-14683 . Can we revert this from branch-2, branch-2.8, and branch-2.8.2?
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #252 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/252/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #252 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/252/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2190 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2190/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2190 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2190/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #993 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/993/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #993 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/993/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #263 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/263/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #263 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/263/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2208 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2208/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2208 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2208/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #259 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/259/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #259 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/259/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8184 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8184/)
          HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8184 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8184/ ) HADOOP-12209 Comparable type should be in FileStatus. (Yong Zhang via stevel) (stevel: rev 9141e1aa16561e44f73e00b349735f530c94acc3) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocatedFileStatus.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFsLocatedFileStatus.java
          Hide
          stevel@apache.org Steve Loughran added a comment -

          +1, patch applied.

          There will be problems if the path is null, but as HADOOP-6796 concluded, "don't do that"

          Show
          stevel@apache.org Steve Loughran added a comment - +1, patch applied. There will be problems if the path is null, but as HADOOP-6796 concluded, "don't do that"
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 16m 18s 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 33s There were no new javac warning messages.
          +1 javadoc 9m 32s There were no new javadoc warning messages.
          +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 16s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 22s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 17s Tests passed in hadoop-common.
              61m 7s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12744918/HADOOP-12209.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 1df39c1
          hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7251/artifact/patchprocess/testrun_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7251/testReport/
          Java 1.7.0_55
          uname Linux asf906.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-HADOOP-Build/7251/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 16m 18s 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 33s There were no new javac warning messages. +1 javadoc 9m 32s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 16s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 22s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 17s Tests passed in hadoop-common.     61m 7s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12744918/HADOOP-12209.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 1df39c1 hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7251/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7251/testReport/ Java 1.7.0_55 uname Linux asf906.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-HADOOP-Build/7251/console This message was automatically generated.
          Hide
          zhangyongxyz Yong Zhang added a comment -

          fix white space issue

          Show
          zhangyongxyz Yong Zhang added a comment - fix white space issue
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 16m 23s 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 33s There were no new javac warning messages.
          +1 javadoc 9m 36s There were no new javadoc warning messages.
          +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 4s There were no new checkstyle issues.
          -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 19s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 19s Tests passed in hadoop-common.
              61m 4s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12744471/HADOOP-12209.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 1df39c1
          whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/artifact/patchprocess/testrun_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/testReport/
          Java 1.7.0_55
          uname Linux asf906.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-HADOOP-Build/7248/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 16m 23s 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 33s There were no new javac warning messages. +1 javadoc 9m 36s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 4s There were no new checkstyle issues. -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 19s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 19s Tests passed in hadoop-common.     61m 4s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12744471/HADOOP-12209.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 1df39c1 whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7248/testReport/ Java 1.7.0_55 uname Linux asf906.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-HADOOP-Build/7248/console This message was automatically generated.
          Hide
          zhangyongxyz Yong Zhang added a comment -

          please review, thanks

          Show
          zhangyongxyz Yong Zhang added a comment - please review, thanks

            People

            • Assignee:
              zhangyongxyz Yong Zhang
              Reporter:
              zhangyongxyz Yong Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development