public static class MapFile.Writer extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
MapFile.Writer.Option |
Constructor and Description |
---|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress,
CompressionCodec codec,
Progressable progress)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
Class<? extends WritableComparable> keyClass,
Class valClass,
SequenceFile.CompressionType compress,
Progressable progress)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress,
CompressionCodec codec,
Progressable progress)
Deprecated.
Use Writer(Configuration, Path, Option...) instead.
|
MapFile.Writer(Configuration conf,
FileSystem fs,
String dirName,
WritableComparator comparator,
Class valClass,
SequenceFile.CompressionType compress,
Progressable progress)
Deprecated.
Use Writer(Configuration, Path, Option...)} instead.
|
MapFile.Writer(Configuration conf,
Path dirName,
SequenceFile.Writer.Option... opts) |
Modifier and Type | Method and Description |
---|---|
void |
append(WritableComparable key,
Writable val)
Append a key/value pair to the map.
|
void |
close()
Close the map.
|
static MapFile.Writer.Option |
comparator(WritableComparator value) |
static SequenceFile.Writer.Option |
compression(SequenceFile.CompressionType type) |
static SequenceFile.Writer.Option |
compression(SequenceFile.CompressionType type,
CompressionCodec codec) |
int |
getIndexInterval()
The number of entries that are added before an index entry is added.
|
static MapFile.Writer.Option |
keyClass(Class<? extends WritableComparable> value) |
static SequenceFile.Writer.Option |
progressable(Progressable value) |
static void |
setIndexInterval(Configuration conf,
int interval)
Sets the index interval and stores it in conf
|
void |
setIndexInterval(int interval)
Sets the index interval.
|
static SequenceFile.Writer.Option |
valueClass(Class<?> value) |
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress, Progressable progress) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress, CompressionCodec codec, Progressable progress) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, Class<? extends WritableComparable> keyClass, Class valClass, SequenceFile.CompressionType compress) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress, Progressable progress) throws IOException
IOException
@Deprecated public MapFile.Writer(Configuration conf, FileSystem fs, String dirName, WritableComparator comparator, Class valClass, SequenceFile.CompressionType compress, CompressionCodec codec, Progressable progress) throws IOException
IOException
public MapFile.Writer(Configuration conf, Path dirName, SequenceFile.Writer.Option... opts) throws IOException
IOException
public static MapFile.Writer.Option keyClass(Class<? extends WritableComparable> value)
public static MapFile.Writer.Option comparator(WritableComparator value)
public static SequenceFile.Writer.Option valueClass(Class<?> value)
public static SequenceFile.Writer.Option compression(SequenceFile.CompressionType type)
public static SequenceFile.Writer.Option compression(SequenceFile.CompressionType type, CompressionCodec codec)
public static SequenceFile.Writer.Option progressable(Progressable value)
public int getIndexInterval()
public void setIndexInterval(int interval)
getIndexInterval()
public static void setIndexInterval(Configuration conf, int interval)
getIndexInterval()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void append(WritableComparable key, Writable val) throws IOException
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.