@ThreadSafe public final class BlockMetricsReporter extends AbstractBlockStoreEventListener
Constructor and Description |
---|
BlockMetricsReporter() |
Modifier and Type | Method and Description |
---|---|
void |
onAbortBlock(long blockId)
Actions when aborting a temporary block.
|
void |
onAccessBlock(long blockId)
Actions when accessing a block.
|
void |
onBlockLost(long blockId)
Actions when a block is lost.
|
void |
onMoveBlockByClient(long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a client from a
BlockStoreLocation to another. |
void |
onMoveBlockByWorker(long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a worker from a
BlockStoreLocation to another. |
void |
onRemoveBlockByClient(long blockId)
Actions when removing an existing block.
|
void |
onRemoveBlockByWorker(long blockId)
Actions when removing an existing block by worker.
|
onAccessBlock, onCommitBlockToLocal, onCommitBlockToMaster, onRemoveBlock, onStorageLost, onStorageLost
public void onAccessBlock(long blockId)
BlockStoreEventListener
onAccessBlock
in interface BlockStoreEventListener
onAccessBlock
in class AbstractBlockStoreEventListener
blockId
- the id of the block to accesspublic void onMoveBlockByClient(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreEventListener
BlockStoreLocation
to another.onMoveBlockByClient
in interface BlockStoreEventListener
onMoveBlockByClient
in class AbstractBlockStoreEventListener
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 topublic void onRemoveBlockByClient(long blockId)
BlockStoreEventListener
onRemoveBlockByClient
in interface BlockStoreEventListener
onRemoveBlockByClient
in class AbstractBlockStoreEventListener
blockId
- the id of the block to be removedpublic void onMoveBlockByWorker(long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreEventListener
BlockStoreLocation
to another.onMoveBlockByWorker
in interface BlockStoreEventListener
onMoveBlockByWorker
in class AbstractBlockStoreEventListener
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 topublic void onRemoveBlockByWorker(long blockId)
BlockStoreEventListener
onRemoveBlockByWorker
in interface BlockStoreEventListener
onRemoveBlockByWorker
in class AbstractBlockStoreEventListener
blockId
- the id of the block to be removedpublic void onAbortBlock(long blockId)
BlockStoreEventListener
onAbortBlock
in interface BlockStoreEventListener
onAbortBlock
in class AbstractBlockStoreEventListener
blockId
- the id of the block where the mutation to abortpublic void onBlockLost(long blockId)
BlockStoreEventListener
onBlockLost
in interface BlockStoreEventListener
onBlockLost
in class AbstractBlockStoreEventListener
blockId
- the id of the lost blockCopyright © 2023. All Rights Reserved.