Package org.rocksdb
Class SstFileMetaData
java.lang.Object
org.rocksdb.SstFileMetaData
- Direct Known Subclasses:
LiveFileMetaData
The metadata that describes a SST file.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSstFileMetaData(String fileName, String path, long size, long smallestSeqno, long largestSeqno, byte[] smallestKey, byte[] largestKey, long numReadsSampled, boolean beingCompacted, long numEntries, long numDeletions, byte[] fileChecksum) Called from JNI C++ -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the file is currently being compacted.byte[]Get the full file checksum iff full file checksum is enabled.fileName()Get the name of the file.byte[]Get the largest user defined key in the file.longGet the largest sequence number in file.longGet the number of deletions.longGet the number of entries.longGet the number of times the file has been read.path()Get the full path where the file locates.longsize()Get the file size in bytes.byte[]Get the smallest user defined key in the file.longGet the smallest sequence number in file.
-
Constructor Details
-
SstFileMetaData
protected SstFileMetaData(String fileName, String path, long size, long smallestSeqno, long largestSeqno, byte[] smallestKey, byte[] largestKey, long numReadsSampled, boolean beingCompacted, long numEntries, long numDeletions, byte[] fileChecksum) Called from JNI C++- Parameters:
fileName- the file namepath- the file pathsize- the size of the filesmallestSeqno- the smallest sequence numberlargestSeqno- the largest sequence numbersmallestKey- the smallest keylargestKey- the largest keynumReadsSampled- the number of reads sampledbeingCompacted- true if the file is being compacted, false otherwisenumEntries- the number of entriesnumDeletions- the number of deletionsfileChecksum- the full file checksum (if enabled)
-
-
Method Details
-
fileName
Get the name of the file.- Returns:
- the name of the file.
-
path
Get the full path where the file locates.- Returns:
- the full path
-
size
public long size()Get the file size in bytes.- Returns:
- file size
-
smallestSeqno
public long smallestSeqno()Get the smallest sequence number in file.- Returns:
- the smallest sequence number
-
largestSeqno
public long largestSeqno()Get the largest sequence number in file.- Returns:
- the largest sequence number
-
smallestKey
public byte[] smallestKey()Get the smallest user defined key in the file.- Returns:
- the smallest user defined key
-
largestKey
public byte[] largestKey()Get the largest user defined key in the file.- Returns:
- the largest user defined key
-
numReadsSampled
public long numReadsSampled()Get the number of times the file has been read.- Returns:
- the number of times the file has been read
-
beingCompacted
public boolean beingCompacted()Returns true if the file is currently being compacted.- Returns:
- true if the file is currently being compacted, false otherwise.
-
numEntries
public long numEntries()Get the number of entries.- Returns:
- the number of entries.
-
numDeletions
public long numDeletions()Get the number of deletions.- Returns:
- the number of deletions.
-
fileChecksum
public byte[] fileChecksum()Get the full file checksum iff full file checksum is enabled.- Returns:
- the file's checksum
-