org.apache.avro.hadoop.file

## Class SortedKeyValueFile.Writer.Options

- java.lang.Object
- - org.apache.avro.hadoop.file.SortedKeyValueFile.Writer.Options

- Enclosing class:
    SortedKeyValueFile.Writer<K,V>

      public static class SortedKeyValueFile.Writer.Options
      extends Object

  A class to encapsulate the various options of a SortedKeyValueFile.Writer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Options()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CodecFactory` | `getCodec()` Return the compression codec.
    `Configuration` | `getConfiguration()` Gets the configuration.
    `GenericData` | `getDataModel()` Return the data model.
    `int` | `getIndexInterval()` Gets the index interval.
    `Schema` | `getKeySchema()` Gets the key schema.
    `Path` | `getPath()` Gets the output path.
    `Schema` | `getValueSchema()` Gets the value schema.
    `SortedKeyValueFile.Writer.Options` | `withCodec(CodecFactory codec)` Set the compression codec.
    `SortedKeyValueFile.Writer.Options` | `withCodec(String codec)` Set the compression codec.
    `SortedKeyValueFile.Writer.Options` | `withConfiguration(Configuration conf)` Sets the configuration.
    `SortedKeyValueFile.Writer.Options` | `withDataModel(GenericData model)` Set the data model.
    `SortedKeyValueFile.Writer.Options` | `withIndexInterval(int indexInterval)` Sets the index interval.
    `SortedKeyValueFile.Writer.Options` | `withKeySchema(Schema keySchema)` Sets the key schema.
    `SortedKeyValueFile.Writer.Options` | `withPath(Path path)` Sets the output path.
    `SortedKeyValueFile.Writer.Options` | `withValueSchema(Schema valueSchema)` Sets the value schema.

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

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

- - ### Constructor Detail

    - #### Options

          public Options()

  - ### Method Detail

    - #### withKeySchema

          public SortedKeyValueFile.Writer.Options withKeySchema(Schema keySchema)

      Sets the key schema.
      Parameters:
        `keySchema` - The key schema.
      Returns:
        This options instance.

    - #### getKeySchema

          public Schema getKeySchema()

      Gets the key schema.
      Returns:
        The key schema.

    - #### withValueSchema

          public SortedKeyValueFile.Writer.Options withValueSchema(Schema valueSchema)

      Sets the value schema.
      Parameters:
        `valueSchema` - The value schema.
      Returns:
        This options instance.

    - #### getValueSchema

          public Schema getValueSchema()

      Gets the value schema.
      Returns:
        The value schema.

    - #### withConfiguration

          public SortedKeyValueFile.Writer.Options withConfiguration(Configuration conf)

      Sets the configuration.
      Parameters:
        `conf` - The configuration.
      Returns:
        This options instance.

    - #### getConfiguration

          public Configuration getConfiguration()

      Gets the configuration.
      Returns:
        The configuration.

    - #### withPath

          public SortedKeyValueFile.Writer.Options withPath(Path path)

      Sets the output path.
      Parameters:
        `path` - The output path.
      Returns:
        This options instance.

    - #### getPath

          public Path getPath()

      Gets the output path.
      Returns:
        The output path.

    - #### withIndexInterval

          public SortedKeyValueFile.Writer.Options withIndexInterval(int indexInterval)

      Sets the index interval.

      If the index inverval is N, then every N records will be indexed into the index file.

      Parameters:
        `indexInterval` - The index interval.
      Returns:
        This options instance.

    - #### getIndexInterval

          public int getIndexInterval()

      Gets the index interval.
      Returns:
        The index interval.

    - #### withDataModel

          public SortedKeyValueFile.Writer.Options withDataModel(GenericData model)

      Set the data model.

    - #### getDataModel

          public GenericData getDataModel()

      Return the data model.

    - #### withCodec

          public SortedKeyValueFile.Writer.Options withCodec(String codec)

      Set the compression codec.

    - #### withCodec

          public SortedKeyValueFile.Writer.Options withCodec(CodecFactory codec)

      Set the compression codec.

    - #### getCodec

          public CodecFactory getCodec()

      Return the compression codec.

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