asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject incubator-asterixdb git commit: Improve creating log directory
Date Fri, 27 May 2016 00:44:23 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master e4cf91f12 -> ed57fe772


Improve creating log directory

Change-Id: I1d3df0dbdb46df30b2e6467896e3a224cb7911a6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/890
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/ed57fe77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/ed57fe77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/ed57fe77

Branch: refs/heads/master
Commit: ed57fe77209f58f4b8c4880fb213da46eeb129fa
Parents: e4cf91f
Author: Chris Hillery <chillery@lambda.nu>
Authored: Thu May 26 17:00:27 2016 -0700
Committer: Chris Hillery <ceej@lambda.nu>
Committed: Thu May 26 17:41:28 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hyracks/control/nc/service/NCService.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ed57fe77/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
index ea220c1..e3fe959 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
@@ -140,7 +140,10 @@ public class NCService {
                 pb.redirectErrorStream(true);
                 File log = new File(config.logdir);
                 if (! log.mkdirs()) {
-                    throw new IOException(config.logdir + ": cannot create");
+                    if (! log.isDirectory()) {
+                        throw new IOException(config.logdir + ": cannot create");
+                    }
+                    // If the directory IS there, all is well
                 }
                 File logfile = new File(config.logdir, "nc-" + ncId + ".log");
                 pb.redirectOutput(ProcessBuilder.Redirect.appendTo(logfile));


Mime
View raw message