diff options
author | HÃ¥kon Hallingstad <hakon@verizonmedia.com> | 2020-12-08 12:33:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 12:33:39 +0100 |
commit | 8681ebd510f3db8fd64f065f3a40466fa3888ef2 (patch) | |
tree | 93897ef2fb0fd4b894cdeef72a1d362a60ee7784 | |
parent | fefcc6ec9e6e3934527ef38952773cf616d2e26f (diff) | |
parent | 3fe6c013b9bf8a4e84abc25c0ec1823d34d8b06a (diff) |
Merge pull request #15733 from vespa-engine/revert-15717-revert-15596-hakonhall/simplify-symlink
Simplify symlink, try 2
-rw-r--r-- | container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java | 9 | ||||
-rw-r--r-- | zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyMetrics.java | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java b/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java index ab246a21a43..75e9febc192 100644 --- a/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java +++ b/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java @@ -298,14 +298,7 @@ public class LogFileHandler extends StreamHandler { if (symlinkName == null) return; File f = new File(fileName); File f2 = new File(f.getParent(), symlinkName); - String canonicalPath; - try { - canonicalPath = f.getCanonicalPath(); - } catch (IOException e) { - logger.warning("Got '" + e + "' while doing f.getCanonicalPath() on file '" + f.getPath() + "'."); - return; - } - String [] cmd = new String[]{"/bin/ln", "-sf", canonicalPath, f2.getPath()}; + String [] cmd = new String[]{"/bin/ln", "-sf", f.getName(), f2.getPath()}; try { int retval = new ProcessExecuter().exec(cmd).getFirst(); // Detonator pattern: Think of all the fun we can have if ln isn't what we diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyMetrics.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyMetrics.java index 22af158faa9..3bfb1fca4d9 100644 --- a/zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyMetrics.java +++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LatencyMetrics.java @@ -77,6 +77,6 @@ public class LatencyMetrics { '}'; } - private double secondsWithMillis(Duration duration) { return round(duration.toMillis()) / 1000.0; } + private double secondsWithMillis(Duration duration) { return duration.toMillis() / 1000.0; } private double roundTo3DecimalPlaces(double value) { return round(value * 1000) / 1000.0; } } |