Class MemoryStore
- java.lang.Object
-
- org.apache.nemo.runtime.executor.data.stores.AbstractBlockStore
-
- org.apache.nemo.runtime.executor.data.stores.LocalBlockStore
-
- org.apache.nemo.runtime.executor.data.stores.MemoryStore
-
- All Implemented Interfaces:
BlockStore
@ThreadSafe public final class MemoryStore extends LocalBlockStore
Store data in local memory.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NonSerializedMemoryBlock
createBlock(java.lang.String blockId)
Creates a new block.boolean
deleteBlock(java.lang.String blockId)
Deletes a block from this store.void
writeBlock(Block block)
Writes a committed block to this store.-
Methods inherited from class org.apache.nemo.runtime.executor.data.stores.LocalBlockStore
getBlockMap, readBlock
-
-
-
-
Method Detail
-
createBlock
public NonSerializedMemoryBlock createBlock(java.lang.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.
- See Also:
BlockStore.createBlock(String)
-
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(java.lang.String blockId)
Description copied from interface:BlockStore
Deletes a block from this store.- Parameters:
blockId
- of the block.- Returns:
- whether the partition exists or not.
- See Also:
BlockStore.deleteBlock(String)
-
-