storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/5] storm git commit: STORM-160 Incorporating the review comments.
Date Mon, 13 Jul 2015 14:00:49 GMT
Repository: storm
Updated Branches:
  refs/heads/master df12823c9 -> f63b1ef53


STORM-160 Incorporating the review comments.


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

Branch: refs/heads/master
Commit: 87772f2a1fd84a3a561543659544ac6cdb7c4537
Parents: 7e81e54
Author: Shyam Rajendran <rshyam.psg@gmail.com>
Authored: Tue Jun 30 15:44:02 2015 -0500
Committer: Shyam Rajendran <rshyam.psg@gmail.com>
Committed: Wed Jul 1 13:10:54 2015 -0500

----------------------------------------------------------------------
 .../src/jvm/backtype/storm/spout/ShellSpout.java   | 17 ++++++++---------
 .../src/jvm/backtype/storm/task/ShellBolt.java     |  1 -
 .../src/jvm/backtype/storm/utils/ShellProcess.java | 12 +++++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/87772f2a/storm-core/src/jvm/backtype/storm/spout/ShellSpout.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/spout/ShellSpout.java b/storm-core/src/jvm/backtype/storm/spout/ShellSpout.java
index 1abee52..91e2629 100644
--- a/storm-core/src/jvm/backtype/storm/spout/ShellSpout.java
+++ b/storm-core/src/jvm/backtype/storm/spout/ShellSpout.java
@@ -25,20 +25,19 @@ import backtype.storm.multilang.ShellMsg;
 import backtype.storm.multilang.SpoutMsg;
 import backtype.storm.task.TopologyContext;
 import backtype.storm.utils.ShellProcess;
-import clojure.lang.RT;
-import com.google.common.util.concurrent.MoreExecutors;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
+import java.util.List;
 import java.util.TimerTask;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
+import clojure.lang.RT;
+import com.google.common.util.concurrent.MoreExecutors;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 public class ShellSpout implements ISpout {
     public static Logger LOG = LoggerFactory.getLogger(ShellSpout.class);
@@ -47,9 +46,9 @@ public class ShellSpout implements ISpout {
     private String[] _command;
     private Map<String, String> env = new HashMap<String, String>();
     private ShellProcess _process;
-
+    
     private TopologyContext _context;
-
+    
     private SpoutMsg _spoutMsg;
 
     private int workerTimeoutMills;

http://git-wip-us.apache.org/repos/asf/storm/blob/87772f2a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
index b246784..814b3fa 100644
--- a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
+++ b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
@@ -99,7 +99,6 @@ public class ShellBolt implements IBolt {
         _command = command;
     }
 
-
     public ShellBolt setEnv(Map<String, String> env) {
         this.env = env;
         return this;

http://git-wip-us.apache.org/repos/asf/storm/blob/87772f2a/storm-core/src/jvm/backtype/storm/utils/ShellProcess.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/ShellProcess.java b/storm-core/src/jvm/backtype/storm/utils/ShellProcess.java
index 8134be7..300bf57 100644
--- a/storm-core/src/jvm/backtype/storm/utils/ShellProcess.java
+++ b/storm-core/src/jvm/backtype/storm/utils/ShellProcess.java
@@ -18,14 +18,16 @@
 package backtype.storm.utils;
 
 import backtype.storm.Config;
-import backtype.storm.multilang.*;
+import backtype.storm.multilang.ISerializer;
+import backtype.storm.multilang.BoltMsg;
+import backtype.storm.multilang.NoOutputException;
+import backtype.storm.multilang.ShellMsg;
+import backtype.storm.multilang.SpoutMsg;
 import backtype.storm.task.TopologyContext;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -53,8 +55,8 @@ public class ShellProcess implements Serializable {
 
     private void modifyEnvironment(Map<String, String> buildEnv) {
         for (Map.Entry<String, String> entry : env.entrySet()) {
-            if (entry.getKey().equals("PATH")) {
-                buildEnv.put("PATH", buildEnv.get("PATH") + ":" + env.get("PATH"));
+            if ("PATH".equals(entry.getKey())) {
+                buildEnv.put("PATH", buildEnv.get("PATH") + File.pathSeparatorChar + env.get("PATH"));
             } else {
                 buildEnv.put(entry.getKey(), entry.getValue());
             }


Mime
View raw message