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/22 18:44:20 UTC

[1/6] git commit: Treat command line "-c" option number config values as such (STORM-173)

Repository: incubator-storm
Updated Branches:
  refs/heads/master 93612f565 -> 6a08855b4


Treat command line "-c" option number config values as such (STORM-173)

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

Branch: refs/heads/master
Commit: c4ff804c30b331be0af032f01d1b2819d62c7dc2
Parents: 1be3d0f
Author: Danijel Schiavuzzi <da...@infobip.com>
Authored: Fri Apr 11 18:11:55 2014 +0200
Committer: Danijel Schiavuzzi <da...@infobip.com>
Committed: Fri Apr 11 18:11:55 2014 +0200

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/StormSubmitter.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/c4ff804c/storm-core/src/jvm/backtype/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/StormSubmitter.java b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
index 53c8643..c7305de 100644
--- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
@@ -21,11 +21,14 @@ import backtype.storm.generated.*;
 import backtype.storm.utils.BufferFileInputStream;
 import backtype.storm.utils.NimbusClient;
 import backtype.storm.utils.Utils;
+
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.apache.commons.lang.math.NumberUtils;
 import org.apache.thrift.TException;
 import org.json.simple.JSONValue;
 
@@ -78,6 +81,12 @@ public class StormSubmitter {
         }
         stormConf = new HashMap(stormConf);
         stormConf.putAll(Utils.readCommandLineOpts());
