Class MobFile

java.lang.Object
org.apache.hadoop.hbase.mob.MobFile
Direct Known Subclasses:
CachedMobFile

@Private public class MobFile extends Object
The mob file.
  • Field Details

  • Constructor Details

  • Method Details

    • getScanner

      Internal use only. This is used by the sweeper.
      Returns:
      The store file scanner.
      Throws:
      IOException
    • readCell

      public MobCell readCell(ExtendedCell search, boolean cacheMobBlocks) throws IOException
      Reads a cell from the mob file.
      Parameters:
      search - The cell need to be searched in the mob file.
      cacheMobBlocks - Should this scanner cache blocks.
      Returns:
      The cell in the mob file.
      Throws:
      IOException
    • readCell

      public MobCell readCell(ExtendedCell search, boolean cacheMobBlocks, long readPt) throws IOException
      Reads a cell from the mob file.
      Parameters:
      search - The cell need to be searched in the mob file.
      cacheMobBlocks - Should this scanner cache blocks.
      readPt - the read point.
      Returns:
      The cell in the mob file.
      Throws:
      IOException
    • getFileName

      public String getFileName()
      Gets the file name.
      Returns:
      The file name.
    • open

      public void open() throws IOException
      Opens the underlying reader. It's not thread-safe. Use MobFileCache.openFile() instead.
      Throws:
      IOException
    • close

      public void close() throws IOException
      Closes the underlying reader, but do no evict blocks belonging to this file. It's not thread-safe. Use MobFileCache.closeFile() instead.
      Throws:
      IOException
    • create

      public static MobFile create(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf) throws IOException
      Creates an instance of the MobFile.
      Parameters:
      fs - The file system.
      path - The path of the underlying StoreFile.
      conf - The configuration.
      cacheConf - The CacheConfig.
      Returns:
      An instance of the MobFile.
      Throws:
      IOException