Repository: storm
Updated Branches:
  refs/heads/master f9986fc09 -> ffa607e24


[STORM-2986] create worker artifacts directory if not exists


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6aa941bd
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6aa941bd
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6aa941bd

Branch: refs/heads/master
Commit: 6aa941bdb01e1cf710916c2d53c6839165c82a26
Parents: e8e1a4e
Author: Ethan Li <ethanopensou...@gmail.com>
Authored: Mon Mar 5 17:50:11 2018 -0600
Committer: Ethan Li <ethanopensou...@gmail.com>
Committed: Mon Mar 5 17:51:16 2018 -0600

----------------------------------------------------------------------
 .../org/apache/storm/daemon/logviewer/LogviewerServer.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/6aa941bd/storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/LogviewerServer.java
----------------------------------------------------------------------
diff --git 
a/storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/LogviewerServer.java
 
b/storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/LogviewerServer.java
index a418da3..55a7ffd 100644
--- 
a/storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/LogviewerServer.java
+++ 
b/storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/LogviewerServer.java
@@ -158,12 +158,13 @@ public class LogviewerServer implements AutoCloseable {
         Map<String, Object> conf = ConfigUtils.readStormConfig();
 
         String logRoot = ConfigUtils.workerArtifactsRoot(conf);
-        File logRootFile = new File(logRoot);
-        WorkerLogs workerLogs = new WorkerLogs(conf, logRootFile);
+        File logRootDir = new File(logRoot);
+        logRootDir.mkdirs();
+        WorkerLogs workerLogs = new WorkerLogs(conf, logRootDir);
         DirectoryCleaner directoryCleaner = new DirectoryCleaner();
 
         try (LogviewerServer server = new LogviewerServer(conf);
-             LogCleaner logCleaner = new LogCleaner(conf, workerLogs, 
directoryCleaner, logRootFile)) {
+             LogCleaner logCleaner = new LogCleaner(conf, workerLogs, 
directoryCleaner, logRootDir)) {
             Utils.addShutdownHookWithForceKillIn1Sec(() -> server.close());
             logCleaner.start();
             StormMetricsRegistry.startMetricsReporters(conf);

Reply via email to