Class StoreFileInfo

java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFileInfo
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

@Private public class StoreFileInfo extends Object implements org.apache.hadoop.conf.Configurable
Describe a StoreFile (hfile, reference, link)
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • HFILE_NAME_REGEX

      public static final String HFILE_NAME_REGEX
      A non-capture group, for hfiles, so that this can be embedded. HFiles are uuid ([0-9a-z]+). Bulk loaded hfiles has (_SeqId_[0-9]+_) has suffix. The mob del file has (_del) as suffix.
      See Also:
    • HFILE_NAME_PATTERN

      private static final Pattern HFILE_NAME_PATTERN
      Regex that will work for hfiles
    • REF_NAME_PATTERN

      private static final Pattern REF_NAME_PATTERN
      Regex that will work for straight reference names (<hfile>.<parentEncRegion>) and hfilelink reference names ( <table> =<region>-<hfile>.<parentEncRegion>) If reference, then the regex has more than just one group. Group 1, hfile/hfilelink pattern, is this file's id. Group 2 '(.+)' is the reference's parent region name.
    • STORE_FILE_READER_NO_READAHEAD

      See Also:
    • DEFAULT_STORE_FILE_READER_NO_READAHEAD

      public static final boolean DEFAULT_STORE_FILE_READER_NO_READAHEAD
      See Also:
    • conf

      private org.apache.hadoop.conf.Configuration conf
    • fs

      private final org.apache.hadoop.fs.FileSystem fs
    • hdfsBlocksDistribution

    • hfileInfo

    • reference

      private final Reference reference
    • initialPath

      private final org.apache.hadoop.fs.Path initialPath
    • coprocessorHost

    • createdTimestamp

      private long createdTimestamp
    • size

      private long size
    • primaryReplica

      private final boolean primaryReplica
    • noReadahead

      private final boolean noReadahead
    • refCount

      private final AtomicInteger refCount
    • SEQ_ID_MARKER

      private static final String SEQ_ID_MARKER
      Cells in a bulkloaded file don't have a sequenceId since they don't go through memstore. When a bulkload file is committed, the current memstore ts is stamped onto the file name as the sequenceId of the file. At read time, the sequenceId is copied onto all of the cells returned so that they can be properly sorted relative to other cells in other files. Further, when opening multiple files for scan, the sequence id is used to ensusre that the bulkload file's scanner is porperly sorted amongst the other scanners. Non-bulkloaded files get their sequenceId from the MAX_MEMSTORE_TS_KEY since those go through the memstore and have true sequenceIds.
      See Also:
    • SEQ_ID_MARKER_LENGTH

      private static final int SEQ_ID_MARKER_LENGTH
  • Constructor Details

    • StoreFileInfo

      public StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path initialPath, boolean primaryReplica) throws IOException
      Create a Store File Info
      Parameters:
      conf - the Configuration to use
      fs - The current file system to use.
      initialPath - The Path of the file
      primaryReplica - true if this is a store file for primary replica, otherwise false.
      Throws:
      IOException
    • StoreFileInfo

      private StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus, org.apache.hadoop.fs.Path initialPath, boolean primaryReplica) throws IOException
      Throws:
      IOException
    • StoreFileInfo

      public StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus) throws IOException
      Create a Store File Info
      Parameters:
      conf - the Configuration to use
      fs - The current file system to use.
      fileStatus - The FileStatus of the file
      Throws:
      IOException
    • StoreFileInfo

      public StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus, HFileLink link)
      Create a Store File Info from an HFileLink
      Parameters:
      conf - The Configuration to use
      fs - The current file system to use
      fileStatus - The FileStatus of the file
    • StoreFileInfo

      public StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus, Reference reference)
      Create a Store File Info from an HFileLink
      Parameters:
      conf - The Configuration to use
      fs - The current file system to use
      fileStatus - The FileStatus of the file
      reference - The reference instance
    • StoreFileInfo

      public StoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus fileStatus, Reference reference, HFileLink link)
      Create a Store File Info from an HFileLink and a Reference
      Parameters:
      conf - The Configuration to use
      fs - The current file system to use
      fileStatus - The FileStatus of the file
      reference - The reference instance
      link - The link instance
  • Method Details