|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.file.rfile.bcfile.BCFile.Reader
public static class BCFile.Reader
BCFile Reader, interface to read the file's data and meta blocks.
Nested Class Summary | |
---|---|
static class |
BCFile.Reader.BlockReader
Access point to read a block. |
Constructor Summary | |
---|---|
BCFile.Reader(org.apache.hadoop.fs.FSDataInputStream fin,
long fileLength,
org.apache.hadoop.conf.Configuration conf)
Constructor |
Method Summary | |
---|---|
void |
close()
Finishing reading the BCFile. |
Utils.Version |
getAPIVersion()
Get version of BCFile API. |
Utils.Version |
getBCFileVersion()
Get version of BCFile file being read. |
int |
getBlockCount()
Get the number of data blocks. |
int |
getBlockIndexNear(long offset)
Find the smallest Block index whose starting offset is greater than or equal to the specified offset. |
BCFile.Reader.BlockReader |
getDataBlock(int blockIndex)
Stream access to a Data Block. |
java.lang.String |
getDefaultCompressionName()
Get the name of the default compression algorithm. |
BCFile.Reader.BlockReader |
getMetaBlock(java.lang.String name)
Stream access to a Meta Block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BCFile.Reader(org.apache.hadoop.fs.FSDataInputStream fin, long fileLength, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
fin
- FS input stream.fileLength
- Length of the corresponding file
java.io.IOException
Method Detail |
---|
public java.lang.String getDefaultCompressionName()
public Utils.Version getBCFileVersion()
public Utils.Version getAPIVersion()
public void close()
close
in interface java.io.Closeable
public int getBlockCount()
public BCFile.Reader.BlockReader getMetaBlock(java.lang.String name) throws java.io.IOException, MetaBlockDoesNotExist
name
- meta block name
java.io.IOException
MetaBlockDoesNotExist
- The Meta Block with the given name does not exist.public BCFile.Reader.BlockReader getDataBlock(int blockIndex) throws java.io.IOException
blockIndex
- 0-based data block index.
java.io.IOException
public int getBlockIndexNear(long offset)
offset
- User-specific offset.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |