You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/06/22 06:38:21 UTC

[1/5] storm git commit: STORM-809: opology.message.timeout.secs should not allow null or <= 0

Repository: storm
Updated Branches:
  refs/heads/master 82199b422 -> 9e3e48daf


STORM-809: opology.message.timeout.secs should not allow null or <= 0


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

Branch: refs/heads/master
Commit: 998383ffe58834c52ab7ecdda668681177131cd4
Parents: ea0fe12
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 5 09:02:53 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue May 5 09:02:53 2015 -0500

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/Config.java     |  2 +-
 .../src/jvm/backtype/storm/ConfigValidation.java  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/998383ff/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index a881cb4..4310e8b 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -786,7 +786,7 @@ public class Config extends HashMap<String, Object> {
      * timeout for the topology implementing the DRPC function.
      */
     public static final String DRPC_REQUEST_TIMEOUT_SECS  = "drpc.request.timeout.secs";
-    public static final Object DRPC_REQUEST_TIMEOUT_SECS_SCHEMA = ConfigValidation.IntegerValidator;
+    public static final Object DRPC_REQUEST_TIMEOUT_SECS_SCHEMA = ConfigValidation.NotNullPosIntegerValidator;
 
     /**
      * Childopts for Storm DRPC Java process.

http://git-wip-us.apache.org/repos/asf/storm/blob/998383ff/storm-core/src/jvm/backtype/storm/ConfigValidation.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/ConfigValidation.java b/storm-core/src/jvm/backtype/storm/ConfigValidation.java
index 24991d7..ce0f3de 100644
--- a/storm-core/src/jvm/backtype/storm/ConfigValidation.java
+++ b/storm-core/src/jvm/backtype/storm/ConfigValidation.java
@@ -186,6 +186,24 @@ public class ConfigValidation {
     public static Object MapsValidator = listFv(Map.class, true);
 
     /**
+     * Validates a non null Integer > 0
+     */
+    public static Object NotNullPosIntegerValidator = new FieldValidator() {
+        @Override
+        public void validateField(String name, Object o) throws IllegalArgumentException {
+            final long i;
+            if (o instanceof Number &&
+                    (i = ((Number)o).longValue()) == ((Number)o).doubleValue()) {
+                if (i <= Integer.MAX_VALUE && i > 0) {
+                    return;
+                }
+            }
+
+            throw new IllegalArgumentException("Field " + name + " must be an Integer > 0");
+        }
+    };
+
+    /**
      * Validates a Integer.
      */
     public static Object IntegerValidator = new FieldValidator() {


[3/5] storm git commit: Added in some tests

Posted by sr...@apache.org.
Added in some tests


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

Branch: refs/heads/master
Commit: b5ace2227f403aed732374e99d3a93e9f48a5e98
Parents: 323fea2
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 5 10:17:46 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue May 5 10:17:46 2015 -0500

----------------------------------------------------------------------
 storm-core/test/clj/backtype/storm/config_test.clj | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b5ace222/storm-core/test/clj/backtype/storm/config_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/config_test.clj b/storm-core/test/clj/backtype/storm/config_test.clj
index a7498ba..9750185 100644
--- a/storm-core/test/clj/backtype/storm/config_test.clj
+++ b/storm-core/test/clj/backtype/storm/config_test.clj
@@ -74,6 +74,20 @@
     (is (thrown-cause? java.lang.IllegalArgumentException
           (.validateField validator "test" (inc Integer/MAX_VALUE))))))
 
