mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -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());
|
Heartbeat heartbeat = pulseOf.heartbeat().withHeartbeatDetails(intervalmillis,System.currentTimeMillis());
|
||||||
try {
|
try {
|
||||||
Files.writeString(hbpath, heartbeat.toYaml(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
Files.writeString(hbpath, heartbeat.toYaml(), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||||
|
Files.deleteIfExists(linkpath);
|
||||||
|
Files.createSymbolicLink(
|
||||||
|
linkpath,
|
||||||
|
hbpath.getFileName()
|
||||||
|
);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Unable to write heartbeat data to " + hbpath.toString() + ": " + e);
|
logger.error("Unable to write heartbeat data to " + hbpath.toString() + ": " + e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user