@NotThreadSafe public class SpaceReserver extends Object implements HeartbeatExecutor
SpaceReserver
periodically checks the available space on each storage tier. If the
used space is above the high watermark configured for the tier, eviction will be triggered to
reach the low watermark. If this is not the top tier, it will also add the amount of space
reserved on the tier above to reduce the impact of cascading eviction.Constructor and Description |
---|
SpaceReserver(BlockWorker blockWorker)
Creates a new instance of
SpaceReserver . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up any resources used by the heartbeat executor.
|
void |
heartbeat()
Implements the heartbeat logic.
|
void |
updateStorageInfo()
Re-calculates storage spaces and watermarks.
|
public SpaceReserver(BlockWorker blockWorker)
SpaceReserver
.blockWorker
- the block worker handlepublic void updateStorageInfo()
public void heartbeat()
HeartbeatExecutor
heartbeat
in interface HeartbeatExecutor
public void close()
HeartbeatExecutor
close
in interface HeartbeatExecutor
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.