You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Henry Robinson (Created) (JIRA)" <ji...@apache.org> on 2012/03/02 23:09:57 UTC

[jira] [Created] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Add ByteBufferReadable interface to FSDataInputStream
-----------------------------------------------------

                 Key: HADOOP-8135
                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
             Project: Hadoop Common
          Issue Type: New Feature
          Components: fs
            Reporter: Henry Robinson
            Assignee: Henry Robinson


To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:

{code}
  /**
   * Reads up to buf.remaining() bytes into buf. Callers should use
   * buf.limit(..) to control the size of the desired read.
   * 
   * After the call, buf.position() should be unchanged, and therefore any data
   * can be immediately read from buf.
   * 
   * @param buf
   * @return - the number of bytes available to read from buf
   * @throws IOException
   */
  public int read(ByteBuffer buf) throws IOException;
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221586#comment-13221586 ] 

Hudson commented on HADOOP-8135:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk #1008 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1008/])
    HADOOP-8135. Add ByteBufferReadable interface to FSDataInputStream. Contributed by Henry Robinson. (Revision 1296556)

     Result = SUCCESS
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296556
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java

                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Todd Lipcon (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221334#comment-13221334 ] 

Todd Lipcon commented on HADOOP-8135:
-------------------------------------

{code}
+   * @return - the number of bytes available to read from buf
{code}
style nit: no '-' here

- maybe worth noting in the javadoc that many FS implementations may throw UnsupportedOperationException, and add that to the javadoc as well
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Henry Robinson (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated HADOOP-8135:
-----------------------------------

    Attachment: HADOOP-8135.patch

Here's a patch which adds the interface to FSDataInputStream, and implements it by trying to call on the wrapped stream, and throwing UnsupportedOperationException if nto found. 
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Henry Robinson (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated HADOOP-8135:
-----------------------------------

    Status: Patch Available  (was: Open)
    
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221317#comment-13221317 ] 

Hadoop QA commented on HADOOP-8135:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12516892/HADOOP-8135.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 does not increase the total number of javac compiler 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-HADOOP-Build/664//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/664//console

This message is automatically generated.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-8135:
--------------------------------

    Fix Version/s:     (was: 3.0.0)
                   2.0.1-alpha

Committed to branch-2 as well.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 2.0.1-alpha
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Aaron T. Myers (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221343#comment-13221343 ] 

Aaron T. Myers commented on HADOOP-8135:
----------------------------------------

+1
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Aaron T. Myers (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron T. Myers updated HADOOP-8135:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.24.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

I've just committed this. Thanks a lot for the contribution, Hank.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Aaron T. Myers (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221327#comment-13221327 ] 

Aaron T. Myers commented on HADOOP-8135:
----------------------------------------

Patch looks pretty good to me, Henry. Just a few little nits. +1 once these are addressed:

# Please add a javadoc explaining the "buf" param and the IOException for ByteBufferReadable#read.
# Please remove the unrelated changes adding @Override annotations to the other methods of FSDataInputStream.

Even though this patch introduces an interface which as yet has no actual implementation, I'd like to commit it to trunk anyway so that test-patch can be used during reviews on HDFS-2834. If it turns out that HDFS-2834 doesn't get committed in a timely fashion, then I'll revert this patch.

Any objections to this plan? If not, I'll commit this in a few hours.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221488#comment-13221488 ] 

Hudson commented on HADOOP-8135:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #1825 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1825/])
    HADOOP-8135. Add ByteBufferReadable interface to FSDataInputStream. Contributed by Henry Robinson. (Revision 1296556)

     Result = SUCCESS
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296556
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java

                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun C Murthy closed HADOOP-8135.
---------------------------------

    
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 2.0.2-alpha
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Henry Robinson (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated HADOOP-8135:
-----------------------------------

    Attachment: HADOOP-8135.2.patch

Thanks for the review! Patch updated per comments.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221351#comment-13221351 ] 

Hadoop QA commented on HADOOP-8135:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12516902/HADOOP-8135.2.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 does not increase the total number of javac compiler 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 failed these unit tests:
                  org.apache.hadoop.ipc.TestRPCCallBenchmark

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

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/665//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/665//console

This message is automatically generated.
                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221489#comment-13221489 ] 

Hudson commented on HADOOP-8135:
--------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #1899 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1899/])
    HADOOP-8135. Add ByteBufferReadable interface to FSDataInputStream. Contributed by Henry Robinson. (Revision 1296556)

     Result = SUCCESS
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296556
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java

                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221485#comment-13221485 ] 

Hudson commented on HADOOP-8135:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #1832 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1832/])
    HADOOP-8135. Add ByteBufferReadable interface to FSDataInputStream. Contributed by Henry Robinson. (Revision 1296556)

     Result = ABORTED
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296556
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java

                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8135) Add ByteBufferReadable interface to FSDataInputStream

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221570#comment-13221570 ] 

Hudson commented on HADOOP-8135:
--------------------------------

Integrated in Hadoop-Hdfs-trunk #973 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/973/])
    HADOOP-8135. Add ByteBufferReadable interface to FSDataInputStream. Contributed by Henry Robinson. (Revision 1296556)

     Result = SUCCESS
atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296556
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataInputStream.java

                
> Add ByteBufferReadable interface to FSDataInputStream
> -----------------------------------------------------
>
>                 Key: HADOOP-8135
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8135
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8135.2.patch, HADOOP-8135.patch
>
>
> To prepare for HDFS-2834, it's useful to add an interface to FSDataInputStream (and others inside hdfs) that adds a read(ByteBuffer...) method as follows:
> {code}
>   /**
>    * Reads up to buf.remaining() bytes into buf. Callers should use
>    * buf.limit(..) to control the size of the desired read.
>    * 
>    * After the call, buf.position() should be unchanged, and therefore any data
>    * can be immediately read from buf.
>    * 
>    * @param buf
>    * @return - the number of bytes available to read from buf
>    * @throws IOException
>    */
>   public int read(ByteBuffer buf) throws IOException;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira