|
||||||||||
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.
Constructor Summary | |
---|---|
SequenceFile.Writer(FileSystem fs,
Path name,
Class keyClass,
Class valClass)
Create the named file. |
|
SequenceFile.Writer(FileSystem fs,
Path name,
Class keyClass,
Class valClass,
boolean compress)
Create the named file. |
|
SequenceFile.Writer(FileSystem fs,
Path name,
Class keyClass,
Class valClass,
boolean compress,
Progressable progress)
Create the named file with write-progress reporter. |
|
SequenceFile.Writer(FileSystem fs,
Path name,
Class keyClass,
Class valClass,
Progressable progress)
Create the named file with write-progress reporter. |
|
SequenceFile.Writer(FileSystem fs,
String name,
Class keyClass,
Class valClass)
Deprecated. Call #Writer(FileSystem,Path,Class,Class) . |
Method Summary | |
---|---|
void |
append(byte[] data,
int start,
int length,
int keyLength)
Append a key/value pair. |
void |
append(Writable key,
Writable val)
Append a key/value pair. |
void |
close()
Close the 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
#Writer(FileSystem,Path,Class,Class)
.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass) throws IOException
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, Progressable progress) throws IOException
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, boolean compress) throws IOException
compress
- if true, values are compressed.
IOException
public SequenceFile.Writer(FileSystem fs, Path name, Class keyClass, Class valClass, boolean compress, Progressable progress) throws IOException
compress
- if true, values are compressed.
IOException
Method Detail |
---|
public Class getKeyClass()
public Class getValueClass()
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
IOException
public long getLength() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |