Class LocalFileStore

  • All Implemented Interfaces:
    BlockStore

    @ThreadSafe
    public final class LocalFileStore
    extends LocalBlockStore
    Stores blocks in local files.
    • Method Detail

      • createBlock

        public Block createBlock​(String blockId)
        Description copied from interface: BlockStore
        Creates a new block. A stale data created by previous failed task should be handled during the creation of new block.
        Parameters:
        blockId - the ID of the block to create.
        Returns:
        the created block.
      • writeBlock

        public void writeBlock​(Block block)
        Writes a committed block to this store.
        Parameters:
        block - the block to write.
        Throws:
        BlockWriteException - if fail to write.
      • deleteBlock

        public boolean deleteBlock​(String blockId)
        Removes the file that the target block is stored.
        Parameters:
        blockId - of the block.
        Returns:
        whether the block exists or not.