public class CompressionMetadata
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CompressionMetadata.Chunk
Holds offset and length of the file chunk
|
static class |
CompressionMetadata.Writer |
Modifier and Type | Field and Description |
---|---|
long |
compressedFileLength |
long |
dataLength |
java.lang.String |
indexFilePath |
CompressionParams |
parameters |
Constructor and Description |
---|
CompressionMetadata(Descriptor desc,
long compressedLength) |
CompressionMetadata(java.lang.String filePath,
CompressionParams parameters,
Memory offsets,
long offsetsSize,
long dataLength,
long compressedLength) |
CompressionMetadata(java.lang.String indexFilePath,
long compressedLength,
boolean hasMaxCompressedSize) |
Modifier and Type | Method and Description |
---|---|
void |
addTo(Ref.IdentityCollection identities) |
CompressionMetadata.Chunk |
chunkFor(long position)
Get a chunk of compressed data (offset, length) corresponding to given position
|
int |
chunkLength() |
void |
close() |
ICompressor |
compressor() |
static CompressionMetadata |
create(java.lang.String dataFilePath)
Create metadata about given compressed file including uncompressed data length, chunk size
and list of the chunk offsets of the compressed data.
|
static CompressionMetadata |
createWithLength(java.lang.String dataFilePath,
long compressedLength) |
CompressionMetadata.Chunk[] |
getChunksForSections(java.util.Collection<SSTableReader.PartitionPositionBounds> sections) |
long |
getTotalSizeForSections(java.util.Collection<SSTableReader.PartitionPositionBounds> sections) |
int |
maxCompressedLength() |
long |
offHeapSize()
Returns the amount of memory in bytes used off heap.
|
public final long dataLength
public final long compressedFileLength
public final java.lang.String indexFilePath
public final CompressionParams parameters
public CompressionMetadata(Descriptor desc, long compressedLength)
public CompressionMetadata(java.lang.String indexFilePath, long compressedLength, boolean hasMaxCompressedSize)
public CompressionMetadata(java.lang.String filePath, CompressionParams parameters, Memory offsets, long offsetsSize, long dataLength, long compressedLength)
public static CompressionMetadata create(java.lang.String dataFilePath)
dataFilePath
- Path to the compressed filepublic static CompressionMetadata createWithLength(java.lang.String dataFilePath, long compressedLength)
public ICompressor compressor()
public int chunkLength()
public int maxCompressedLength()
public long offHeapSize()
public void addTo(Ref.IdentityCollection identities)
public CompressionMetadata.Chunk chunkFor(long position)
position
- Position in the file.public long getTotalSizeForSections(java.util.Collection<SSTableReader.PartitionPositionBounds> sections)
sections
- Collection of sections in uncompressed file. Should not contain sections that overlap each other.public CompressionMetadata.Chunk[] getChunksForSections(java.util.Collection<SSTableReader.PartitionPositionBounds> sections)
sections
- Collection of sections in uncompressed filepublic void close()
Copyright © 2009- The Apache Software Foundation