org.apache.cassandra.io
Class SequenceFile.AbstractReader
java.lang.Object
org.apache.cassandra.io.SequenceFile.AbstractReader
- All Implemented Interfaces:
- IFileReader
- Direct Known Subclasses:
- SequenceFile.Reader
- Enclosing class:
- SequenceFile
public abstract static class SequenceFile.AbstractReader
- extends java.lang.Object
- implements IFileReader
Field Summary |
protected java.io.RandomAccessFile |
file_
|
protected java.lang.String |
filename_
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file_
protected java.io.RandomAccessFile file_
filename_
protected java.lang.String filename_
getFileName
public java.lang.String getFileName()
- Specified by:
getFileName
in interface IFileReader
getPositionFromBlockIndex
public long getPositionFromBlockIndex(java.lang.String key)
throws java.io.IOException
- Return the position of the given key from the block index.
- Specified by:
getPositionFromBlockIndex
in interface IFileReader
- Parameters:
key
- the key whose offset is to be extracted from the current block index
- Throws:
java.io.IOException
next
public long next(java.lang.String key,
DataOutputBuffer bufOut,
java.lang.String columnFamilyName,
java.util.List<java.lang.String> columnNames,
IndexHelper.TimeRange timeRange,
Coordinate section)
throws java.io.IOException
- This method dumps the next key/value into the DataOuputStream
passed in. Always use this method to query for application
specific data as it will have indexes.
- Specified by:
next
in interface IFileReader
- Parameters:
key
- key we are interested in.bufOut
- DataOutputStream that needs to be filled.columnFamilyName
- name of the columnFamilycolumnNames
- columnNames we are interested in
ORtimeRange
- time range we are interested insection
- region of the file that needs to be read
- Returns:
- number of bytes that were read.
- Throws:
java.io.IOException
next
public long next(DataOutputBuffer bufOut)
throws java.io.IOException
- This method dumps the next key/value into the DataOuputStream
passed in.
- Specified by:
next
in interface IFileReader
- Parameters:
bufOut
- DataOutputStream that needs to be filled.
- Returns:
- total number of bytes read/considered
- Throws:
java.io.IOException
next
public long next(java.lang.String key,
DataOutputBuffer bufOut,
Coordinate section)
throws java.io.IOException
- This method dumps the next key/value into the DataOuputStream
passed in.
- Specified by:
next
in interface IFileReader
- Parameters:
key
- - key we are interested in.bufOut
- DataOutputStream that needs to be filled.section
- region of the file that needs to be read
- Returns:
- total number of bytes read/considered
- Throws:
java.io.IOException
Copyright © 2009 The Apache Software Foundation