Package 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>
A class to encapsulate the various options of a SortedKeyValueFile.Writer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.avro.file.CodecFactorygetCodec()Return the compression codec.Gets the configuration.org.apache.avro.generic.GenericDataReturn the data model.intGets the index interval.org.apache.avro.SchemaGets the key schema.getPath()Gets the output path.org.apache.avro.SchemaGets the value schema.Set the compression codec.withCodec(org.apache.avro.file.CodecFactory codec) Set the compression codec.Sets the configuration.withDataModel(org.apache.avro.generic.GenericData model) Set the data model.withIndexInterval(int indexInterval) Sets the index interval.withKeySchema(org.apache.avro.Schema keySchema) Sets the key schema.Sets the output path.withValueSchema(org.apache.avro.Schema valueSchema) Sets the value schema.
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
withKeySchema
Sets the key schema.- Parameters:
keySchema- The key schema.- Returns:
- This options instance.
-
getKeySchema
public org.apache.avro.Schema getKeySchema()Gets the key schema.- Returns:
- The key schema.
-
withValueSchema
Sets the value schema.- Parameters:
valueSchema- The value schema.- Returns:
- This options instance.
-
getValueSchema
public org.apache.avro.Schema getValueSchema()Gets the value schema.- Returns:
- The value schema.
-
withConfiguration
Sets the configuration.- Parameters:
conf- The configuration.- Returns:
- This options instance.
-
getConfiguration
Gets the configuration.- Returns:
- The configuration.
-
withPath
Sets the output path.- Parameters:
path- The output path.- Returns:
- This options instance.
-
getPath
Gets the output path.- Returns:
- The output path.
-
withIndexInterval
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
Set the data model. -
getDataModel
public org.apache.avro.generic.GenericData getDataModel()Return the data model. -
withCodec
Set the compression codec. -
withCodec
Set the compression codec. -
getCodec
public org.apache.avro.file.CodecFactory getCodec()Return the compression codec.
-