Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8135

Add ByteBufferReadable interface to FSDataInputStream

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.2-alpha
    • fs
    • None
    • Reviewed

    Description

      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:

        /**
         * 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;
      

      Attachments

        1. HADOOP-8135.patch
          5 kB
          Henry Robinson
        2. HADOOP-8135.2.patch
          4 kB
          Henry Robinson

        Issue Links

          Activity

            People

              henryr Henry Robinson
              henryr Henry Robinson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: