Class DataBlocks.BlockFactory

java.lang.Object
org.apache.hadoop.fs.store.DataBlocks.BlockFactory
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
DataBlocks

public abstract static class DataBlocks.BlockFactory extends Object implements Closeable
Base class for block factories.
  • Constructor Details

  • Method Details

    • create

      public abstract DataBlocks.DataBlock create(long index, int limit, BlockUploadStatistics statistics) throws IOException
      Create a block.
      Parameters:
      index - index of block
      limit - limit of the block.
      statistics - stats to work with
      Returns:
      a new block.
      Throws:
      IOException - raised on errors performing I/O.
    • close

      public void close() throws IOException
      Implement any close/cleanup operation. Base class is a no-op.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - Inherited exception; implementations should avoid raising it.
    • getConf

      protected Configuration getConf()
      Configuration.
      Returns:
      config passed to create the factory.
    • getKeyToBufferDir

      public String getKeyToBufferDir()
      Key to Buffer Directory config for a FS instance.
      Returns:
      String containing key to Buffer dir.