org.apache.avro.hadoop.file
Class SortedKeyValueFile.Writer<K,V>

java.lang.Object
  extended by 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.


Nested Class Summary
static class SortedKeyValueFile.Writer.Options
          A class to encapsulate the various options of a SortedKeyValueFile.Writer.
 
Constructor Summary
SortedKeyValueFile.Writer(SortedKeyValueFile.Writer.Options options)
          Creates a writer for a new file.
 
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
 

Constructor Detail

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.
Method Detail

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.