Package org.apache.hadoop.io
Class SetFile.Writer
java.lang.Object
org.apache.hadoop.io.MapFile.Writer
org.apache.hadoop.io.SetFile.Writer
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- SetFile
Write a new set file.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.io.MapFile.Writer
MapFile.Writer.Option -
Constructor Summary
ConstructorsConstructorDescriptionWriter(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, SequenceFile.CompressionType compress) Create a set naming the element class and compression type.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, SequenceFile.CompressionType compress) Create a set naming the element comparator and compression type.Writer(FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass) Deprecated.pass a Configuration too -
Method Summary
Methods inherited from class org.apache.hadoop.io.MapFile.Writer
append, close, comparator, compression, compression, getIndexInterval, keyClass, progressable, setIndexInterval, setIndexInterval, valueClass
-
Constructor Details
-
Writer
public Writer(FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass) throws IOException Deprecated.pass a Configuration tooCreate the named set for keys of the named class.- Parameters:
fs- input FileSystem.dirName- input dirName.keyClass- input keyClass.- Throws:
IOException- raised on errors performing I/O.
-
Writer
public 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.- Parameters:
conf- input Configuration.fs- input FileSystem.dirName- input dirName.keyClass- input keyClass.compress- input compress.- Throws:
IOException- raised on errors performing I/O.
-
Writer
public Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, SequenceFile.CompressionType compress) throws IOException Create a set naming the element comparator and compression type.- Parameters:
conf- input Configuration.fs- input FileSystem.dirName- input dirName.comparator- input comparator.compress- input compress.- Throws:
IOException- raised on errors performing I/O.
-
-
Method Details
-
append
Append a key to a set. The key must be strictly greater than the previous key added to the set.- Parameters:
key- input key.- Throws:
IOException- raised on errors performing I/O.
-