Hadoop Common
  1. Hadoop Common
  2. HADOOP-8135

Add ByteBufferReadable interface to FSDataInputStream

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.2-alpha
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      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;
      
      1. HADOOP-8135.2.patch
        4 kB
        Henry Robinson
      2. HADOOP-8135.patch
        5 kB
        Henry Robinson

        Issue Links

          Activity

            People

            • Assignee:
              Henry Robinson
              Reporter:
              Henry Robinson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development