|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFileWriter
An interface for writing into the SequenceFile abstraction. Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
Method Summary | |
---|---|
void |
append(DataOutputBuffer buffer)
Appends the buffer to the the underlying SequenceFile. |
void |
append(DataOutputBuffer keyBuffer,
DataOutputBuffer buffer)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
byte[] value)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
DataOutputBuffer buffer)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
long value)
Appends the key and the long value to the the underlying SequenceFile. |
void |
close()
Close the file which is being used for the write. |
void |
close(byte[] footer,
int size)
Close the file after appending the passed in footer information. |
long |
getCurrentPosition()
Get the current position of the file pointer. |
java.lang.String |
getFileName()
|
long |
getFileSize()
|
long |
lastModified()
|
void |
seek(long position)
Seeks the file pointer to the specified position. |
long |
writeDirect(byte[] bytes)
Be extremely careful while using this API. |
void |
writeLong(long value)
Write a long into the underlying sub system. |
Method Detail |
---|
long getCurrentPosition() throws java.io.IOException
java.io.IOException
long lastModified()
void seek(long position) throws java.io.IOException
position
- position within the file to seek to.
java.io.IOException
void append(DataOutputBuffer buffer) throws java.io.IOException
buffer
- buffer which contains the serialized data.
java.io.IOException
void append(DataOutputBuffer keyBuffer, DataOutputBuffer buffer) throws java.io.IOException
keyBuffer
- buffer which contains the serialized key.buffer
- buffer which contains the serialized data.
java.io.IOException
void append(java.lang.String key, DataOutputBuffer buffer) throws java.io.IOException
key
- key associated with this peice of data.buffer
- buffer containing the serialized data.
java.io.IOException
void append(java.lang.String key, byte[] value) throws java.io.IOException
key
- key associated with this peice of data.value
- byte array containing the serialized data.
java.io.IOException
void append(java.lang.String key, long value) throws java.io.IOException
key
- key associated with this peice of data.value
- value associated with this key.
java.io.IOException
long writeDirect(byte[] bytes) throws java.io.IOException
bytes
- serialized version of the commit log header.
java.io.IOException
void writeLong(long value) throws java.io.IOException
value
- long to be written
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
void close(byte[] footer, int size) throws java.io.IOException
footer
- footer information.size
- size of the footer.
java.io.IOException
java.lang.String getFileName()
long getFileSize() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |