org.apache.accumulo.core.file.rfile.bcfile
Modifier and Type | Class and Description |
---|---|
static class |
BCFile.Reader.BlockReader
Access point to read a block.
|
Constructor and Description |
---|
BCFile.Reader(CachableBlockFile.Reader cache,
org.apache.hadoop.fs.FSDataInputStream fin,
long fileLength,
org.apache.hadoop.conf.Configuration conf,
AccumuloConfiguration accumuloConfiguration) |
BCFile.Reader(org.apache.hadoop.fs.FSDataInputStream fin,
long fileLength,
org.apache.hadoop.conf.Configuration conf,
AccumuloConfiguration accumuloConfiguration)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
BCFile.Reader.BlockReader |
getDataBlock(long offset,
long compressedSize,
long rawSize) |
String |
getDefaultCompressionName()
Get the name of the default compression algorithm.
|
BCFile.Reader.BlockReader |
getMetaBlock(String name)
Stream access to a Meta Block.
|
public BCFile.Reader(org.apache.hadoop.fs.FSDataInputStream fin, long fileLength, org.apache.hadoop.conf.Configuration conf, AccumuloConfiguration accumuloConfiguration) throws IOException
fin
- FS input stream.fileLength
- Length of the corresponding fileIOException
public BCFile.Reader(CachableBlockFile.Reader cache, org.apache.hadoop.fs.FSDataInputStream fin, long fileLength, org.apache.hadoop.conf.Configuration conf, AccumuloConfiguration accumuloConfiguration) throws IOException
IOException
public String getDefaultCompressionName()
public Utils.Version getBCFileVersion()
public Utils.Version getAPIVersion()
public void close()
public int getBlockCount()
public BCFile.Reader.BlockReader getMetaBlock(String name) throws IOException, MetaBlockDoesNotExist
name
- meta block nameMetaBlockDoesNotExist
- The Meta Block with the given name does not exist.IOException
public BCFile.Reader.BlockReader getDataBlock(int blockIndex) throws IOException
blockIndex
- 0-based data block index.IOException
public BCFile.Reader.BlockReader getDataBlock(long offset, long compressedSize, long rawSize) throws IOException
IOException
public int getBlockIndexNear(long offset)
offset
- User-specific offset.Copyright © 2011–2015 The Apache Software Foundation. All rights reserved.