@ThreadSafe public final class BlockMetricsReporter extends AbstractBlockStoreEventListener
Constructor and Description |
---|
BlockMetricsReporter()
Creates a new instance of
BlockMetricsReporter . |
Modifier and Type | Method and Description |
---|---|
void |
onAbortBlock(long sessionId,
long blockId)
Actions when aborting a temporary block.
|
void |
onAccessBlock(long sessionId,
long blockId)
Actions when accessing a block.
|
void |
onBlockLost(long blockId)
Actions when a block is lost.
|
void |
onMoveBlockByClient(long sessionId,
long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a client from a
BlockStoreLocation to another. |
void |
onMoveBlockByWorker(long sessionId,
long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a worker from a
BlockStoreLocation to another. |
void |
onRemoveBlockByClient(long sessionId,
long blockId)
Actions when removing an existing block.
|
void |
onRemoveBlockByWorker(long sessionId,
long blockId)
Actions when removing an existing block by worker.
|
onAccessBlock, onCommitBlock, onRemoveBlock, onStorageLost, onStorageLost
public BlockMetricsReporter()
BlockMetricsReporter
.public void onAccessBlock(long sessionId, long blockId)
BlockStoreEventListener
onAccessBlock
in interface BlockStoreEventListener
onAccessBlock
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to access this blockblockId
- the id of the block to accesspublic void onMoveBlockByClient(long sessionId, long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreEventListener
BlockStoreLocation
to another.onMoveBlockByClient
in interface BlockStoreEventListener
onMoveBlockByClient
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to move this blockblockId
- 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 sessionId, long blockId)
BlockStoreEventListener
onRemoveBlockByClient
in interface BlockStoreEventListener
onRemoveBlockByClient
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to remove this blockblockId
- the id of the block to be removedpublic void onMoveBlockByWorker(long sessionId, long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreEventListener
BlockStoreLocation
to another.onMoveBlockByWorker
in interface BlockStoreEventListener
onMoveBlockByWorker
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to move this blockblockId
- 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 sessionId, long blockId)
BlockStoreEventListener
onRemoveBlockByWorker
in interface BlockStoreEventListener
onRemoveBlockByWorker
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to remove this blockblockId
- the id of the block to be removedpublic void onAbortBlock(long sessionId, long blockId)
BlockStoreEventListener
onAbortBlock
in interface BlockStoreEventListener
onAbortBlock
in class AbstractBlockStoreEventListener
sessionId
- the id of the session to abort on this blockblockId
- 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.