Interface Store

All Known Implementing Classes:
HMobStore, HStore

@LimitedPrivate("Coprocesssor") @Evolving public 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 Details

  • Method Details

    • getComparator

    • getStorefiles

    • getCompactedFiles

    • 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

    • canSplit

      boolean canSplit()
      Returns whether this store is splittable, i.e., no reference file in this store.
    • hasReferences

      boolean hasReferences()
      Returns true 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

      Returns aggregate size of all HStores used in the last compaction
    • getSize

      long getSize()
      Returns aggregate size of HStore
    • getStorefilesCount

      Returns Count of store files
    • 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

      Returns Number of reference files in this store
    • getNumHFiles

      long getNumHFiles()
      Returns Number of HFiles in this store
    • getStoreSizeUncompressed

      Returns The size of the store files, in bytes, uncompressed.
    • getStorefilesSize

      Returns The size of the store files, in bytes.
    • 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

      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

      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

      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

      Returns The number of cells flushed to disk
    • getFlushedCellsSize

      Returns The total size of data flushed to disk, in bytes
    • getFlushedOutputFileSize

      Returns The total size of out output files on disk, in bytes
    • getCompactedCellsCount

      Returns The number of cells processed during minor compactions
    • getCompactedCellsSize

      Returns The total amount of data processed during minor compactions, in bytes
    • getMajorCompactedCellsCount

      Returns The number of cells processed during major compactions
    • getMajorCompactedCellsSize

      Returns The total amount of data processed during major compactions, in bytes
    • 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

      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

    • isSloppyMemStore

      boolean isSloppyMemStore()
      Returns true if the memstore may need some extra memory space
    • getCurrentParallelPutCount

    • getMemstoreOnlyRowReadsCount

      Returns the number of read requests purely from the memstore.
    • 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

      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.