Package alluxio.worker.block
Interface BlockStoreEventListener
-
public interface BlockStoreEventListener
A listener interface for receiving metadata mutation events ofBlockStore
. All the callback methods are triggered only after the actual event has been completed successfully.All methods may be called concurrently, thus listener implementation needs to ensure thread-safety.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAbortBlock(long blockId)
Actions when aborting a temporary block.void
onAccessBlock(long blockId)
Actions when accessing a block.void
onAccessBlock(long blockId, BlockStoreLocation location)
Actions when accessing a block.void
onBlockLost(long blockId)
Actions when a block is lost.void
onCommitBlockToLocal(long blockId, BlockStoreLocation location)
Actions when committing a temporary block to aBlockStoreLocation
at local block store.void
onCommitBlockToMaster(long blockId, BlockStoreLocation location)
Actions when a temporary block has been committed to the alluxio master.void
onMoveBlockByClient(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
Actions when moving a block by a client from aBlockStoreLocation
to another.void
onMoveBlockByWorker(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
Actions when moving a block by a worker from aBlockStoreLocation
to another.void
onRemoveBlock(long blockId, BlockStoreLocation location)
Actions when removing an existing block.void
onRemoveBlockByClient(long blockId)
Actions when removing an existing block.void
onRemoveBlockByWorker(long blockId)
Actions when removing an existing block by worker.void
onStorageLost(BlockStoreLocation dirLocation)
Actions when a storage dir is lost.void
onStorageLost(java.lang.String tierAlias, java.lang.String dirPath)
Actions when a storage dir is lost.
-
-
-
Method Detail
-
onAccessBlock
void onAccessBlock(long blockId)
Actions when accessing a block.- Parameters:
blockId
- the id of the block to access
-
onAccessBlock
void onAccessBlock(long blockId, BlockStoreLocation location)
Actions when accessing a block.- Parameters:
blockId
- the id of the block to accesslocation
- the location of the block
-
onAbortBlock
void onAbortBlock(long blockId)
Actions when aborting a temporary block.- Parameters:
blockId
- the id of the block where the mutation to abort
-
onCommitBlockToLocal
void onCommitBlockToLocal(long blockId, BlockStoreLocation location)
Actions when committing a temporary block to aBlockStoreLocation
at local block store.- Parameters:
blockId
- the id of the block to commitlocation
- the location of the block to be committed
-
onCommitBlockToMaster
void onCommitBlockToMaster(long blockId, BlockStoreLocation location)
Actions when a temporary block has been committed to the alluxio master.- Parameters:
blockId
- the id of the block to commitlocation
- the location of the block to be committed
-
onMoveBlockByClient
void onMoveBlockByClient(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
Actions when moving a block by a client from aBlockStoreLocation
to another.- Parameters:
blockId
- the id of the block to be movedoldLocation
- the source location of the block to be movednewLocation
- the destination location where the block is to be moved to
-
onMoveBlockByWorker
void onMoveBlockByWorker(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
Actions when moving a block by a worker from aBlockStoreLocation
to another.- Parameters:
blockId
- the id of the block to be movedoldLocation
- the source location of the block to be movednewLocation
- the destination location where the block is to be moved to
-
onRemoveBlockByClient
void onRemoveBlockByClient(long blockId)
Actions when removing an existing block.- Parameters:
blockId
- the id of the block to be removed
-
onRemoveBlockByWorker
void onRemoveBlockByWorker(long blockId)
Actions when removing an existing block by worker.- Parameters:
blockId
- the id of the block to be removed
-
onRemoveBlock
void onRemoveBlock(long blockId, BlockStoreLocation location)
Actions when removing an existing block.- Parameters:
blockId
- the id of the block to be removedlocation
- the location of the block to be removed
-
onBlockLost
void onBlockLost(long blockId)
Actions when a block is lost.- Parameters:
blockId
- the id of the lost block
-
onStorageLost
void onStorageLost(java.lang.String tierAlias, java.lang.String dirPath)
Actions when a storage dir is lost.- Parameters:
tierAlias
- the tier alias of this storagedirPath
- the directory path of this storage
-
onStorageLost
void onStorageLost(BlockStoreLocation dirLocation)
Actions when a storage dir is lost.- Parameters:
dirLocation
- the location of this storage
-
-