@ThreadSafe public final class BlockHeartbeatReporter extends AbstractBlockStoreEventListener
alluxio.worker.block.BlockWorker#commitBlock(long, long)
.Constructor and Description |
---|
BlockHeartbeatReporter()
Creates a new instance of
BlockHeartbeatReporter . |
Modifier and Type | Method and Description |
---|---|
BlockHeartbeatReport |
generateReport()
Generates the report of the block store delta in the last heartbeat period.
|
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.
|
void |
onStorageLost(String tierAlias,
String dirPath)
Actions when a storage dir is lost.
|
onAbortBlock, onAccessBlock, onAccessBlock, onCommitBlock, onRemoveBlock, onStorageLost
public BlockHeartbeatReporter()
BlockHeartbeatReporter
.public BlockHeartbeatReport generateReport()
public 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 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 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 onBlockLost(long blockId)
BlockStoreEventListener
onBlockLost
in interface BlockStoreEventListener
onBlockLost
in class AbstractBlockStoreEventListener
blockId
- the id of the lost blockpublic void onStorageLost(String tierAlias, String dirPath)
BlockStoreEventListener
onStorageLost
in interface BlockStoreEventListener
onStorageLost
in class AbstractBlockStoreEventListener
tierAlias
- the tier alias of this storagedirPath
- the directory path of this storageCopyright © 2023. All Rights Reserved.