+        for (Object confName : stormConf.keySet()) {
+            String confValue = String.valueOf(stormConf.get(confName));
+            if (NumberUtils.isNumber(confValue)) {
+                stormConf.put(confName, NumberUtils.createNumber(confValue));
+            }
+        }
         Map conf = Utils.readStormConfig();
         conf.putAll(stormConf);
         try {


[5/6] git commit: Merge branch 'STORM-173-storm-number-config-value' of https://github.com/dschiavu/incubator-storm STORM-173: Treat command line "-c" option number config values as such

Posted by bo...@apache.org.
Merge branch 'STORM-173-storm-number-config-value' of https://github.com/dschiavu/incubator-storm
STORM-173: Treat command line "-c" option number config values as such


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

Branch: refs/heads/master
Commit: 3b518d11ff2909d11821bd1f78043a19129cf275
Parents: 93612f5 b81ba5e
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Tue Apr 22 16:40:57 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Tue Apr 22 16:40:57 2014 +0000

----------------------------------------------------------------------
 .../src/jvm/backtype/storm/StormSubmitter.java  | 20 +++++++++----
 .../src/jvm/backtype/storm/utils/Utils.java     | 31 ++++++++++++--------
 2 files changed, 33 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[3/6] git commit: Parse command line options as JSON values (STORM-173)

Posted by bo...@apache.org.
Parse command line options as JSON values (STORM-173)

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

Branch: refs/heads/master
Commit: a0e2aa6e37ddfd1174c3430499de2b18b34052c5
Parents: 442d8e7
Author: Danijel Schiavuzzi <da...@infobip.com>
Authored: Thu Apr 17 10:25:54 2014 +0200
Committer: Danijel Schiavuzzi <da...@infobip.com>
Committed: Thu Apr 17 10:25:54 2014 +0200

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/utils/Utils.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a0e2aa6e/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 bc0ba7e..2aa7b3e 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -172,13 +172,13 @@ public class Utils {
             commandOptions = commandOptions.replaceAll("%%%%", " ");
             String[] configs = commandOptions.split(",");
             for (String config : configs) {
-                String[] options = config.split("=");
+                String[] options = config.split("=", 2);
                 if (options.length == 2) {
-                    Object confValue = options[1];
-                    if (NumberUtils.isNumber(options[1])) {
-                        confValue = NumberUtils.createNumber(String.valueOf(confValue));
+                    Object val = JSONValue.parse(options[1]);
+                    if (val == null) {
+                        val = options[1];
                     }
-                    ret.put(options[0], confValue);
+                    ret.put(options[0], val);
                 }
             }
         }


[4/6] git commit: Clean up imports (STORM-173)

Posted by bo...@apache.org.
Clean up imports (STORM-173)

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

Branch: refs/heads/master
Commit: b81ba5ee75627312719c713b6c3030b237b342d2
Parents: a0e2aa6
Author: Danijel Schiavuzzi <da...@infobip.com>
Authored: Thu Apr 17 15:42:20 2014 +0200
Committer: Danijel Schiavuzzi <da...@infobip.com>
Committed: Thu Apr 17 15:42:20 2014 +0200

----------------------------------------------------------------------
 .../src/jvm/backtype/storm/StormSubmitter.java  | 21 +++++++++-------
 .../src/jvm/backtype/storm/utils/Utils.java     | 25 ++++++++++----------
 2 files changed, 25 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/b81ba5ee/storm-core/src/jvm/backtype/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/StormSubmitter.java b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
index 5ef372f..2fd0ce8 100644
--- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
@@ -17,20 +17,25 @@
  */
 package backtype.storm;
 
-import backtype.storm.generated.*;
-import backtype.storm.utils.BufferFileInputStream;
-import backtype.storm.utils.NimbusClient;
-import backtype.storm.utils.Utils;
-
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.lang.math.NumberUtils;
 import org.apache.thrift.TException;
 import org.json.simple.JSONValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import backtype.storm.generated.AlreadyAliveException;
+import backtype.storm.generated.ClusterSummary;
+import backtype.storm.generated.InvalidTopologyException;
+import backtype.storm.generated.Nimbus;
+import backtype.storm.generated.StormTopology;
+import backtype.storm.generated.SubmitOptions;
+import backtype.storm.generated.TopologySummary;
+import backtype.storm.utils.BufferFileInputStream;
+import backtype.storm.utils.NimbusClient;
+import backtype.storm.utils.Utils;
 
 /**
  * Use this class to submit topologies to run on the Storm cluster. You should run your program

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/b81ba5ee/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 2aa7b3e..c15e817 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -17,23 +17,12 @@
  */
 package backtype.storm.utils;
 
-import backtype.storm.Config;
-import backtype.storm.generated.ComponentCommon;
-import backtype.storm.generated.ComponentObject;
-import backtype.storm.generated.StormTopology;
-import clojure.lang.IFn;
-import clojure.lang.RT;
-
-import com.netflix.curator.framework.CuratorFramework;
-import com.netflix.curator.framework.CuratorFrameworkFactory;
-import com.netflix.curator.retry.ExponentialBackoffRetry;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URL;
@@ -51,11 +40,21 @@ import java.util.TreeMap;
 import java.util.UUID;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.math.NumberUtils;
 import org.apache.thrift.TException;
 import org.json.simple.JSONValue;
 import org.yaml.snakeyaml.Yaml;
 
+import backtype.storm.Config;
+import backtype.storm.generated.ComponentCommon;
+import backtype.storm.generated.ComponentObject;
+import backtype.storm.generated.StormTopology;
+import clojure.lang.IFn;
+import clojure.lang.RT;
+
+import com.netflix.curator.framework.CuratorFramework;
+import com.netflix.curator.framework.CuratorFrameworkFactory;
+import com.netflix.curator.retry.ExponentialBackoffRetry;
+
 public class Utils {
     public static final String DEFAULT_STREAM_ID = "default";
 


[2/6] git commit: Move command line options values introspection logic to Utils#readCommandLineOpts (STORM-173)

Posted by bo...@apache.org.
Move command line options values introspection logic to
Utils#readCommandLineOpts (STORM-173)

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

Branch: refs/heads/master
Commit: 442d8e75103f425d211a022184621072326925f0
Parents: c4ff804
Author: Danijel Schiavuzzi <da...@infobip.com>
Authored: Wed Apr 16 18:01:34 2014 +0200
Committer: Danijel Schiavuzzi <da...@infobip.com>
Committed: Wed Apr 16 18:01:34 2014 +0200

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/StormSubmitter.java |  6 ------
 storm-core/src/jvm/backtype/storm/utils/Utils.java    | 10 +++++++++-
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/442d8e75/storm-core/src/jvm/backtype/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/StormSubmitter.java b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
index c7305de..5ef372f 100644
--- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
@@ -81,12 +81,6 @@ public class StormSubmitter {
         }
         stormConf = new HashMap(stormConf);
         stormConf.putAll(Utils.readCommandLineOpts());
-        for (Object confName : stormConf.keySet()) {
-            String confValue = String.valueOf(stormConf.get(confName));
-            if (NumberUtils.isNumber(confValue)) {
-                stormConf.put(confName, NumberUtils.createNumber(confValue));
-            }
-        }
         Map conf = Utils.readStormConfig();
         conf.putAll(stormConf);
         try {

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/442d8e75/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 7979e4b..bc0ba7e 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -23,9 +23,11 @@ import backtype.storm.generated.ComponentObject;
 import backtype.storm.generated.StormTopology;
 import clojure.lang.IFn;
 import clojure.lang.RT;
+
 import com.netflix.curator.framework.CuratorFramework;
 import com.netflix.curator.framework.CuratorFrameworkFactory;
 import com.netflix.curator.retry.ExponentialBackoffRetry;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.FileOutputStream;
@@ -47,7 +49,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.UUID;
+
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.math.NumberUtils;
 import org.apache.thrift.TException;
 import org.json.simple.JSONValue;
 import org.yaml.snakeyaml.Yaml;
@@ -170,7 +174,11 @@ public class Utils {
             for (String config : configs) {
                 String[] options = config.split("=");
                 if (options.length == 2) {
-                    ret.put(options[0], options[1]);
+                    Object confValue = options[1];
+                    if (NumberUtils.isNumber(options[1])) {
+                        confValue = NumberUtils.createNumber(String.valueOf(confValue));
+                    }
+                    ret.put(options[0], confValue);
                 }
             }
         }


[6/6] git commit: Updated Changelog for STORM-173

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


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

Branch: refs/heads/master
Commit: 6a08855b48be8208cef5862246342b230d0f68cd
Parents: 3b518d1
Author: Robert (Bobby) Evans <bo...@apache.org>
Authored: Tue Apr 22 16:41:51 2014 +0000
Committer: Robert (Bobby) Evans <bo...@apache.org>
Committed: Tue Apr 22 16:41:51 2014 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/6a08855b/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f3bcd3a..79b08eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.9.2-incubating (unreleased)
+ * STORM-173: Treat command line "-c" option number config values as such
  * STORM-194: Support list of strings in *.worker.childopts, handle spaces
  * STORM-288: Fixes version spelling in pom.xml
  * STORM-208: Add storm-kafka as an external module