org.apache.hadoop.mapred

## Class MapTask.MapOutputBuffer.Buffer

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.hadoop.mapred.MapTask.MapOutputBuffer.Buffer

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable
  Enclosing class:
    MapTask.MapOutputBuffer<K,V>

      public class MapTask.MapOutputBuffer.Buffer
      extends OutputStream

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Buffer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `write(byte[] b, int off, int len)` Attempt to write a sequence of bytes to the collection buffer.
    `void` | `write(int v)`

    - ### Methods inherited from class java.io.OutputStream

      `close, flush, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Buffer

          public Buffer()

  - ### Method Detail

    - #### write

          public void write(int v)
                     throws IOException

      Specified by:
        `write` in class `OutputStream`
      Throws:
        `IOException`

    - #### write

          public void write(byte[] b,
                            int off,
                            int len)
                     throws IOException

      Attempt to write a sequence of bytes to the collection buffer. This method will block if the spill thread is running and it cannot write.
      Overrides:
        `write` in class `OutputStream`
      Throws:
        `MapBufferTooSmallException` - if record is too large to deserialize into the collection buffer.
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.