public static class MapFile.Writer extends Object implements Closeable
| 构造器和说明 |
|---|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass)
Create the named map for keys of the named class.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress)
Create the named map for keys of the named class.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress,
CompressionCodec codec,
Progressable progress)
Create the named map for keys of the named class.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress,
Progressable progress)
Create the named map for keys of the named class.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass)
Create the named map using the named key comparator.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress)
Create the named map using the named key comparator.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress,
CompressionCodec codec,
Progressable progress)
Create the named map using the named key comparator.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress,
Progressable progress)
Create the named map using the named key comparator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
append(WritableComparable key,
Writable val)
Append a key/value pair to the map.
|
void |
close()
Close the map.
|
int |
getIndexInterval()
The number of entries that are added before an index entry is added.
|
static void |
setIndexInterval(Configuration conf,
int interval)
Sets the index interval and stores it in conf
|
void |
setIndexInterval(int interval)
Sets the index interval.
|
public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress, Progressable progress) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress, CompressionCodec codec, Progressable progress) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress, Progressable progress) throws IOException
IOExceptionpublic MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress, CompressionCodec codec, Progressable progress) throws IOException
IOExceptionpublic int getIndexInterval()
public void setIndexInterval(int interval)
getIndexInterval()public static void setIndexInterval(Configuration conf, int interval)
getIndexInterval()public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void append(WritableComparable key, Writable val) throws IOException
IOExceptionCopyright © 2009 The Apache Software Foundation