Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3690

BlockPlacementPolicyDefault incorrectly casts LOG

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The hadoop-tools tests, eg TestCopyListing, fails with

      Caused by: java.lang.ClassCastException: org.apache.commons.logging.impl.SimpleLog cannot be cast to org.apache.commons.logging.impl.Log4JLogger
              at org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicyDefault.<clinit>(BlockPlacementPolicyDefault.java:55)
      

      caused by this cast

        private static final String enableDebugLogging =
          "For more information, please enable DEBUG log level on "
          + ((Log4JLogger)LOG).getLogger().getName();
      
      1. hdfs-3690.txt
        2 kB
        Eli Collins

        Issue Links

          Activity

          Hide
          Eli Collins added a comment -

          Patch attached. I think it's sufficient for the debug message to just indicate the default policy class since the others don't have loggers.

          Show
          Eli Collins added a comment - Patch attached. I think it's sufficient for the debug message to just indicate the default policy class since the others don't have loggers.
          Hide
          Eli Collins added a comment -

          Verified this unbreaks the TestCopyFiles test.

          Show
          Eli Collins added a comment - Verified this unbreaks the TestCopyFiles test.
          Hide
          Aaron T. Myers added a comment -

          +1

          Show
          Aaron T. Myers added a comment - +1
          Hide
          Eli Collins added a comment -

          Thanks for the review ATM. Committing this since it gets the tests (not run by test-patch) back to green.

          Show
          Eli Collins added a comment - Thanks for the review ATM. Committing this since it gets the tests (not run by test-patch) back to green.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2505 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2505/)
          HDFS-3690. BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2505 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2505/ ) HDFS-3690 . BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2570 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2570/)
          HDFS-3690. BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576)

          Result = SUCCESS
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2570 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2570/ ) HDFS-3690 . BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2526 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2526/)
          HDFS-3690. BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2526 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2526/ ) HDFS-3690 . BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1110 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1110/)
          HDFS-3690. BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1110 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1110/ ) HDFS-3690 . BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1142 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1142/)
          HDFS-3690. BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576)

          Result = FAILURE
          eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1142 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1142/ ) HDFS-3690 . BlockPlacementPolicyDefault incorrectly casts LOG. Contributed by Eli Collins (Revision 1363576) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1363576 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java

            People

            • Assignee:
              Eli Collins
              Reporter:
              Eli Collins
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development