Class AvroOutputFormatBase<K,V>

Type Parameters:
K - The type of key to write.
V - The type of value to write.
Direct Known Subclasses:
AvroKeyOutputFormat, AvroKeyValueOutputFormat

public abstract class AvroOutputFormatBase<K,V> extends FileOutputFormat<K,V>
Abstract base class for output formats that write Avro container files.
  • Constructor Details

    • AvroOutputFormatBase

      public AvroOutputFormatBase()
  • Method Details

    • getCompressionCodec

      protected static CodecFactory getCompressionCodec(TaskAttemptContext context)
      Gets the configured compression codec from the task context.
      Parameters:
      context - The task attempt context.
      Returns:
      The compression codec to use for the output Avro container file.
    • getAvroFileOutputStream

      protected OutputStream getAvroFileOutputStream(TaskAttemptContext context) throws IOException
      Gets the target output stream where the Avro container file should be written.
      Parameters:
      context - The task attempt context.
      Returns:
      The target output stream.
      Throws:
      IOException
    • getSyncInterval

      protected static int getSyncInterval(TaskAttemptContext context)
      Gets the configured sync interval from the task context.
      Parameters:
      context - The task attempt context.
      Returns:
      The sync interval to use for the output Avro container file.