+(deftest test-pos-integer-validator
+  (let [validator ConfigValidation/NotNullPosIntegerValidator]
+    (is (thrown-cause? java.lang.IllegalArgumentException
+        (.validateField validator "test" nil)))
+    (.validateField validator "test" 1000)
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" 1.34)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" 0)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" -100)))
+    (is (thrown-cause? java.lang.IllegalArgumentException
+          (.validateField validator "test" (inc Integer/MAX_VALUE))))))
+
 (deftest test-integers-validator
   (let [validator ConfigValidation/IntegersValidator]
     (.validateField validator "test" nil)


[5/5] storm git commit: Added STORM-809 to CHANGELOG.

Posted by sr...@apache.org.
Added STORM-809 to CHANGELOG.


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

Branch: refs/heads/master
Commit: 9e3e48daf01ca0cf2d8182e205275df480c45795
Parents: e294c37
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Jun 21 21:24:12 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Jun 21 21:24:12 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/9e3e48da/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91a95d0..ac40baa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-809: topology.message.timeout.secs should not allow for null or <= 0 values
  * STORM-847: Add cli to get the last storm error from the topology
  * STORM-864: Exclude storm-kafka tests from Travis CI build
  * STORM-860: UI: while topology is transitioned to killed, "Activate" button is enabled but not functioning


[2/5] storm git commit: Updated some more configs

Posted by sr...@apache.org.
Updated some more configs


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

Branch: refs/heads/master
Commit: 323fea238bbc6e1250cfe9003d308759a6763f41
Parents: 998383f
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue May 5 09:34:06 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue May 5 09:34:06 2015 -0500

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/Config.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/323fea23/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index 4310e8b..a3fa8d2 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -856,7 +856,7 @@ public class Config extends HashMap<String, Object> {
      * restart the worker process.
      */
     public static final String SUPERVISOR_WORKER_TIMEOUT_SECS = "supervisor.worker.timeout.secs";
-    public static final Object SUPERVISOR_WORKER_TIMEOUT_SECS_SCHEMA = ConfigValidation.IntegerValidator;
+    public static final Object SUPERVISOR_WORKER_TIMEOUT_SECS_SCHEMA = ConfigValidation.NotNullPosIntegerValidator;
 
     /**
      * How many seconds to sleep for before shutting down threads on worker
@@ -871,7 +871,7 @@ public class Config extends HashMap<String, Object> {
      * overhead to starting and configuring the JVM on launch.
      */
     public static final String SUPERVISOR_WORKER_START_TIMEOUT_SECS = "supervisor.worker.start.timeout.secs";
-    public static final Object SUPERVISOR_WORKER_START_TIMEOUT_SECS_SCHEMA = ConfigValidation.IntegerValidator;
+    public static final Object SUPERVISOR_WORKER_START_TIMEOUT_SECS_SCHEMA = ConfigValidation.NotNullPosIntegerValidator;
 
     /**
      * Whether or not the supervisor should launch workers assigned to it. Defaults
@@ -1035,7 +1035,7 @@ public class Config extends HashMap<String, Object> {
      * the message at a later time.
      */
     public static final String TOPOLOGY_MESSAGE_TIMEOUT_SECS = "topology.message.timeout.secs";
-    public static final Object TOPOLOGY_MESSAGE_TIMEOUT_SECS_SCHEMA = ConfigValidation.IntegerValidator;
+    public static final Object TOPOLOGY_MESSAGE_TIMEOUT_SECS_SCHEMA = ConfigValidation.NotNullPosIntegerValidator;
 
     /**
      * A list of serialization registrations for Kryo ( http://code.google.com/p/kryo/ ),
@@ -1128,7 +1128,7 @@ public class Config extends HashMap<String, Object> {
      * synchronization again.
      */
     public static final String TOPOLOGY_STATE_SYNCHRONIZATION_TIMEOUT_SECS="topology.state.synchronization.timeout.secs";
-    public static final Object TOPOLOGY_STATE_SYNCHRONIZATION_TIMEOUT_SECS_SCHEMA = ConfigValidation.IntegerValidator;
+    public static final Object TOPOLOGY_STATE_SYNCHRONIZATION_TIMEOUT_SECS_SCHEMA = ConfigValidation.NotNullPosIntegerValidator;
 
     /**
      * The percentage of tuples to sample to produce stats for a task.


[4/5] storm git commit: Merge branch 'STORM-809' of https://github.com/revans2/incubator-storm into STORM-809

Posted by sr...@apache.org.
Merge branch 'STORM-809' of https://github.com/revans2/incubator-storm into STORM-809


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

Branch: refs/heads/master
Commit: e294c3789926d05f9488293add8fd1a3f0fc840f
Parents: 82199b4 b5ace22
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Jun 21 21:23:02 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Jun 21 21:23:02 2015 -0700

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/Config.java     | 10 +++++-----
 .../src/jvm/backtype/storm/ConfigValidation.java  | 18 ++++++++++++++++++
 .../test/clj/backtype/storm/config_test.clj       | 14 ++++++++++++++
 3 files changed, 37 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/e294c378/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------