mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 07:34:31 -06:00
auto symlink heartbeat file
This commit is contained in:
parent
7beb18730e
commit
d6f679173f
@ -52,6 +52,11 @@ public class ComponentPulse extends UnstartedPeriodicTaskComponent {
|
||||
Heartbeat heartbeat = pulseOf.heartbeat().withHeartbeatDetails(intervalmillis,System.currentTimeMillis());
|
||||
try {
|
||||
Files.writeString(hbpath, heartbeat.toYaml(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||
Files.deleteIfExists(linkpath);
|
||||
Files.createSymbolicLink(
|
||||
linkpath,
|
||||
hbpath.getFileName()
|
||||
);
|
||||
} catch (IOException e) {
|
||||
logger.error("Unable to write heartbeat data to " + hbpath.toString() + ": " + e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user