You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/04/25 17:41:14 UTC

[1/4] git commit: Add escaping of commas to command line options.

Repository: incubator-storm
Updated Branches:
  refs/heads/master 6589660c1 -> a14adf36d


Add escaping of commas to command line options.


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

Branch: refs/heads/master
Commit: 01d4863d8e4471fd6779085002442c749dd169f5
Parents: 7429e1d
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Wed Apr 23 19:06:52 2014 +0000
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Wed Apr 23 19:06:52 2014 +0000

----------------------------------------------------------------------
 bin/storm                                          | 2 +-
 storm-core/src/jvm/backtype/storm/utils/Utils.java | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/01d4863d/bin/storm
----------------------------------------------------------------------
diff --git a/bin/storm b/bin/storm
index bb92f1c..82ea7c4 100755
--- a/bin/storm
+++ b/bin/storm
@@ -51,7 +51,7 @@ JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))
 
 def get_config_opts():
     global CONFIG_OPTS
-    return "-Dstorm.options=" + (','.join(CONFIG_OPTS)).replace(' ', "%%%%")
+    return "-Dstorm.options=" + (','.join(map(lambda x: x.replace(',',"%%comma%%"),CONFIG_OPTS))).replace(' ', "%%%%")
 
 if not os.path.exists(STORM_DIR + "/RELEASE"):
     print "******************************************"

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/01d4863d/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index c15e817..dba987c 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -171,6 +171,7 @@ public class Utils {
             commandOptions = commandOptions.replaceAll("%%%%", " ");
             String[] configs = commandOptions.split(",");
             for (String config : configs) {
+                config = config.replaceAll("%%comma%%", " ");
                 String[] options = config.split("=", 2);
                 if (options.length == 2) {
                     Object val = JSONValue.parse(options[1]);


[3/4] git commit: Merge branch 'comma-fix' of https://github.com/revans2/incubator-storm

Posted by bo...@apache.org.
Merge branch 'comma-fix' of https://github.com/revans2/incubator-storm

STORM-294: Commas not escaped in command line


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

Branch: refs/heads/master
Commit: f60805a49bdf4b394e6d78ab05bb44a226625beb
Parents: 6589660 d646c4b
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Fri Apr 25 15:40:04 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Fri Apr 25 15:40:04 2014 +0000

----------------------------------------------------------------------
 bin/storm                                          | 3 ++-
 storm-core/src/jvm/backtype/storm/utils/Utils.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/4] git commit: Updated encoding to be standards based and generic.

Posted by bo...@apache.org.
Updated encoding to be standards based and generic.


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

Branch: refs/heads/master
Commit: d646c4bfe1c551a14b0784220a7c12d9bb7a1b94
Parents: 01d4863
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Wed Apr 23 22:03:52 2014 +0000
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Wed Apr 23 22:03:52 2014 +0000

----------------------------------------------------------------------
 bin/storm                                          | 3 ++-
 storm-core/src/jvm/backtype/storm/utils/Utils.java | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/d646c4bf/bin/storm
----------------------------------------------------------------------
diff --git a/bin/storm b/bin/storm
index 82ea7c4..bb6e40a 100755
--- a/bin/storm
+++ b/bin/storm
@@ -23,6 +23,7 @@ import subprocess as sub
 import getopt
 import re
 import shlex
+import urllib
 
 def identity(x):
     return x
@@ -51,7 +52,7 @@ JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))
 
 def get_config_opts():
     global CONFIG_OPTS
-    return "-Dstorm.options=" + (','.join(map(lambda x: x.replace(',',"%%comma%%"),CONFIG_OPTS))).replace(' ', "%%%%")
+    return "-Dstorm.options=" + ','.join(map(urllib.quote_plus,CONFIG_OPTS))
 
 if not os.path.exists(STORM_DIR + "/RELEASE"):
     print "******************************************"

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/d646c4bf/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index dba987c..70884d6 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -26,6 +26,7 @@ import java.io.InputStreamReader;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URL;
+import java.net.URLDecoder;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.WritableByteChannel;
@@ -168,10 +169,9 @@ public class Utils {
         Map ret = new HashMap();
         String commandOptions = System.getProperty("storm.options");
         if(commandOptions != null) {
-            commandOptions = commandOptions.replaceAll("%%%%", " ");
             String[] configs = commandOptions.split(",");
             for (String config : configs) {
-                config = config.replaceAll("%%comma%%", " ");
+                config = URLDecoder.decode(config);
                 String[] options = config.split("=", 2);
                 if (options.length == 2) {
                     Object val = JSONValue.parse(options[1]);


[4/4] git commit: Updated Changelog for STORM-294

Posted by bo...@apache.org.
Updated Changelog for STORM-294


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

Branch: refs/heads/master
Commit: a14adf36d4c6a24d6f666c087e4612562e1eb672
Parents: f60805a
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Fri Apr 25 15:40:39 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Fri Apr 25 15:40:39 2014 +0000

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a14adf36/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68e26dc..581501e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.9.2-incubating (unreleased)
+ * STORM-294: Commas not escaped in command line
  * STORM-287: Fix the positioning of documentation strings in clojure code
  * STORM-290: Fix a log binding conflict caused by curator dependencies
  * STORM-289: Fix Trident DRPC memory leak