Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-alpha
    • Component/s: hdfs-client
    • Labels:
      None

      Description

      This JIRA is to expose the getFileLength API through a new public DistributedFileSystemInfo class.

      I would appreciate if someone suggest good name for this public class.

      Nicholas, did you plan any special design for this public client class?

      1. HDFS-3282.patch
        8 kB
        Uma Maheswara Rao G
      2. HDFS-3282.patch
        6 kB
        Uma Maheswara Rao G

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1061 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1061/)
          Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1061 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1061/ ) Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443) Result = FAILURE szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330443 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1026 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1026/)
          Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1026 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1026/ ) Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443) Result = FAILURE szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330443 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2146 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2146/)
          Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2146 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2146/ ) Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443) Result = SUCCESS szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330443 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2130 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2130/)
          Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2130 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2130/ ) Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443) Result = SUCCESS szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330443 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2204/)
          Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2204/ ) Move HDFS-3282 and HDFS-3298 to 2.0.0 in CHANGES.txt. (Revision 1330443) Result = SUCCESS szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330443 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks a lot Nicholas for merging it.

          Show
          Uma Maheswara Rao G added a comment - Thanks a lot Nicholas for merging it.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Merged this to branch-2.

          Show
          Tsz Wo Nicholas Sze added a comment - Merged this to branch-2.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1054 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1054/)
          iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790)
          HDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java

          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788
          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/DFSClient.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1054 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1054/ ) iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790) HDFS-3282 . Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788) Result = SUCCESS umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327790 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788 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/DFSClient.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1019 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1019/)
          iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790)
          HDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java

          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788
          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/DFSClient.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1019 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1019/ ) iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790) HDFS-3282 . Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788) Result = FAILURE umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327790 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788 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/DFSClient.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2120 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2120/)
          iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790)
          HDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788)

          Result = ABORTED
          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327790
          Files :

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java

          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788
          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/DFSClient.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2120 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2120/ ) iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790) HDFS-3282 . Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788) Result = ABORTED umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327790 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788 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/DFSClient.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Hide
          Uma Maheswara Rao G added a comment -

          I just committed this to trunk!

          Show
          Uma Maheswara Rao G added a comment - I just committed this to trunk!
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks a lot Eli and Nicholas for taking a look on Javac warnings.

          Show
          Uma Maheswara Rao G added a comment - Thanks a lot Eli and Nicholas for taking a look on Javac warnings.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2103 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2103/)
          iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790)
          HDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788)

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java

          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788
          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/DFSClient.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2103 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2103/ ) iHDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327790) HDFS-3282 . Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788) Result = SUCCESS umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327790 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/client/HdfsDataInputStream.java umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788 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/DFSClient.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2176 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2176/)
          HDFS-3282. Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788)

          Result = FAILURE
          umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788
          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/DFSClient.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2176 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2176/ ) HDFS-3282 . Expose getFileLength API. Contributed by Uma Maheswara Rao G. (Revision 1327788) Result = FAILURE umamahesh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1327788 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/DFSClient.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Thanks for looking at this, Eli. Unfortunately, we don't have something like OK_JAVAC_WARNINGS. The test-patch script simply compare the number of javac warnings with and without the patch. So, no additional change to the patch is required.

          Show
          Tsz Wo Nicholas Sze added a comment - Thanks for looking at this, Eli. Unfortunately, we don't have something like OK_JAVAC_WARNINGS. The test-patch script simply compare the number of javac warnings with and without the patch. So, no additional change to the patch is required.
          Hide
          Eli Collins added a comment -

          Oops, misread javac warnings for javadocs warnings, never mind.

          Show
          Eli Collins added a comment - Oops, misread javac warnings for javadocs warnings, never mind.
          Hide
          Eli Collins added a comment -

          If you're going to punt on the javadoc warnings this introduces the patch should bump OK_JAVADOC_WARNINGS so subsequent jenkins runs don't automatically -1.

          Show
          Eli Collins added a comment - If you're going to punt on the javadoc warnings this introduces the patch should bump OK_JAVADOC_WARNINGS so subsequent jenkins runs don't automatically -1.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          All the new javac warnings are the deprecated warnings of the use of DFSDataInputStream. Let's fix them separately.

          Show
          Tsz Wo Nicholas Sze added a comment - All the new javac warnings are the deprecated warnings of the use of DFSDataInputStream. Let's fix them separately.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12523204/HDFS-3282.patch
          against trunk revision .

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

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

          -1 javac. The applied patch generated 41 javac compiler warnings (more than the trunk's current 20 warnings).

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +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 passed unit tests in .

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

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2300//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2300//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/12523204/HDFS-3282.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. -1 javac. The applied patch generated 41 javac compiler warnings (more than the trunk's current 20 warnings). +1 eclipse:eclipse. The patch built with eclipse:eclipse. +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 passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2300//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2300//console This message is automatically generated.
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks Nicholas for the review again!. I will commit this patch in some time.

          Show
          Uma Maheswara Rao G added a comment - Thanks Nicholas for the review again!. I will commit this patch in some time.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks a lot, Nicholas for the review!

          Updated the patch with addressing your comments and also removed one unused import from previous patch.

          Show
          Uma Maheswara Rao G added a comment - Thanks a lot, Nicholas for the review! Updated the patch with addressing your comments and also removed one unused import from previous patch.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Uma, good work! Some comments:

          • Let's put HdfsDataInputStream in org.apache.hadoop.hdfs.client. It is a package for all the public APIs.
          • HdfsDataInputStream.getAllBlocks() should be public. You also have to change DFSInputStream.getAllBlocks() to public.
          • Move the @SuppressWarnings("deprecation") annotation on DistributedFileSystem to DistributedFileSystem.reportChecksumFailure(..). Otherwise, it will suppress all the warnings in DistributedFileSystem.
          • Let's replace the javadoc of DFSDataInputStream with "@deprecated use {@link HdfsDataInputStream}

            instead."

          Show
          Tsz Wo Nicholas Sze added a comment - Uma, good work! Some comments: Let's put HdfsDataInputStream in org.apache.hadoop.hdfs.client. It is a package for all the public APIs. HdfsDataInputStream.getAllBlocks() should be public. You also have to change DFSInputStream.getAllBlocks() to public. Move the @SuppressWarnings("deprecation") annotation on DistributedFileSystem to DistributedFileSystem.reportChecksumFailure(..). Otherwise, it will suppress all the warnings in DistributedFileSystem. Let's replace the javadoc of DFSDataInputStream with "@deprecated use {@link HdfsDataInputStream} instead."
          Hide
          Uma Maheswara Rao G added a comment -

          Updated the initial patch with the proposed idea.
          I did not included any tests as this is a re-factoring change.

          Show
          Uma Maheswara Rao G added a comment - Updated the initial patch with the proposed idea. I did not included any tests as this is a re-factoring change.
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks a lot for your clarification.

          Let me clarify it: the return type is HdfsDataInputStream but the return object is still DFSDataInputStream so that users could cast the stream to DFSDataInputStream as before. We also have to keep the DFSDataInputStream constructor.

          Yep, While implementing I got it. Implemented in this way only . Otherwise keeping DFSDataInputStream extends HdfsDataInputStream, almost no use.

          Show
          Uma Maheswara Rao G added a comment - Thanks a lot for your clarification. Let me clarify it: the return type is HdfsDataInputStream but the return object is still DFSDataInputStream so that users could cast the stream to DFSDataInputStream as before. We also have to keep the DFSDataInputStream constructor. Yep, While implementing I got it. Implemented in this way only . Otherwise keeping DFSDataInputStream extends HdfsDataInputStream, almost no use.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          > change DistributedFileSystem.open(..) to return HdfsDataInputStream.

          Let me clarify it: the return type is HdfsDataInputStream but the return object is still DFSDataInputStream so that users could cast the stream to DFSDataInputStream as before. We also have to keep the DFSDataInputStream constructor.

          Show
          Tsz Wo Nicholas Sze added a comment - > change DistributedFileSystem.open(..) to return HdfsDataInputStream. Let me clarify it: the return type is HdfsDataInputStream but the return object is still DFSDataInputStream so that users could cast the stream to DFSDataInputStream as before. We also have to keep the DFSDataInputStream constructor.
          Hide
          Uma Maheswara Rao G added a comment -

          Sounds fine to me. I will proceed with this approach.

          Show
          Uma Maheswara Rao G added a comment - Sounds fine to me. I will proceed with this approach.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Todd, good point. Then, let's

          • move the code to HdfsDataInputStream;
          • keep DFSDataInputStream (an empty class), change it to extend HdfsDataInputStream and deprecate it;
          • change DistributedFileSystem.open(..) to return HdfsDataInputStream.
          Show
          Tsz Wo Nicholas Sze added a comment - Todd, good point. Then, let's move the code to HdfsDataInputStream; keep DFSDataInputStream (an empty class), change it to extend HdfsDataInputStream and deprecate it; change DistributedFileSystem.open(..) to return HdfsDataInputStream.
          Hide
          Todd Lipcon added a comment -

          Nicholas: despite us advertising DFSDataInputStream as a private API, I imagine this change would break people. Could we instead just add a new interface which would be implemented by the existing class?

          Show
          Todd Lipcon added a comment - Nicholas: despite us advertising DFSDataInputStream as a private API, I imagine this change would break people. Could we instead just add a new interface which would be implemented by the existing class?
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Hi Uma,

          We could move DFSClient.DFSDataInputStream to a new class, say org.apache.hadoop.hdfs.client.HdfsDataInputStream, which is a public API. Then, change the return type of DistributedFileSystem.open(..) to HdfsDataInputStream. What do you think?

          Show
          Tsz Wo Nicholas Sze added a comment - Hi Uma, We could move DFSClient.DFSDataInputStream to a new class, say org.apache.hadoop.hdfs.client.HdfsDataInputStream, which is a public API. Then, change the return type of DistributedFileSystem.open(..) to HdfsDataInputStream. What do you think?

            People

            • Assignee:
              Uma Maheswara Rao G
              Reporter:
              Uma Maheswara Rao G
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development