org.apache.hadoop.io
Class SetFile.Writer

java.lang.Object
  extended by org.apache.hadoop.io.MapFile.Writer
      extended by org.apache.hadoop.io.SetFile.Writer
All Implemented Interfaces:
Closeable
Enclosing class:
SetFile

public static class SetFile.Writer
extends MapFile.Writer

Write a new set file.


Constructor Summary
SetFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, SequenceFile.CompressionType compress)
          Create a set naming the element class and compression type.
SetFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, SequenceFile.CompressionType compress)
          Create a set naming the element comparator and compression type.
SetFile.Writer(FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass)
          Deprecated. pass a Configuration too
 
Method Summary
 void append(WritableComparable key)
          Append a key to a set.
 
Methods inherited from class org.apache.hadoop.io.MapFile.Writer
append, close, getIndexInterval, setIndexInterval, setIndexInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetFile.Writer

public SetFile.Writer(FileSystem fs,
                      String dirName,
                      Class<? extends WritableComparable> keyClass)
               throws IOException
Deprecated. pass a Configuration too

Create the named set for keys of the named class.

Throws:
IOException

SetFile.Writer

public SetFile.Writer(Configuration conf,
                      FileSystem fs,
                      String dirName,
                      Class<? extends WritableComparable> keyClass,
                      SequenceFile.CompressionType compress)
               throws IOException
Create a set naming the element class and compression type.

Throws:
IOException

SetFile.Writer

public SetFile.Writer(Configuration conf,
                      FileSystem fs,
                      String dirName,
                      WritableComparator comparator,
                      SequenceFile.CompressionType compress)
               throws IOException
Create a set naming the element comparator and compression type.

Throws:
IOException
Method Detail

append

public void append(WritableComparable key)
            throws IOException
Append a key to a set. The key must be strictly greater than the previous key added to the set.

Throws:
IOException


Copyright © 2009 The Apache Software Foundation