Package org.rocksdb
Class TableProperties
- java.lang.Object
-
- org.rocksdb.TableProperties
-
public class TableProperties extends java.lang.ObjectTableProperties contains read-only properties of its associated table.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetColumnFamilyId()Get the ID of column family for this SST file, corresponding to the column family identified bygetColumnFamilyName().byte[]getColumnFamilyName()Get the name of the column family with which this SST file is associated.java.lang.StringgetComparatorName()Get the name of the comparator used in this table.java.lang.StringgetCompressionName()Get the name of the compression algorithm used to compress the SST files.longgetCreationTime()The time when the SST file was created.longgetDataSize()Get the total size of all data blocks.longgetFastCompressionEstimatedDataSize()Get the estimated size of data blocks compressed with a relatively faster compression algorithm.java.lang.StringgetFilterPolicyName()Get the name of the filter policy used in this table.longgetFilterSize()Get the size of filter block.longgetFixedKeyLen()Get the length of the keys.longgetFormatVersion()Get the format version, reserved for backward compatibility.longgetIndexKeyIsUserKey()Whether the index key is user key.longgetIndexPartitions()Get the total number of index partitions ifIndexType.kTwoLevelIndexSearchis used.longgetIndexSize()Get the size of index block.longgetIndexValueIsDeltaEncoded()Whether delta encoding is used to encode the index values.java.lang.StringgetMergeOperatorName()Get the name of the merge operator used in this table.longgetNumDataBlocks()Get the number of blocks in this table.longgetNumDeletions()Get the number of deletions in the table.longgetNumEntries()Get the number of entries in this table.longgetNumMergeOperands()Get the number of merge operands in the table.longgetNumRangeDeletions()Get the number of range deletions in this table.longgetOldestKeyTime()Get the timestamp of the earliest key.java.lang.StringgetPrefixExtractorName()Get the name of the prefix extractor used in this table.java.util.Map<java.lang.String,java.lang.Long>getPropertiesOffsets()The offset of the value of each property in the file.java.lang.StringgetPropertyCollectorsNames()Get the names of the property collectors factories used in this table.longgetRawKeySize()Get the total raw key size.longgetRawValueSize()Get the total raw value size.java.util.Map<java.lang.String,java.lang.String>getReadableProperties()Get the readable properties.longgetSlowCompressionEstimatedDataSize()Get the estimated size of data blocks compressed with a relatively slower compression algorithm.longgetTopLevelIndexSize()Size of the top-level index ifIndexType.kTwoLevelIndexSearchis used.java.util.Map<java.lang.String,java.lang.String>getUserCollectedProperties()Get the user collected properties.inthashCode()
-
-
-
Method Detail
-
getDataSize
public long getDataSize()
Get the total size of all data blocks.- Returns:
- the total size of all data blocks.
-
getIndexSize
public long getIndexSize()
Get the size of index block.- Returns:
- the size of index block.
-
getIndexPartitions
public long getIndexPartitions()
Get the total number of index partitions ifIndexType.kTwoLevelIndexSearchis used.- Returns:
- the total number of index partitions.
-
getTopLevelIndexSize
public long getTopLevelIndexSize()
Size of the top-level index ifIndexType.kTwoLevelIndexSearchis used.- Returns:
- the size of the top-level index.
-
getIndexKeyIsUserKey
public long getIndexKeyIsUserKey()
Whether the index key is user key. Otherwise it includes 8 byte of sequence number added by internal key format.- Returns:
- the index key
-
getIndexValueIsDeltaEncoded
public long getIndexValueIsDeltaEncoded()
Whether delta encoding is used to encode the index values.- Returns:
- whether delta encoding is used to encode the index values.
-
getFilterSize
public long getFilterSize()
Get the size of filter block.- Returns:
- the size of filter block.
-
getRawKeySize
public long getRawKeySize()
Get the total raw key size.- Returns:
- the total raw key size.
-
getRawValueSize
public long getRawValueSize()
Get the total raw value size.- Returns:
- the total raw value size.
-
getNumDataBlocks
public long getNumDataBlocks()
Get the number of blocks in this table.- Returns:
- the number of blocks in this table.
-
getNumEntries
public long getNumEntries()
Get the number of entries in this table.- Returns:
- the number of entries in this table.
-
getNumDeletions
public long getNumDeletions()
Get the number of deletions in the table.- Returns:
- the number of deletions in the table.
-
getNumMergeOperands
public long getNumMergeOperands()
Get the number of merge operands in the table.- Returns:
- the number of merge operands in the table.
-
getNumRangeDeletions
public long getNumRangeDeletions()
Get the number of range deletions in this table.- Returns:
- the number of range deletions in this table.
-
getFormatVersion
public long getFormatVersion()
Get the format version, reserved for backward compatibility.- Returns:
- the format version.
-
getFixedKeyLen
public long getFixedKeyLen()
Get the length of the keys.- Returns:
- 0 when the key is variable length, otherwise number of bytes for each key.
-
getColumnFamilyId
public long getColumnFamilyId()
Get the ID of column family for this SST file, corresponding to the column family identified bygetColumnFamilyName().- Returns:
- the id of the column family.
-
getCreationTime
public long getCreationTime()
The time when the SST file was created. Since SST files are immutable, this is equivalent to last modified time.- Returns:
- the created time.
-
getOldestKeyTime
public long getOldestKeyTime()
Get the timestamp of the earliest key.- Returns:
- 0 means unknown, otherwise the timestamp.
-
getSlowCompressionEstimatedDataSize
public long getSlowCompressionEstimatedDataSize()
Get the estimated size of data blocks compressed with a relatively slower compression algorithm.- Returns:
- 0 means unknown, otherwise the timestamp.
-
getFastCompressionEstimatedDataSize
public long getFastCompressionEstimatedDataSize()
Get the estimated size of data blocks compressed with a relatively faster compression algorithm.- Returns:
- 0 means unknown, otherwise the timestamp.
-
getColumnFamilyName
public byte[] getColumnFamilyName()
Get the name of the column family with which this SST file is associated.- Returns:
- the name of the column family, or null if the column family is unknown.
-
getFilterPolicyName
public java.lang.String getFilterPolicyName()
Get the name of the filter policy used in this table.- Returns:
- the name of the filter policy, or null if no filter policy is used.
-
getComparatorName
public java.lang.String getComparatorName()
Get the name of the comparator used in this table.- Returns:
- the name of the comparator.
-
getMergeOperatorName
public java.lang.String getMergeOperatorName()
Get the name of the merge operator used in this table.- Returns:
- the name of the merge operator, or null if no merge operator is used.
-
getPrefixExtractorName
public java.lang.String getPrefixExtractorName()
Get the name of the prefix extractor used in this table.- Returns:
- the name of the prefix extractor, or null if no prefix extractor is used.
-
getPropertyCollectorsNames
public java.lang.String getPropertyCollectorsNames()
Get the names of the property collectors factories used in this table.- Returns:
- the names of the property collector factories separated by commas, e.g. {collector_name[1]},{collector_name[2]},...
-
getCompressionName
public java.lang.String getCompressionName()
Get the name of the compression algorithm used to compress the SST files.- Returns:
- the name of the compression algorithm.
-
getUserCollectedProperties
public java.util.Map<java.lang.String,java.lang.String> getUserCollectedProperties()
Get the user collected properties.- Returns:
- the user collected properties.
-
getReadableProperties
public java.util.Map<java.lang.String,java.lang.String> getReadableProperties()
Get the readable properties.- Returns:
- the readable properties.
-
getPropertiesOffsets
public java.util.Map<java.lang.String,java.lang.Long> getPropertiesOffsets()
The offset of the value of each property in the file.- Returns:
- the offset of each property.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-