Class MockHStoreFile

java.lang.Object
org.apache.hadoop.hbase.regionserver.HStoreFile
org.apache.hadoop.hbase.regionserver.MockHStoreFile
All Implemented Interfaces:
org.apache.hadoop.hbase.regionserver.StoreFile

@Private public class MockHStoreFile extends org.apache.hadoop.hbase.regionserver.HStoreFile
A mock used so our tests don't deal with actual StoreFiles
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long
     
    (package private) boolean
     
    (package private) long
     
    (package private) org.apache.hadoop.hbase.HDFSBlocksDistribution
     
    (package private) boolean
     
    (package private) boolean
     
    (package private) long
     
    private Map<byte[],byte[]>
     
    (package private) long
     
    (package private) long
     
    (package private) byte[]
     
    (package private) org.apache.hadoop.hbase.regionserver.TimeRangeTracker
     

    Fields inherited from class org.apache.hadoop.hbase.regionserver.HStoreFile

    BLOOM_FILTER_PARAM_KEY, BLOOM_FILTER_TYPE_KEY, BULKLOAD_TASK_KEY, BULKLOAD_TIME_KEY, COMPACTION_EVENT_KEY, DELETE_FAMILY_COUNT, EARLIEST_PUT_TS, EXCLUDE_FROM_MINOR_COMPACTION_KEY, HISTORICAL_KEY, LAST_BLOOM_KEY, MAJOR_COMPACTION_KEY, MAX_SEQ_ID_KEY, MOB_CELLS_COUNT, MOB_FILE_REFS, NULL_VALUE, SKIP_RESET_SEQ_ID, TIMERANGE_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    MockHStoreFile(HBaseTestingUtil testUtil, org.apache.hadoop.fs.Path testPath, long length, long ageInDisk, boolean isRef, long sequenceid, org.apache.hadoop.hbase.regionserver.StoreFileInfo storeFileInfo)
     
    MockHStoreFile(HBaseTestingUtil testUtil, org.apache.hadoop.fs.Path testPath, long length, long ageInDisk, boolean isRef, long sequenceid, org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker tracker)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.apache.hadoop.hbase.HDFSBlocksDistribution
     
     
    long
     
    byte[]
    getMetadataValue(byte[] key)
     
     
    long
     
    org.apache.hadoop.hbase.regionserver.StoreFileScanner
    getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn)
     
    org.apache.hadoop.hbase.regionserver.StoreFileReader
     
    org.apache.hadoop.hbase.regionserver.StoreFileScanner
    getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn)
     
    void
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    void
     
    (package private) void
    setEntries(long entryCount)
     
    void
    setIsMajor(boolean isMajor)
     
    (package private) void
    setLength(long newLen)
     
    void
    setMetadataValue(byte[] key, byte[] value)
     
    private void
    setMockHStoreFileVals(long length, boolean isRef, long ageInDisk, long sequenceid, boolean isMajor, HBaseTestingUtil testUtil)
     
    (package private) void
    setTimeRangeTracker(org.apache.hadoop.hbase.regionserver.TimeRangeTracker timeRangeTracker)
     

    Methods inherited from class org.apache.hadoop.hbase.regionserver.HStoreFile

    closeStoreFile, decreaseRefCount, decreaseStoreFilesRefeCount, deleteStoreFile, excludeFromMinorCompaction, getCacheConf, getCompactedStoreFiles, getComparator, getEncodedPath, getFileInfo, getFirstKey, getLastKey, getMaxMemStoreTS, getPath, getQualifiedPath, getRefCount, increaseRefCount, increaseStoreFilesRefeCount, isHFile, isHistorical, isReferencedInReads, toString, toStringDetailed

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • MockHStoreFile

      MockHStoreFile(HBaseTestingUtil testUtil, org.apache.hadoop.fs.Path testPath, long length, long ageInDisk, boolean isRef, long sequenceid, org.apache.hadoop.hbase.regionserver.StoreFileInfo storeFileInfo) throws IOException
      Throws:
      IOException
    • MockHStoreFile

      MockHStoreFile(HBaseTestingUtil testUtil, org.apache.hadoop.fs.Path testPath, long length, long ageInDisk, boolean isRef, long sequenceid, org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker tracker) throws IOException
      Throws:
      IOException
  • Method Details

    • setMockHStoreFileVals

      private void setMockHStoreFileVals(long length, boolean isRef, long ageInDisk, long sequenceid, boolean isMajor, HBaseTestingUtil testUtil) throws UnknownHostException
      Throws:
      UnknownHostException
    • setLength

      void setLength(long newLen)
    • getMaxSequenceId

      public long getMaxSequenceId()
      Specified by:
      getMaxSequenceId in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      getMaxSequenceId in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • isMajorCompactionResult

      public boolean isMajorCompactionResult()
      Specified by:
      isMajorCompactionResult in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      isMajorCompactionResult in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • setIsMajor

      public void setIsMajor(boolean isMajor)
    • isReference

      public boolean isReference()
      Specified by:
      isReference in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      isReference in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • isBulkLoadResult

      public boolean isBulkLoadResult()
      Specified by:
      isBulkLoadResult in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      isBulkLoadResult in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getMetadataValue

      public byte[] getMetadataValue(byte[] key)
      Overrides:
      getMetadataValue in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • setMetadataValue

      public void setMetadataValue(byte[] key, byte[] value)
    • setTimeRangeTracker

      void setTimeRangeTracker(org.apache.hadoop.hbase.regionserver.TimeRangeTracker timeRangeTracker)
    • setEntries

      void setEntries(long entryCount)
    • getMinimumTimestamp

      Specified by:
      getMinimumTimestamp in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      getMinimumTimestamp in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getMaximumTimestamp

      Specified by:
      getMaximumTimestamp in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      getMaximumTimestamp in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • markCompactedAway

      public void markCompactedAway()
      Overrides:
      markCompactedAway in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • isCompactedAway

      public boolean isCompactedAway()
      Overrides:
      isCompactedAway in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getModificationTimestamp

      public long getModificationTimestamp()
      Specified by:
      getModificationTimestamp in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      getModificationTimestamp in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getHDFSBlockDistribution

      public org.apache.hadoop.hbase.HDFSBlocksDistribution getHDFSBlockDistribution()
      Overrides:
      getHDFSBlockDistribution in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • initReader

      public void initReader() throws IOException
      Overrides:
      initReader in class org.apache.hadoop.hbase.regionserver.HStoreFile
      Throws:
      IOException
    • getPreadScanner

      public org.apache.hadoop.hbase.regionserver.StoreFileScanner getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn)
      Overrides:
      getPreadScanner in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getStreamScanner

      public org.apache.hadoop.hbase.regionserver.StoreFileScanner getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) throws IOException
      Overrides:
      getStreamScanner in class org.apache.hadoop.hbase.regionserver.HStoreFile
      Throws:
      IOException
    • getReader

      public org.apache.hadoop.hbase.regionserver.StoreFileReader getReader()
      Overrides:
      getReader in class org.apache.hadoop.hbase.regionserver.HStoreFile
    • getBulkLoadTimestamp

      Specified by:
      getBulkLoadTimestamp in interface org.apache.hadoop.hbase.regionserver.StoreFile
      Overrides:
      getBulkLoadTimestamp in class org.apache.hadoop.hbase.regionserver.HStoreFile