public class JournalSpaceMonitor extends Object implements HeartbeatExecutor
Constructor and Description |
---|
JournalSpaceMonitor(AlluxioConfiguration configuration)
Convenience method for
JournalSpaceMonitor(String, long) . |
JournalSpaceMonitor(String journalPath,
long warnCapacityPercentThreshold) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up any resources used by the heartbeat executor.
|
protected List<JournalDiskInfo> |
getDiskInfo()
Gets the current disk information from the system for the journal path.
|
List<String> |
getJournalDiskWarnings() |
void |
heartbeat(long timeLimitMs)
Implements the heartbeat logic.
|
public JournalSpaceMonitor(AlluxioConfiguration configuration)
JournalSpaceMonitor(String, long)
.configuration
- the current alluxio configurationpublic JournalSpaceMonitor(String journalPath, long warnCapacityPercentThreshold)
journalPath
- the path to the journal locationwarnCapacityPercentThreshold
- when a device utilization falls below this threshold,
emit warnings to the logprotected List<JournalDiskInfo> getDiskInfo() throws IOException
IOException
- when obtaining the disk information failspublic List<String> getJournalDiskWarnings()
public void heartbeat(long timeLimitMs) throws InterruptedException
HeartbeatExecutor
heartbeat
in interface HeartbeatExecutor
timeLimitMs
- time limit in milliseconds this heartbeat should not exceed when runningInterruptedException
- if the thread is interruptedpublic void close()
HeartbeatExecutor
close
in interface HeartbeatExecutor
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.