ArrayFile.Writer (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io, class: ArrayFile, class: Writer

Package org.apache.hadoop.io

# Class ArrayFile.Writer

java.lang.Object
org.apache.hadoop.io.MapFile.Writer
org.apache.hadoop.io.ArrayFile.Writer

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Enclosing class:
  ArrayFile

public static class ArrayFile.Writer extends MapFile.Writer
Write a new array file.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.io.MapFile.Writer

  `MapFile.Writer.Option`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Writer(Configuration conf, FileSystem fs, String file, Class<? extends Writable> valClass)`
  Create the named file for values of the named class.
  `Writer(Configuration conf, FileSystem fs, String file, Class<? extends Writable> valClass, SequenceFile.CompressionType compress, Progressable progress)`
  Create the named file for values of the named class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `append(Writable value)`
  Append a value to the file.

  ### Methods inherited from class org.apache.hadoop.io.MapFile.Writer

  `append, close, comparator, compression, compression, getIndexInterval, keyClass, progressable, setIndexInterval, setIndexInterval, valueClass`

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

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

- ## Constructor Details

  - ### Writer

    public Writer(Configuration conf, FileSystem fs, String file, Class<? extends Writable> valClass) throws IOException
    Create the named file for values of the named class.
    Parameters:
      `conf` - configuration.
      `fs` - file system.
      `file` - file.
      `valClass` - valClass.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### Writer

    public Writer(Configuration conf, FileSystem fs, String file, Class<? extends Writable> valClass, SequenceFile.CompressionType compress, Progressable progress) throws IOException
    Create the named file for values of the named class.
    Parameters:
      `conf` - configuration.
      `fs` - file system.
      `file` - file.
      `valClass` - valClass.
      `compress` - compress.
      `progress` - progress.
    Throws:
      `IOException` - raised on errors performing I/O.

- ## Method Details

  - ### append

    public void append(Writable value) throws IOException
    Append a value to the file.
    Parameters:
      `value` - value.
    Throws:
      `IOException` - raised on errors performing I/O.