incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Cleaning up the configuration of the command lib directory.
Date Fri, 31 Oct 2014 13:15:47 GMT
Cleaning up the configuration of the command lib directory.


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

Branch: refs/heads/master
Commit: 5a7d0f9def10a65464a71f8ef7bf96fde368a035
Parents: ac0c74e
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Fri Oct 31 09:15:38 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Oct 31 09:15:38 2014 -0400

----------------------------------------------------------------------
 .../org/apache/blur/thrift/ThriftBlurControllerServer.java    | 6 +++++-
 .../java/org/apache/blur/thrift/ThriftBlurShardServer.java    | 6 +++++-
 .../src/main/java/org/apache/blur/thrift/ThriftServer.java    | 7 ++++++-
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5a7d0f9d/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
index a07fdf9..ab25e20 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
@@ -149,7 +149,11 @@ public class ThriftBlurControllerServer extends ThriftServer {
     int numberOfControllerWorkerCommandThreads = configuration.getInt(BLUR_CONTROLLER_COMMAND_WORKER_THREADS,
16);
     int numberOfControllerDriverCommandThreads = configuration.getInt(BLUR_CONTROLLER_COMMAND_DRIVER_THREADS,
16);
     String commandPath = configuration.get(BLUR_COMMAND_LIB_PATH, getCommandLibPath());
-
+    if (commandPath != null) {
+      LOG.info("Command Path was set to [{0}].", commandPath);
+    } else {
+      LOG.info("Command Path was not set.");
+    }
     final ControllerCommandManager controllerCommandManager = new ControllerCommandManager(tmpPath,
commandPath,
         numberOfControllerWorkerCommandThreads, numberOfControllerDriverCommandThreads, Connection.DEFAULT_TIMEOUT,
         config);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5a7d0f9d/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
index 61c11fc..b19f9cb 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
@@ -245,7 +245,11 @@ public class ThriftBlurShardServer extends ThriftServer {
     int numberOfShardWorkerCommandThreads = configuration.getInt(BLUR_SHARD_COMMAND_WORKER_THREADS,
16);
     int numberOfShardDriverCommandThreads = configuration.getInt(BLUR_SHARD_COMMAND_DRIVER_THREADS,
16);
     String commandPath = configuration.get(BLUR_COMMAND_LIB_PATH, getCommandLibPath());
-
+    if (commandPath != null) {
+      LOG.info("Command Path was set to [{0}].", commandPath);
+    } else {
+      LOG.info("Command Path was not set.");
+    }
     final ShardCommandManager commandManager = new ShardCommandManager(indexServer, tmpPath,
commandPath,
         numberOfShardWorkerCommandThreads, numberOfShardDriverCommandThreads, Connection.DEFAULT_TIMEOUT,
config);
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5a7d0f9d/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
index 57661e3..1fa0258 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftServer.java
@@ -107,7 +107,12 @@ public class ThriftServer {
     if (blurHomeDir == null) {
       return null;
     }
-    return new File(blurHomeDir, "commands").toURI().toString();
+    File file = new File(blurHomeDir, "commands");
+    file.mkdirs();
+    if (file.exists()) {
+      return file.toURI().toString();
+    }
+    return null;
   }
 
   public static String getBlurHomeDir() {


Mime
View raw message