You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/04/05 00:34:20 UTC

[1/3] storm git commit: Properly validate supervisor.scheduler.meta

Repository: storm
Updated Branches:
  refs/heads/1.x-branch cf7498aea -> add008c85


Properly validate supervisor.scheduler.meta


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

Branch: refs/heads/1.x-branch
Commit: 497d91096fd2fb50ad87c7004de40b808d97dcfe
Parents: cf7498a
Author: David Judd <dj...@stripe.com>
Authored: Tue Mar 21 16:02:01 2017 -0700
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Apr 5 09:33:20 2017 +0900

----------------------------------------------------------------------
 storm-core/src/jvm/org/apache/storm/Config.java | 20 +++++++++---------
 .../org/apache/storm/TestConfigValidate.java    | 22 +++++++++++++++++++-
 2 files changed, 31 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/497d9109/storm-core/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/Config.java b/storm-core/src/jvm/org/apache/storm/Config.java
index e552a09..43df951 100644
--- a/storm-core/src/jvm/org/apache/storm/Config.java
+++ b/storm-core/src/jvm/org/apache/storm/Config.java
@@ -951,7 +951,7 @@ public class Config extends HashMap<String, Object> {
     @Deprecated
     @isString
     public static final String PACEMAKER_HOST = "pacemaker.host";
-    
+
     /**
      * The port Pacemaker should run on. Clients should
      * connect to this port to submit or read heartbeats.
@@ -1178,7 +1178,7 @@ public class Config extends HashMap<String, Object> {
     /**
      * the metadata configured on the supervisor
      */
-    @isType(type=Map.class)
+    @isMapEntryType(keyType = String.class, valueType = String.class)
     public static final String SUPERVISOR_SCHEDULER_META = "supervisor.scheduler.meta";
 
     /**
@@ -1451,7 +1451,7 @@ public class Config extends HashMap<String, Object> {
 
     /**
      * The default heap memory size in MB per worker, used in the jvm -Xmx opts for launching the worker
-      */
+     */
     @isInteger
     @isPositiveNumber
     public static final String WORKER_HEAP_MEMORY_MB = "worker.heap.memory.mb";
@@ -1994,11 +1994,11 @@ public class Config extends HashMap<String, Object> {
     @isInteger
     public static final String TOPOLOGY_TICK_TUPLE_FREQ_SECS="topology.tick.tuple.freq.secs";
 
-   /**
-    * @deprecated this is no longer supported
-    * Configure the wait strategy used for internal queuing. Can be used to tradeoff latency
-    * vs. throughput
-    */
+    /**
+     * @deprecated this is no longer supported
+     * Configure the wait strategy used for internal queuing. Can be used to tradeoff latency
+     * vs. throughput
+     */
     @Deprecated
     @isString
     public static final String TOPOLOGY_DISRUPTOR_WAIT_STRATEGY="topology.disruptor.wait.strategy";
@@ -2284,7 +2284,7 @@ public class Config extends HashMap<String, Object> {
      */
     @isInteger
     public static final String STORM_WORKER_DISRUPTOR_FLUSHER_MAX_POOL_SIZE = "storm.worker.disruptor.flusher.max.pool.size";
-    
+
     public static void setClasspath(Map conf, String cp) {
         conf.put(Config.TOPOLOGY_CLASSPATH, cp);
     }
@@ -2497,4 +2497,4 @@ public class Config extends HashMap<String, Object> {
             this.put(Config.TOPOLOGY_SCHEDULER_STRATEGY, clazz.getName());
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/497d9109/storm-core/test/jvm/org/apache/storm/TestConfigValidate.java
----------------------------------------------------------------------
diff --git a/storm-core/test/jvm/org/apache/storm/TestConfigValidate.java b/storm-core/test/jvm/org/apache/storm/TestConfigValidate.java
index 0e08153..5b52c8d 100644
--- a/storm-core/test/jvm/org/apache/storm/TestConfigValidate.java
+++ b/storm-core/test/jvm/org/apache/storm/TestConfigValidate.java
@@ -59,7 +59,7 @@ public class TestConfigValidate {
         conf.put(Config.PACEMAKER_AUTH_METHOD, "invalid");
         ConfigValidation.validateFields(conf);
     }
-    
+
     @Test
     public void validConfigTest() throws InstantiationException, IllegalAccessException, NoSuchFieldException, NoSuchMethodException, InvocationTargetException {
 
@@ -150,6 +150,26 @@ public class TestConfigValidate {
     }
 
     @Test
+    public void testSupervisorSchedulerMetaIsStringMap() throws InvocationTargetException, NoSuchMethodException, NoSuchFieldException, InstantiationException, IllegalAccessException {
+        Map<String, Object> conf = new HashMap<String, Object>();
+        Map<String, Object> schedulerMeta = new HashMap<String, Object>();
+        conf.put(Config.SUPERVISOR_SCHEDULER_META, schedulerMeta);
+        ConfigValidation.validateFields(conf);
+
+        schedulerMeta.put("foo", "bar");
+
+        conf.put(Config.SUPERVISOR_SCHEDULER_META, schedulerMeta);
+        ConfigValidation.validateFields(conf);
+
+        schedulerMeta.put("baz", true);
+        try {
+            ConfigValidation.validateFields(conf);
+            Assert.fail("Expected Exception not Thrown");
+        } catch (IllegalArgumentException ex) {
+        }
+    }
+
+    @Test
     public void testWorkerChildoptsIsStringOrStringList() throws InvocationTargetException, NoSuchMethodException, NoSuchFieldException, InstantiationException, IllegalAccessException {
         Map<String, Object> conf = new HashMap<String, Object>();
         Collection<Object> passCases = new LinkedList<Object>();


[3/3] storm git commit: STORM-2429: CHANGELOG

Posted by ka...@apache.org.
STORM-2429: CHANGELOG


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

Branch: refs/heads/1.x-branch
Commit: add008c8580dea8b827b01d803e5e544d0eb1eee
Parents: 1831e47
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Apr 5 09:34:07 2017 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Apr 5 09:34:07 2017 +0900

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


http://git-wip-us.apache.org/repos/asf/storm/blob/add008c8/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60423a4..44a3a1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 \ufeff## 1.1.1
+ * STORM-2429: Properly validate supervisor.scheduler.meta
  * STORM-2194: Stop ignoring socket timeout error from executor
  * STORM-2451: windows storm.cmd does not set log4j2 config file correctly by default
 


[2/3] storm git commit: Merge branch 'STORM-2429-1.x-merge' into 1.x-branch

Posted by ka...@apache.org.
Merge branch 'STORM-2429-1.x-merge' into 1.x-branch


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

Branch: refs/heads/1.x-branch
Commit: 1831e47cfd43060cfc22783b2430c337183c8636
Parents: cf7498a 497d910
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Apr 5 09:33:28 2017 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Apr 5 09:33:28 2017 +0900

----------------------------------------------------------------------
 storm-core/src/jvm/org/apache/storm/Config.java | 20 +++++++++---------
 .../org/apache/storm/TestConfigValidate.java    | 22 +++++++++++++++++++-
 2 files changed, 31 insertions(+), 11 deletions(-)
----------------------------------------------------------------------