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 2015/11/06 21:52:01 UTC

[1/4] storm git commit: update docs to show boolean constructor arg

Repository: storm
Updated Branches:
  refs/heads/master fe65176a1 -> ed572d2a9


update docs to show boolean constructor arg


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

Branch: refs/heads/master
Commit: fe348412ec95417533a5b6222e4ce1aadd182472
Parents: 76d73e9
Author: Chuck Burgess <cb...@progressrail.com>
Authored: Fri Oct 30 08:20:34 2015 -0500
Committer: Chuck Burgess <cb...@progressrail.com>
Committed: Fri Nov 6 10:00:01 2015 -0600

----------------------------------------------------------------------
 external/flux/README.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/fe348412/external/flux/README.md
----------------------------------------------------------------------
diff --git a/external/flux/README.md b/external/flux/README.md
index 2c5127e..c9b6ba0 100644
--- a/external/flux/README.md
+++ b/external/flux/README.md
@@ -365,6 +365,7 @@ object by calling the constructor that takes a single string as an argument:
     className: "storm.kafka.ZkHosts"
     constructorArgs:
       - "localhost:2181"
+      - true
 ```
 
 ####References


[4/4] storm git commit: Added STORM-1127 to Changelog

Posted by bo...@apache.org.
Added STORM-1127 to Changelog


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

Branch: refs/heads/master
Commit: ed572d2a9af9fb6ab682fd2ab10007079483a496
Parents: f1ec3fe
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Fri Nov 6 14:43:54 2015 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Fri Nov 6 14:43:54 2015 -0600

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


http://git-wip-us.apache.org/repos/asf/storm/blob/ed572d2a/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85bc2ef..3491908 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-1127: allow for boolean arguments (Flux)
  * STORM-1180: FLUX logo wasn't appearing quite right
  * STORM-1138: Storm-hdfs README should be updated with Avro Bolt information
  * STORM-1154: SequenceFileBolt needs unit tests


[3/4] storm git commit: Merge branch 'boolArgs' of https://github.com/ashnazg/storm into STORM-1127

Posted by bo...@apache.org.
Merge branch 'boolArgs' of https://github.com/ashnazg/storm into STORM-1127

STORM-1127: allow for boolean arguments (Flux)


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

Branch: refs/heads/master
Commit: f1ec3fe086295990940fddd24174eeeb3e3e652a
Parents: fe65176 fe34841
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Fri Nov 6 14:43:22 2015 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Fri Nov 6 14:43:22 2015 -0600

----------------------------------------------------------------------
 external/flux/README.md                                |  1 +
 .../main/java/org/apache/storm/flux/FluxBuilder.java   | 13 +++++++++++++
 .../test/java/org/apache/storm/flux/test/TestBolt.java |  4 ++++
 .../test/resources/configs/config-methods-test.yaml    |  1 +
 4 files changed, 19 insertions(+)
----------------------------------------------------------------------



[2/4] storm git commit: allow for boolean arguments;

Posted by bo...@apache.org.
allow for boolean arguments;


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

Branch: refs/heads/master
Commit: 76d73e977f4fddcbf415d51980c9f9bbcd26e0db
Parents: d59eaac
Author: Chuck Burgess <cb...@progressrail.com>
Authored: Thu Oct 29 16:44:28 2015 -0500
Committer: Chuck Burgess <cb...@progressrail.com>
Committed: Fri Nov 6 10:00:01 2015 -0600

----------------------------------------------------------------------
 .../main/java/org/apache/storm/flux/FluxBuilder.java   | 13 +++++++++++++
 .../test/java/org/apache/storm/flux/test/TestBolt.java |  4 ++++
 .../test/resources/configs/config-methods-test.yaml    |  1 +
 3 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/76d73e97/external/flux/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java b/external/flux/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
index 9f15e6b..f7c2575 100644
--- a/external/flux/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
+++ b/external/flux/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
@@ -492,6 +492,12 @@ public class FluxBuilder {
                 constructorParams[i] = args.get(i);
                 continue;
             }
+            if (isPrimitiveBoolean(paramType) && Boolean.class.isAssignableFrom(objectType)){
+                LOG.debug("Its a primitive boolean.");
+                Boolean bool = (Boolean)args.get(i);
+                constructorParams[i] = bool.booleanValue();
+                continue;
+            }
             if(isPrimitiveNumber(paramType) && Number.class.isAssignableFrom(objectType)){
                 LOG.debug("Its a primitive number.");
                 Number num = (Number)args.get(i);
@@ -569,6 +575,9 @@ public class FluxBuilder {
                 LOG.debug("Yes, assignment is possible.");
                 return true;
             }
+            if (isPrimitiveBoolean(paramType) && Boolean.class.isAssignableFrom(objectType)){
+                return true;
+            }
             if(isPrimitiveNumber(paramType) && Number.class.isAssignableFrom(objectType)){
                 return true;
             }
@@ -591,5 +600,9 @@ public class FluxBuilder {
     public static boolean isPrimitiveNumber(Class clazz){
         return clazz.isPrimitive() && !clazz.equals(boolean.class);
     }
+
+    public static boolean isPrimitiveBoolean(Class clazz){
+        return clazz.isPrimitive() && clazz.equals(boolean.class);
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/storm/blob/76d73e97/external/flux/flux-core/src/test/java/org/apache/storm/flux/test/TestBolt.java
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/test/java/org/apache/storm/flux/test/TestBolt.java b/external/flux/flux-core/src/test/java/org/apache/storm/flux/test/TestBolt.java
index 7f11460..40fa841 100644
--- a/external/flux/flux-core/src/test/java/org/apache/storm/flux/test/TestBolt.java
+++ b/external/flux/flux-core/src/test/java/org/apache/storm/flux/test/TestBolt.java
@@ -45,6 +45,10 @@ public class TestBolt extends BaseBasicBolt {
 
     }
 
+    public TestBolt(TestEnum te, float f, boolean b){
+
+    }
+
     @Override
     public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) {
         LOG.info("{}", tuple);

http://git-wip-us.apache.org/repos/asf/storm/blob/76d73e97/external/flux/flux-core/src/test/resources/configs/config-methods-test.yaml
----------------------------------------------------------------------
diff --git a/external/flux/flux-core/src/test/resources/configs/config-methods-test.yaml b/external/flux/flux-core/src/test/resources/configs/config-methods-test.yaml
index 65211ff..5563193 100644
--- a/external/flux/flux-core/src/test/resources/configs/config-methods-test.yaml
+++ b/external/flux/flux-core/src/test/resources/configs/config-methods-test.yaml
@@ -36,6 +36,7 @@ bolts:
     constructorArgs:
       - FOO # enum class
       - 1.0
+      - true
     configMethods:
       - name: "withFoo"
         args: