|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.io.SequenceFile.Writer
public static class SequenceFile.Writer
Write key/value pairs to a sequence-format file.
Method Summary | |
---|---|
void |
append(byte[] data,
int start,
int length,
int keyLength)
Deprecated. Call appendRaw(byte[], int, int, SequenceFile.ValueBytes) . |
void |
append(Writable key,
Writable val)
Append a key/value pair. |
void |
appendRaw(byte[] keyData,
int keyOffset,
int keyLength,
SequenceFile.ValueBytes val)
|
void |
close()
Close the file. |
CompressionCodec |
getCompressionCodec()
Returns the compression codec of data in this file. |
Class |
getKeyClass()
Returns the class of keys in this file. |
long |
getLength()
Returns the current length of the output file. |
Class |
getValueClass()
Returns the class of values in this file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceFile.Writer(FileSystem fs, String name, Class keyClass, Class valClass) throws IOException
SequenceFile.Writer(FileSystem,Path,Class,Class)
.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass) throws IOException
SequenceFile.Writer(FileSystem,Configuration,Path,Class,Class)
.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, Progressable progress) throws IOException
SequenceFile.Writer(FileSystem,Configuration,Path,Class,Class,Progressable)
.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, boolean compress) throws IOException
SequenceFile.Writer(FileSystem,Configuration,Path,Class,Class)
.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, boolean compress, Progressable progress) throws IOException
SequenceFile.Writer(FileSystem,Configuration,Path,Class,Class,Progressable)
.
IOException
public SequenceFile.Writer(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass) throws IOException
IOException
public SequenceFile.Writer(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass, Progressable progress) throws IOException
IOException
Method Detail |
---|
public Class getKeyClass()
public Class getValueClass()
public CompressionCodec getCompressionCodec()
public void close() throws IOException
IOException
public void append(Writable key, Writable val) throws IOException
IOException
public void append(byte[] data, int start, int length, int keyLength) throws IOException
appendRaw(byte[], int, int, SequenceFile.ValueBytes)
.
IOException
public void appendRaw(byte[] keyData, int keyOffset, int keyLength, SequenceFile.ValueBytes val) throws IOException
IOException
public long getLength() throws IOException
This always returns a synchronized position. In other words,
immediately after calling SequenceFile.Reader.seek(long)
with a position
returned by this method, SequenceFile.Reader.next(Writable)
may be called. However
the key may be earlier in the file than key last written when this
method was called (e.g., with block-compression, it may be the first key
in the block that was being written when this method was called).
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |