org.apache.avro.mapreduce

## Class AvroKeyOutputFormat.RecordWriterFactory<T>

- java.lang.Object
- - org.apache.avro.mapreduce.AvroKeyOutputFormat.RecordWriterFactory<T>

- Type Parameters:
    `T` - The java type of the avro record to write.
  Enclosing class:
    AvroKeyOutputFormat<T>

      protected static class AvroKeyOutputFormat.RecordWriterFactory<T>
      extends Object

  A factory for creating record writers.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RecordWriterFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected RecordWriter<AvroKey<T>,NullWritable>` | `create(Schema writerSchema, GenericData dataModel, CodecFactory compressionCodec, OutputStream outputStream, int syncInterval)` Creates a new record writer instance.

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

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

- - ### Constructor Detail

    - #### RecordWriterFactory

          protected RecordWriterFactory()

  - ### Method Detail

    - #### create

          protected RecordWriter<AvroKey<T>,NullWritable> create(Schema writerSchema,
                                                                 GenericData dataModel,
                                                                 CodecFactory compressionCodec,
                                                                 OutputStream outputStream,
                                                                 int syncInterval)
                                                          throws IOException

      Creates a new record writer instance.
      Parameters:
        `writerSchema` - The writer schema for the records to write.
        `compressionCodec` - The compression type for the writer file.
        `outputStream` - The target output stream for the records.
        `syncInterval` - The sync interval for the writer file.
      Throws:
        `IOException`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.