Package org.apache.avro.hadoop.file
Class SortedKeyValueFile.Writer<K,V>
java.lang.Object
org.apache.avro.hadoop.file.SortedKeyValueFile.Writer<K,V>
- Type Parameters:
K
- The key type.V
- The value type.
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
SortedKeyValueFile
Writes a SortedKeyValueFile.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class to encapsulate the various options of a SortedKeyValueFile.Writer. -
Constructor Summary
ConstructorDescriptionWriter
(SortedKeyValueFile.Writer.Options options) Creates a writer for a new file. -
Method Summary
-
Constructor Details
-
Writer
Creates a writer for a new file.- Parameters:
options
- The options.- Throws:
IOException
- If there is an error.
-
-
Method Details
-
append
Appends a record to the SortedKeyValueFile.- Parameters:
key
- The key.value
- The value.- Throws:
IOException
- If there is an error.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-