Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2260

Refactor BlockReader into an interface and implementation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: hdfs-client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      For the new block reader in HDFS-2129, or the local block reader in HDFS-347, we need to be able to support different implementations. This JIRA is to simply refactor the current BlockReader into an interface and an implementation.

      1. hdfs-2260.txt
        53 kB
        Todd Lipcon
      2. hdfs-2260.txt
        53 kB
        Todd Lipcon
      3. hdfs-2260.txt
        53 kB
        Todd Lipcon

        Issue Links

          Activity

          Hide
          Todd Lipcon added a comment -

          Fairly simple refactor, just using eclipse refactor tools.

          Show
          Todd Lipcon added a comment - Fairly simple refactor, just using eclipse refactor tools.
          Hide
          Eli Collins added a comment -

          Maybe call BlockReadDefault PacketBlockReader or RemoteBlockReader? "Default" implies policy and this a class with a specific implementation. Otherwise patch looks great.

          Show
          Eli Collins added a comment - Maybe call BlockReadDefault PacketBlockReader or RemoteBlockReader? "Default" implies policy and this a class with a specific implementation. Otherwise patch looks great.
          Hide
          Todd Lipcon added a comment -

          Renamed to RemoteBlockReader

          Show
          Todd Lipcon added a comment - Renamed to RemoteBlockReader
          Hide
          Eli Collins added a comment -

          +1 lgtm

          Show
          Eli Collins added a comment - +1 lgtm
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12490727/hdfs-2260.txt
          against trunk revision 1158933.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 15 new or modified tests.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1114//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12490727/hdfs-2260.txt against trunk revision 1158933. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 15 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1114//console This message is automatically generated.
          Hide
          Todd Lipcon added a comment -

          Rebased on trunk

          Show
          Todd Lipcon added a comment - Rebased on trunk
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12490728/hdfs-2260.txt
          against trunk revision 1158933.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 15 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these core unit tests:
          org.apache.hadoop.hdfs.server.blockmanagement.TestReplicationPolicy
          org.apache.hadoop.hdfs.server.namenode.TestCheckpoint
          org.apache.hadoop.hdfs.server.namenode.TestNNThroughputBenchmark
          org.apache.hadoop.hdfs.server.namenode.TestValidateConfigurationSettings
          org.apache.hadoop.hdfs.TestHDFSServerPorts

          +1 contrib tests. The patch passed contrib unit tests.

          -1 system test framework. The patch failed system test framework compile.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12490728/hdfs-2260.txt against trunk revision 1158933. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 15 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these core unit tests: org.apache.hadoop.hdfs.server.blockmanagement.TestReplicationPolicy org.apache.hadoop.hdfs.server.namenode.TestCheckpoint org.apache.hadoop.hdfs.server.namenode.TestNNThroughputBenchmark org.apache.hadoop.hdfs.server.namenode.TestValidateConfigurationSettings org.apache.hadoop.hdfs.TestHDFSServerPorts +1 contrib tests. The patch passed contrib unit tests. -1 system test framework. The patch failed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1115//console This message is automatically generated.
          Hide
          Todd Lipcon added a comment -

          The above tests are all failing for a while in trunk, so I'll commit this based on Eli's +1

          Show
          Todd Lipcon added a comment - The above tests are all failing for a while in trunk, so I'll commit this based on Eli's +1
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #840 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/840/)
          HDFS-2260. Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon.

          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004
          Files :

          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
          • /hadoop/common/trunk/hdfs/CHANGES.txt
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #840 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/840/ ) HDFS-2260 . Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #750 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/750/)
          HDFS-2260. Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon.

          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004
          Files :

          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
          • /hadoop/common/trunk/hdfs/CHANGES.txt
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #750 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/750/ ) HDFS-2260 . Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #756 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/756/)
          HDFS-2260. Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon.

          todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004
          Files :

          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
          • /hadoop/common/trunk/hdfs/CHANGES.txt
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
          • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java
          • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #756 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/756/ ) HDFS-2260 . Refactor BlockReader into an interface and implementation. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1159004 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestClientBlockVerification.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/BlockReaderFactory.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/RemoteBlockReader.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/BlockReaderTestUtil.java /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestConnCache.java

            People

            • Assignee:
              Todd Lipcon
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development