org.apache.cassandra.io
Class SequenceFile
java.lang.Object
org.apache.cassandra.io.SequenceFile
public class SequenceFile
- extends java.lang.Object
This class writes key/value pairs seqeuntially to disk. It is
also used to read sequentially from disk. However one could
jump to random positions to read data from the file. This class
also has many implementations of the IFileWriter and IFileReader
interfaces which are exposed through factory methods.
Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) & Karthik Ranganathan ( kranganathan@facebook.com )
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
utfPrefix_
public static final short utfPrefix_
- See Also:
- Constant Field Values
marker_
public static final java.lang.String marker_
- See Also:
- Constant Field Values
SequenceFile
public SequenceFile()
writer
public static IFileWriter writer(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
bufferedWriter
public static IFileWriter bufferedWriter(java.lang.String filename,
int size)
throws java.io.IOException
- Throws:
java.io.IOException
fastWriter
public static IFileWriter fastWriter(java.lang.String filename,
int size)
throws java.io.IOException
- Throws:
java.io.IOException
reader
public static IFileReader reader(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
bufferedReader
public static IFileReader bufferedReader(java.lang.String filename,
int size)
throws java.io.IOException
- Throws:
java.io.IOException
writeUTF
protected static void writeUTF(java.nio.ByteBuffer buffer,
java.lang.String str)
- Efficiently writes a UTF8 string to the buffer.
Assuming all Strings that are passed in have length
that can be represented as a short i.e length of the
string is <= 65535
- Parameters:
buffer
- buffer to write the serialize version intostr
- string to serialize
Copyright © 2009 The Apache Software Foundation