Interface Store
Interface for objects that hold a column family in a Region. Its a memstore and a set of zero or
more StoreFiles, which stretch backwards over time.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
The default priority for user-specified compaction requests. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canSplit()
Returns whether this store is splittable, i.e., no reference file in this store.Returns Average age of store files in this storelong
Returns count of requests which could have used bloom filters, but they weren't configured or loaded.long
Returns count of negative results for bloom filter requests for this store.long
Returns count of bloom filter results for this store.long
Returns The number of cells processed during minor compactionslong
Returns The total amount of data processed during minor compactions, in bytesCollection<? extends StoreFile>
int
Returns Count of compacted store filesdouble
This value can represent the degree of emergency of compaction for this store.int
int
org.apache.hadoop.fs.FileSystem
long
Returns The number of cells flushed to disklong
Returns The total size of data flushed to disk, in byteslong
Returns The total size of out output files on disk, in byteslong
Returns The size of only the store files which are HFiles, in bytes.long
Returns aggregate size of all HStores used in the last compactionlong
Returns The number of cells processed during major compactionslong
Returns The total amount of data processed during major compactions, in bytesReturns The maximum memstoreTS in all store files.Returns The maximum sequence id in all store files.Returns Max age of store files in this storelong
Returns the number of read requests purely from the memstore.Returns The size of this store's memstore.Returns Min age of store files in this storelong
Returns the number of read requests from the files under this store.long
Returns Number of HFiles in this storelong
Returns Number of reference files in this storeorg.apache.hadoop.conf.Configuration
Returns the parent region info hosting this storelong
getSize()
Returns aggregate size of HStorelong
Returns size of the memstore snapshotCollection<? extends StoreFile>
int
Returns Count of store fileslong
Returns The size of the store file root-level indexes, in bytes.long
Returns The size of the store files, in bytes.long
Returns The size of the store files, in bytes, uncompressed.long
Returns the total byte size of all Bloom filter bit arrays.long
Returns the total size of all index blocks in the data block indexes, including the root level, intermediate levels, and the leaf level for multi-level indexes, or just the root level for single-level indexes.boolean
Returnstrue
if the store has any underlying reference files to older HFilesboolean
Returns Whether this store has too many store files.boolean
boolean
Returns true if the memstore may need some extra memory spaceboolean
See if there's too much store files in this storevoid
Checks the underlying store files, and opens the files that have not been opened, and removes the store file readers for store files no longer available.boolean
Tests whether we should run a major compaction.long
When was the last edit done in the memstore
-
Field Details
-
PRIORITY_USER
The default priority for user-specified compaction requests. The user gets top priority unless we have blocking compactions. (Pri <= 0)- See Also:
-
NO_PRIORITY
- See Also:
-
-
Method Details
-
getComparator
-
getStorefiles
Collection<? extends StoreFile> getStorefiles() -
getCompactedFiles
Collection<? extends StoreFile> getCompactedFiles() -
timeOfOldestEdit
long timeOfOldestEdit()When was the last edit done in the memstore -
getFileSystem
org.apache.hadoop.fs.FileSystem getFileSystem() -
shouldPerformMajorCompaction
Tests whether we should run a major compaction. For example, if the configured major compaction interval is reached.- Returns:
- true if we should run a major compaction.
- Throws:
IOException
-
needsCompaction
boolean needsCompaction()See if there's too much store files in this store- Returns:
true
if number of store files is greater than the number defined in minFilesToCompact
-
getCompactPriority
int getCompactPriority() -
canSplit
boolean canSplit()Returns whether this store is splittable, i.e., no reference file in this store. -
hasReferences
boolean hasReferences()Returnstrue
if the store has any underlying reference files to older HFiles -
getMemStoreSize
Returns The size of this store's memstore. -
getFlushableSize
- Returns:
- The amount of memory we could flush from this memstore; usually this is equal to
getMemStoreSize()
unless we are carrying snapshots and then it will be the size of outstanding snapshots.
-
getSnapshotSize
Returns size of the memstore snapshot -
getColumnFamilyDescriptor
-
getMaxSequenceId
Returns The maximum sequence id in all store files. -
getMaxMemStoreTS
Returns The maximum memstoreTS in all store files. -
getLastCompactSize
long getLastCompactSize()Returns aggregate size of all HStores used in the last compaction -
getSize
long getSize()Returns aggregate size of HStore -
getStorefilesCount
int getStorefilesCount()Returns Count of store files -
getCompactedFilesCount
int getCompactedFilesCount()Returns Count of compacted store files -
getMaxStoreFileAge
Returns Max age of store files in this store -
getMinStoreFileAge
Returns Min age of store files in this store -
getAvgStoreFileAge
Returns Average age of store files in this store -
getNumReferenceFiles
long getNumReferenceFiles()Returns Number of reference files in this store -
getNumHFiles
long getNumHFiles()Returns Number of HFiles in this store -
getStoreSizeUncompressed
long getStoreSizeUncompressed()Returns The size of the store files, in bytes, uncompressed. -
getStorefilesSize
long getStorefilesSize()Returns The size of the store files, in bytes. -
getHFilesSize
long getHFilesSize()Returns The size of only the store files which are HFiles, in bytes. -
getStorefilesRootLevelIndexSize
Returns The size of the store file root-level indexes, in bytes. -
getTotalStaticIndexSize
long getTotalStaticIndexSize()Returns the total size of all index blocks in the data block indexes, including the root level, intermediate levels, and the leaf level for multi-level indexes, or just the root level for single-level indexes.- Returns:
- the total size of block indexes in the store
-
getTotalStaticBloomSize
long getTotalStaticBloomSize()Returns the total byte size of all Bloom filter bit arrays. For compound Bloom filters even the Bloom blocks currently not loaded into the block cache are counted.- Returns:
- the total size of all Bloom filters in the store
-
getRegionInfo
Returns the parent region info hosting this store -
areWritesEnabled
boolean areWritesEnabled() -
getSmallestReadPoint
long getSmallestReadPoint()- Returns:
- The smallest mvcc readPoint across all the scanners in this region. Writes older than this readPoint, are included in every read operation.
-
getColumnFamilyName
-
getTableName
-
getFlushedCellsCount
long getFlushedCellsCount()Returns The number of cells flushed to disk -
getFlushedCellsSize
long getFlushedCellsSize()Returns The total size of data flushed to disk, in bytes -
getFlushedOutputFileSize
long getFlushedOutputFileSize()Returns The total size of out output files on disk, in bytes -
getCompactedCellsCount
long getCompactedCellsCount()Returns The number of cells processed during minor compactions -
getCompactedCellsSize
long getCompactedCellsSize()Returns The total amount of data processed during minor compactions, in bytes -
getMajorCompactedCellsCount
long getMajorCompactedCellsCount()Returns The number of cells processed during major compactions -
getMajorCompactedCellsSize
long getMajorCompactedCellsSize()Returns The total amount of data processed during major compactions, in bytes -
hasTooManyStoreFiles
boolean hasTooManyStoreFiles()Returns Whether this store has too many store files. -
refreshStoreFiles
Checks the underlying store files, and opens the files that have not been opened, and removes the store file readers for store files no longer available. Mainly used by secondary region replicas to keep up to date with the primary region files.- Throws:
IOException
-
getCompactionPressure
double getCompactionPressure()This value can represent the degree of emergency of compaction for this store. It should be greater than or equal to 0.0, any value greater than 1.0 means we have too many store files.- if getStorefilesCount <= getMinFilesToCompact, return 0.0
- return (getStorefilesCount - getMinFilesToCompact) / (blockingFileCount - getMinFilesToCompact)
And for striped stores, we should calculate this value by the files in each stripe separately and return the maximum value.
It is similar to
getCompactPriority()
except that it is more suitable to use in a linear formula. -
isPrimaryReplicaStore
boolean isPrimaryReplicaStore() -
isSloppyMemStore
boolean isSloppyMemStore()Returns true if the memstore may need some extra memory space -
getCurrentParallelPutCount
-
getMemstoreOnlyRowReadsCount
long getMemstoreOnlyRowReadsCount()Returns the number of read requests purely from the memstore. -
getMixedRowReadsCount
long getMixedRowReadsCount()Returns the number of read requests from the files under this store. -
getReadOnlyConfiguration
org.apache.hadoop.conf.Configuration getReadOnlyConfiguration()- Returns:
- a read only configuration of this store; throws
UnsupportedOperationException
if you try to set a configuration.
-
getBloomFilterRequestsCount
long getBloomFilterRequestsCount()Returns count of bloom filter results for this store. -
getBloomFilterNegativeResultsCount
Returns count of negative results for bloom filter requests for this store. -
getBloomFilterEligibleRequestsCount
Returns count of requests which could have used bloom filters, but they weren't configured or loaded.
-