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
- Enclosing class:
- SortedKeyValueFile
public static class SortedKeyValueFile.Writer<K,V>
- extends Object
- implements Closeable
Writes a SortedKeyValueFile.
|
Method Summary |
void |
append(K key,
V value)
Appends a record to the SortedKeyValueFile. |
void |
close()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortedKeyValueFile.Writer
public SortedKeyValueFile.Writer(SortedKeyValueFile.Writer.Options options)
throws IOException
- Creates a writer for a new file.
- Parameters:
options - The options.
- Throws:
IOException - If there is an error.
append
public void append(K key,
V value)
throws IOException
- Appends a record to the SortedKeyValueFile.
- Parameters:
key - The key.value - The value.
- Throws:
IOException - If there is an error.
close
public void close()
throws IOException
-
- Specified by:
close in interface Closeable
- Throws:
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.