[3/4] storm git commit: Merge branch 'storm1106' of https://github.com/kishorvpatil/incubator-storm

2015-10-15 Thread kishorvpatil
Merge branch 'storm1106' of https://github.com/kishorvpatil/incubator-storm


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

Branch: refs/heads/master
Commit: 4b4c2451915c2741fa2f60c69bc9de942cef807a
Parents: 93043e6 5a29b30
Author: Kishor Patil 
Authored: Wed Oct 14 23:14:17 2015 -0500
Committer: Kishor Patil 
Committed: Wed Oct 14 23:14:17 2015 -0500

--
 storm-core/src/jvm/backtype/storm/Config.java |  2 ++
 .../src/jvm/backtype/storm/messaging/netty/Client.java| 10 ++
 2 files changed, 4 insertions(+), 8 deletions(-)
--




[1/2] storm git commit: Merge branch 'storm1106' of https://github.com/kishorvpatil/incubator-storm

2015-10-15 Thread kishorvpatil
Repository: storm
Updated Branches:
  refs/heads/0.10.x-branch b2d366a35 -> 53d04359f


Merge branch 'storm1106' of https://github.com/kishorvpatil/incubator-storm


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

Branch: refs/heads/0.10.x-branch
Commit: 0fdcb96fd962dd60524d4a1e3c9830c810aec254
Parents: b2d366a
Author: Kishor Patil 
Authored: Wed Oct 14 23:14:17 2015 -0500
Committer: Kishor Patil 
Committed: Thu Oct 15 14:19:23 2015 +

--
 storm-core/src/jvm/backtype/storm/Config.java |  2 ++
 .../src/jvm/backtype/storm/messaging/netty/Client.java| 10 ++
 2 files changed, 4 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/0fdcb96f/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 f6ec3ca..ebfec82 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -72,7 +72,9 @@ public class Config extends HashMap {
 
 /**
  * Netty based messaging: The max # of retries that a peer will perform 
when a remote is not accessible
+ *@deprecated "Since netty clients should never stop reconnecting - this 
does not make sense anymore.
  */
+@Deprecated
 public static final String STORM_MESSAGING_NETTY_MAX_RETRIES = 
"storm.messaging.netty.max_retries";
 public static final Object STORM_MESSAGING_NETTY_MAX_RETRIES_SCHEMA = 
ConfigValidation.IntegerValidator;
 

http://git-wip-us.apache.org/repos/asf/storm/blob/0fdcb96f/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
--
diff --git a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java 
b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
index 8697907..2149c0d 100644
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
@@ -79,12 +79,6 @@ public class Client extends ConnectionWithStatus implements 
IStatefulObject {
  */
 private final AtomicReference channelRef = new 
AtomicReference();
 
-
-/**
- * Maximum number of reconnection attempts we will perform after a 
disconnect before giving up.
- */
-private final int maxReconnectionAttempts;
-
 /**
  * Total number of connection attempts.
  */
@@ -134,7 +128,7 @@ public class Client extends ConnectionWithStatus implements 
IStatefulObject {
 LOG.info("creating Netty Client, connecting to {}:{}, bufferSize: {}", 
host, port, bufferSize);
 int messageBatchSize = 
Utils.getInt(stormConf.get(Config.STORM_NETTY_MESSAGE_BATCH_SIZE), 262144);
 
-maxReconnectionAttempts = 
Utils.getInt(stormConf.get(Config.STORM_MESSAGING_NETTY_MAX_RETRIES));
+int maxReconnectionAttempts = 
Utils.getInt(stormConf.get(Config.STORM_MESSAGING_NETTY_MAX_RETRIES));
 int minWaitMs = 
Utils.getInt(stormConf.get(Config.STORM_MESSAGING_NETTY_MIN_SLEEP_MS));
 int maxWaitMs = 
Utils.getInt(stormConf.get(Config.STORM_MESSAGING_NETTY_MAX_SLEEP_MS));
 retryPolicy = new StormBoundedExponentialBackoffRetry(minWaitMs, 
maxWaitMs, maxReconnectionAttempts);
@@ -171,7 +165,7 @@ public class Client extends ConnectionWithStatus implements 
IStatefulObject {
 }
 
 private boolean reconnectingAllowed() {
-return !closing && connectionAttempts.get() <= 
(maxReconnectionAttempts + 1);
+return !closing;
 }
 
 private boolean connectionEstablished(Channel channel) {



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

2015-10-15 Thread kishorvpatil
Added STORM-1106 to Changelog


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

Branch: refs/heads/master
Commit: 9fe97b6ea8fa84a34f846291735acac8d6399107
Parents: 4b4c245
Author: Kishor Patil 
Authored: Wed Oct 14 23:16:38 2015 -0500
Committer: Kishor Patil 
Committed: Wed Oct 14 23:16:38 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/9fe97b6e/CHANGELOG.md
--
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5578808..0cc9686 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-1106: Netty should not limit attempts to reconnect
  * STORM-1103: Changes log message to DEBUG from INFO
  * STORM-1104: Nimbus HA fails to find newly downloaded code files
  * STORM-1087: Avoid issues with transfer-queue backpressure.



[1/2] storm git commit: STORM-1108: Fix NPE in simulated time.

2015-10-15 Thread kabhwan
Repository: storm
Updated Branches:
  refs/heads/0.10.x-branch 53d04359f -> 4be3642eb


STORM-1108: Fix NPE in simulated time.


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

Branch: refs/heads/0.10.x-branch
Commit: a1649c5485f14fa94d1e80bd1f212a3e165afdc8
Parents: 53d0435
Author: Robert (Bobby) Evans 
Authored: Wed Oct 14 13:33:27 2015 -0500
Committer: Jungtaek Lim 
Committed: Fri Oct 16 08:59:06 2015 +0900

--
 storm-core/src/jvm/backtype/storm/utils/Time.java | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/a1649c54/storm-core/src/jvm/backtype/storm/utils/Time.java
--
diff --git a/storm-core/src/jvm/backtype/storm/utils/Time.java 
b/storm-core/src/jvm/backtype/storm/utils/Time.java
index 50a79fd..6af7185 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Time.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Time.java
@@ -58,14 +58,24 @@ public class Time {
 if(simulating.get()) {
 try {
 synchronized(sleepTimesLock) {
+if (threadSleepTimes == null) {
+LOG.debug("{} is still sleeping after simulated time 
disabled.", Thread.currentThread(), new RuntimeException("STACK TRACE"));
+throw new InterruptedException();
+}
 threadSleepTimes.put(Thread.currentThread(), new 
AtomicLong(targetTimeMs));
 }
 while(simulatedCurrTimeMs.get() < targetTimeMs) {
+synchronized(sleepTimesLock) {
+if (threadSleepTimes == null) {
+LOG.debug("{} is still sleeping after simulated 
time disabled.", Thread.currentThread(), new RuntimeException("STACK TRACE"));
+throw new InterruptedException();
+}
+}
 Thread.sleep(10);
 }
 } finally {
 synchronized(sleepTimesLock) {
-if (simulating.get()) {
+if (simulating.get() && threadSleepTimes != null) {
 threadSleepTimes.remove(Thread.currentThread());
 }
 }



[1/8] storm git commit: STORM-1079. Batch Puts to HBase.

2015-10-15 Thread kabhwan
Repository: storm
Updated Branches:
  refs/heads/master ebca03a90 -> 8f8c3e548


STORM-1079. Batch Puts to HBase.


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

Branch: refs/heads/master
Commit: e3b5c2701f1ce912dde052af3e81b9c4ce517f3f
Parents: ce93d5f
Author: Sriharsha Chintalapani 
Authored: Wed Sep 30 14:44:28 2015 -0700
Committer: Sriharsha Chintalapani 
Committed: Wed Sep 30 14:44:28 2015 -0700

--
 .../storm/hbase/bolt/AbstractHBaseBolt.java | 10 +++
 .../org/apache/storm/hbase/bolt/HBaseBolt.java  | 65 +---
 2 files changed, 67 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/e3b5c270/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
--
diff --git 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
index d814117..aad3d88 100644
--- 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
+++ 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
@@ -42,6 +42,8 @@ public abstract class AbstractHBaseBolt extends BaseRichBolt {
 protected String tableName;
 protected HBaseMapper mapper;
 protected String configKey;
+protected int batchSize = 15000;
+protected int flushIntervalSecs = 0;
 
 public AbstractHBaseBolt(String tableName, HBaseMapper mapper) {
 Validate.notEmpty(tableName, "Table name can not be blank or null");
@@ -72,5 +74,13 @@ public abstract class AbstractHBaseBolt extends BaseRichBolt 
{
 Map hbaseConfMap = new HashMap(conf);
 hbaseConfMap.put(Config.TOPOLOGY_AUTO_CREDENTIALS, 
map.get(Config.TOPOLOGY_AUTO_CREDENTIALS));
 this.hBaseClient = new HBaseClient(hbaseConfMap, hbConfig, tableName);
+
+ // If interval is non-zero then it has already been explicitly set 
and we should not default it
+if (conf.containsKey("topology.message.timeout.secs") && 
flushIntervalSecs == 0)
+{
+Integer topologyTimeout = 
Integer.parseInt(conf.get("topology.message.timeout.secs").toString());
+flushIntervalSecs = (int)(Math.floor(topologyTimeout / 2));
+LOG.info("Setting tick tuple interval to [" + flushIntervalSecs + 
"] based on topology timeout");
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/e3b5c270/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
--
diff --git 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
index cf29aa5..7eeca77 100644
--- 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
+++ 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
@@ -19,6 +19,8 @@ package org.apache.storm.hbase.bolt;
 
 import backtype.storm.topology.OutputFieldsDeclarer;
 import backtype.storm.tuple.Tuple;
+import backtype.storm.utils.TupleUtils;
+import backtype.storm.Config;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.storm.hbase.bolt.mapper.HBaseMapper;
@@ -26,7 +28,9 @@ import org.apache.storm.hbase.common.ColumnList;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Map;
 import java.util.List;
+import java.util.LinkedList;
 
 /**
  * Basic bolt for writing to HBase.
@@ -38,9 +42,13 @@ public class HBaseBolt  extends AbstractHBaseBolt {
 private static final Logger LOG = LoggerFactory.getLogger(HBaseBolt.class);
 
 boolean writeToWAL = true;
+List batchMutations;
+List tupleBatch;
 
 public HBaseBolt(String tableName, HBaseMapper mapper) {
 super(tableName, mapper);
+this.batchMutations = new LinkedList<>();
+this.tupleBatch = new LinkedList<>();
 }
 
 public HBaseBolt writeToWAL(boolean writeToWAL) {
@@ -53,21 +61,62 @@ public class HBaseBolt  extends AbstractHBaseBolt {
 return this;
 }
 
+public HBaseBolt withBatchSize(int batchSize) {
+this.batchSize = batchSize;
+return this;
+}
+
+public HBaseBolt withFlushIntervalSecs(int flushIntervalSecs) {
+this.flushIntervalSecs = flushIntervalSecs;
+return this;
+}
+
+@Override
+public 

[4/8] storm git commit: STORM-1079. Batch Puts to HBase. Add default flushIntervalSecs.

2015-10-15 Thread kabhwan
STORM-1079. Batch Puts to HBase. Add default flushIntervalSecs.


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

Branch: refs/heads/master
Commit: 9a25ab79b4457c4ed98b64c96218e0462efe72c4
Parents: b53b9eb
Author: Sriharsha Chintalapani 
Authored: Thu Oct 8 09:13:54 2015 -0700
Committer: Sriharsha Chintalapani 
Committed: Thu Oct 8 09:13:54 2015 -0700

--
 .../main/java/org/apache/storm/hbase/bolt/HBaseBolt.java| 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/9a25ab79/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
--
diff --git 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
index 4cdf388..34e2eba 100644
--- 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
+++ 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
@@ -78,11 +78,14 @@ public class HBaseBolt  extends AbstractHBaseBolt {
 conf = new Config();
 }
 
-if (flushIntervalSecs > 0) {
-LOG.info("Enabling tick tuple with interval [" + flushIntervalSecs 
+ "]");
-conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, flushIntervalSecs);
+if (conf.containsKey("topology.message.timeout.secs") && 
tickTupleInterval == 0) {
+Integer topologyTimeout = 
Integer.parseInt(conf.get("topology.message.timeout.secs").toString());
+flushIntervalSecs = (int)(Math.floor(topologyTimeout / 2));
+LOG.debug("Setting flush interval to [" + flushIntervalSecs + "] 
based on topology.message.timeout.secs");
 }
 
+LOG.info("Enabling tick tuple with interval [" + flushIntervalSecs + 
"]");
+conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, flushIntervalSecs);
 return conf;
 }
 



[7/8] storm git commit: Merge branch 'STORM-1079' of https://github.com/harshach/incubator-storm into STORM-1079

2015-10-15 Thread kabhwan
Merge branch 'STORM-1079' of https://github.com/harshach/incubator-storm into 
STORM-1079


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

Branch: refs/heads/master
Commit: a69e3ae268adc226146b91bec5fcd889f70d055c
Parents: ebca03a 99da29b
Author: Jungtaek Lim 
Authored: Fri Oct 16 09:19:01 2015 +0900
Committer: Jungtaek Lim 
Committed: Fri Oct 16 09:19:01 2015 +0900

--
 external/storm-hbase/README.md  | 10 +++
 .../storm/hbase/bolt/AbstractHBaseBolt.java |  2 +
 .../org/apache/storm/hbase/bolt/HBaseBolt.java  | 75 +---
 3 files changed, 78 insertions(+), 9 deletions(-)
--




[2/8] storm git commit: STORM-1079. Batch Puts to HBase.

2015-10-15 Thread kabhwan
STORM-1079. Batch Puts to HBase.


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

Branch: refs/heads/master
Commit: 7710eef9249249de2f8bbd5670a50cf6901f7b3e
Parents: e3b5c27
Author: Sriharsha Chintalapani 
Authored: Wed Sep 30 16:10:36 2015 -0700
Committer: Sriharsha Chintalapani 
Committed: Wed Sep 30 16:10:36 2015 -0700

--
 external/storm-hbase/README.md| 10 ++
 .../org/apache/storm/hbase/bolt/AbstractHBaseBolt.java|  7 ---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/7710eef9/external/storm-hbase/README.md
--
diff --git a/external/storm-hbase/README.md b/external/storm-hbase/README.md
index 81d351a..fd4d0ad 100644
--- a/external/storm-hbase/README.md
+++ b/external/storm-hbase/README.md
@@ -107,6 +107,16 @@ To use the `HBaseBolt`, construct it with the name of the 
table to write to, an
  ```java
 HBaseBolt hbase = new HBaseBolt("WordCount", mapper);
  ```
+ 
+ HBaseBolt params
+
+|Arg  |Description | Type | Default |
+|---   |--- |---
+|writeToWAL | To turn Durability SYNC_WAL or SKIP_WAL | Boolean (Optional) | 
True |
+|configKey | Any Hbase related configs | Map (Optional) | |
+|batchSize | Max no.of Tuples batched together to write to HBase | Int 
(Optional) | 15000 |
+|flushIntervalSecs| (In seconds)  If > 0 HBase Bolt will periodically flush 
transaction batches. Enabling this is recommended to avoid tuple timeouts while 
waiting for a batch to fill up. | Int (Optional) | 0 |
+
 
 The `HBaseBolt` will delegate to the `mapper` instance to figure out how to 
persist tuple data to HBase.
 

http://git-wip-us.apache.org/repos/asf/storm/blob/7710eef9/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
--
diff --git 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
index aad3d88..3372192 100644
--- 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
+++ 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java
@@ -75,12 +75,5 @@ public abstract class AbstractHBaseBolt extends BaseRichBolt 
{
 hbaseConfMap.put(Config.TOPOLOGY_AUTO_CREDENTIALS, 
map.get(Config.TOPOLOGY_AUTO_CREDENTIALS));
 this.hBaseClient = new HBaseClient(hbaseConfMap, hbConfig, tableName);
 
- // If interval is non-zero then it has already been explicitly set 
and we should not default it
-if (conf.containsKey("topology.message.timeout.secs") && 
flushIntervalSecs == 0)
-{
-Integer topologyTimeout = 
Integer.parseInt(conf.get("topology.message.timeout.secs").toString());
-flushIntervalSecs = (int)(Math.floor(topologyTimeout / 2));
-LOG.info("Setting tick tuple interval to [" + flushIntervalSecs + 
"] based on topology timeout");
-}
 }
 }



[6/8] storm git commit: STORM-1079. Fixed reset of tupleBatch.

2015-10-15 Thread kabhwan
STORM-1079. Fixed reset of tupleBatch.


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

Branch: refs/heads/master
Commit: 99da29b443c89580be34512b67d780c811d6d38a
Parents: fc03910
Author: Sriharsha Chintalapani 
Authored: Wed Oct 14 14:38:13 2015 -0700
Committer: Sriharsha Chintalapani 
Committed: Wed Oct 14 14:38:13 2015 -0700

--
 .../org/apache/storm/hbase/bolt/HBaseBolt.java  | 27 ++--
 1 file changed, 14 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/99da29b4/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
--
diff --git 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
index d470892..ea17b2c 100644
--- 
a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
+++ 
b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
@@ -93,34 +93,35 @@ public class HBaseBolt  extends AbstractHBaseBolt {
 @Override
 public void execute(Tuple tuple) {
 boolean flush = false;
-if (TupleUtils.isTick(tuple)) {
-LOG.debug("TICK received! current batch status [" + 
tupleBatch.size() + "/" + batchSize + "]");
-flush = true;
-} else {
-byte[] rowKey = this.mapper.rowKey(tuple);
-ColumnList cols = this.mapper.columns(tuple);
-List mutations = 
hBaseClient.constructMutationReq(rowKey, cols, writeToWAL? Durability.SYNC_WAL 
: Durability.SKIP_WAL);
-batchMutations.addAll(mutations);
-tupleBatch.add(tuple);
-if (tupleBatch.size() >= batchSize) {
+try {
+if (TupleUtils.isTick(tuple)) {
+LOG.debug("TICK received! current batch status [" + 
tupleBatch.size() + "/" + batchSize + "]");
 flush = true;
+} else {
+byte[] rowKey = this.mapper.rowKey(tuple);
+ColumnList cols = this.mapper.columns(tuple);
+List mutations = 
hBaseClient.constructMutationReq(rowKey, cols, writeToWAL? Durability.SYNC_WAL 
: Durability.SKIP_WAL);
+batchMutations.addAll(mutations);
+tupleBatch.add(tuple);
+if (tupleBatch.size() >= batchSize) {
+flush = true;
+}
 }
-}
 
-try {
 if (flush && !tupleBatch.isEmpty()) {
 this.hBaseClient.batchMutate(batchMutations);
 LOG.debug("acknowledging tuples after batchMutate");
 for(Tuple t : tupleBatch) {
 collector.ack(t);
 }
+tupleBatch.clear();
+batchMutations.clear();
 }
 } catch(Exception e){
 this.collector.reportError(e);
 for (Tuple t : tupleBatch) {
 collector.fail(t);
 }
-} finally {
 tupleBatch.clear();
 batchMutations.clear();
 }



Git Push Summary

2015-10-15 Thread ptgoetz
Repository: storm
Updated Tags:  refs/tags/v0.9.6 [created] 3cb2b8359


storm git commit: [maven-release-plugin] prepare release v0.9.6

2015-10-15 Thread ptgoetz
Repository: storm
Updated Branches:
  refs/heads/0.9.x-branch 394a4a89e -> 697059e95


[maven-release-plugin] prepare release v0.9.6


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

Branch: refs/heads/0.9.x-branch
Commit: 697059e958879c4daae5f4db57ce9abc04e81bd7
Parents: 394a4a8
Author: P. Taylor Goetz 
Authored: Thu Oct 15 16:35:19 2015 -0400
Committer: P. Taylor Goetz 
Committed: Thu Oct 15 16:35:19 2015 -0400

--
 examples/storm-starter/pom.xml   | 2 +-
 external/storm-hbase/pom.xml | 2 +-
 external/storm-hdfs/pom.xml  | 2 +-
 external/storm-kafka/pom.xml | 2 +-
 pom.xml  | 4 ++--
 storm-buildtools/maven-shade-clojure-transformer/pom.xml | 2 +-
 storm-core/pom.xml   | 2 +-
 storm-dist/binary/pom.xml| 2 +-
 storm-dist/source/pom.xml| 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/examples/storm-starter/pom.xml
--
diff --git a/examples/storm-starter/pom.xml b/examples/storm-starter/pom.xml
index f2aacd0..408cd21 100644
--- a/examples/storm-starter/pom.xml
+++ b/examples/storm-starter/pom.xml
@@ -20,7 +20,7 @@
   
   storm
   org.apache.storm
-  0.9.6-SNAPSHOT
+  0.9.6
   ../../pom.xml
   
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/external/storm-hbase/pom.xml
--
diff --git a/external/storm-hbase/pom.xml b/external/storm-hbase/pom.xml
index fe19688..da6c00d 100644
--- a/external/storm-hbase/pom.xml
+++ b/external/storm-hbase/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6-SNAPSHOT
+0.9.6
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/external/storm-hdfs/pom.xml
--
diff --git a/external/storm-hdfs/pom.xml b/external/storm-hdfs/pom.xml
index a265490..9e48789 100644
--- a/external/storm-hdfs/pom.xml
+++ b/external/storm-hdfs/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6-SNAPSHOT
+0.9.6
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/external/storm-kafka/pom.xml
--
diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml
index 36f77c3..db8375b 100644
--- a/external/storm-kafka/pom.xml
+++ b/external/storm-kafka/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6-SNAPSHOT
+0.9.6
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 105838d..bc0bd8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.storm
 storm
-0.9.6-SNAPSHOT
+0.9.6
 pom
 Storm
 Distributed and fault-tolerant realtime 
computation
@@ -166,7 +166,7 @@
 
 
scm:git:https://git-wip-us.apache.org/repos/asf/storm.git
 
scm:git:https://git-wip-us.apache.org/repos/asf/storm.git
-HEAD
+v0.9.6
 https://git-wip-us.apache.org/repos/asf/storm
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/storm-buildtools/maven-shade-clojure-transformer/pom.xml
--
diff --git a/storm-buildtools/maven-shade-clojure-transformer/pom.xml 
b/storm-buildtools/maven-shade-clojure-transformer/pom.xml
index dfca2a4..e80b4e8 100644
--- a/storm-buildtools/maven-shade-clojure-transformer/pom.xml
+++ b/storm-buildtools/maven-shade-clojure-transformer/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6-SNAPSHOT
+0.9.6
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/697059e9/storm-core/pom.xml
--
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 3b7d177..31ac343 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -20,7 +20,7 @@
 
 storm
 org.apache.storm
-0.9.6-SNAPSHOT
+0.9.6
 
 org.apache.storm
 storm-core


storm git commit: [maven-release-plugin] prepare for next development iteration

2015-10-15 Thread ptgoetz
Repository: storm
Updated Branches:
  refs/heads/0.9.x-branch 697059e95 -> 19a4e129e


[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/0.9.x-branch
Commit: 19a4e129edcaeb8b0615ac928f3107a846992480
Parents: 697059e
Author: P. Taylor Goetz 
Authored: Thu Oct 15 16:35:27 2015 -0400
Committer: P. Taylor Goetz 
Committed: Thu Oct 15 16:35:27 2015 -0400

--
 examples/storm-starter/pom.xml   | 2 +-
 external/storm-hbase/pom.xml | 2 +-
 external/storm-hdfs/pom.xml  | 2 +-
 external/storm-kafka/pom.xml | 2 +-
 pom.xml  | 4 ++--
 storm-buildtools/maven-shade-clojure-transformer/pom.xml | 2 +-
 storm-core/pom.xml   | 2 +-
 storm-dist/binary/pom.xml| 2 +-
 storm-dist/source/pom.xml| 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/examples/storm-starter/pom.xml
--
diff --git a/examples/storm-starter/pom.xml b/examples/storm-starter/pom.xml
index 408cd21..96442b1 100644
--- a/examples/storm-starter/pom.xml
+++ b/examples/storm-starter/pom.xml
@@ -20,7 +20,7 @@
   
   storm
   org.apache.storm
-  0.9.6
+  0.9.7-SNAPSHOT
   ../../pom.xml
   
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/external/storm-hbase/pom.xml
--
diff --git a/external/storm-hbase/pom.xml b/external/storm-hbase/pom.xml
index da6c00d..6a68a17 100644
--- a/external/storm-hbase/pom.xml
+++ b/external/storm-hbase/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6
+0.9.7-SNAPSHOT
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/external/storm-hdfs/pom.xml
--
diff --git a/external/storm-hdfs/pom.xml b/external/storm-hdfs/pom.xml
index 9e48789..5a97fc2 100644
--- a/external/storm-hdfs/pom.xml
+++ b/external/storm-hdfs/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6
+0.9.7-SNAPSHOT
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/external/storm-kafka/pom.xml
--
diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml
index db8375b..4f9bf4b 100644
--- a/external/storm-kafka/pom.xml
+++ b/external/storm-kafka/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6
+0.9.7-SNAPSHOT
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/pom.xml
--
diff --git a/pom.xml b/pom.xml
index bc0bd8f..9676f86 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.storm
 storm
-0.9.6
+0.9.7-SNAPSHOT
 pom
 Storm
 Distributed and fault-tolerant realtime 
computation
@@ -166,7 +166,7 @@
 
 
scm:git:https://git-wip-us.apache.org/repos/asf/storm.git
 
scm:git:https://git-wip-us.apache.org/repos/asf/storm.git
-v0.9.6
+HEAD
 https://git-wip-us.apache.org/repos/asf/storm
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/storm-buildtools/maven-shade-clojure-transformer/pom.xml
--
diff --git a/storm-buildtools/maven-shade-clojure-transformer/pom.xml 
b/storm-buildtools/maven-shade-clojure-transformer/pom.xml
index e80b4e8..735301b 100644
--- a/storm-buildtools/maven-shade-clojure-transformer/pom.xml
+++ b/storm-buildtools/maven-shade-clojure-transformer/pom.xml
@@ -21,7 +21,7 @@
 
 storm
 org.apache.storm
-0.9.6
+0.9.7-SNAPSHOT
 ../../pom.xml
 
 

http://git-wip-us.apache.org/repos/asf/storm/blob/19a4e129/storm-core/pom.xml
--
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 31ac343..d21a634 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -20,7 +20,7 @@
 
 storm
 org.apache.storm
-0.9.6
+0.9.7-SNAPSHOT
 
 org.apache.storm
  

storm git commit: STORM-1084: forgot to delete a file

2015-10-15 Thread bobby
Repository: storm
Updated Branches:
  refs/heads/master 54772f83c -> 415654dcc


STORM-1084: forgot to delete a file


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

Branch: refs/heads/master
Commit: 415654dcc5c6301d05df95ba9ab15d9bb03f95ea
Parents: 54772f8
Author: Robert (Bobby) Evans 
Authored: Thu Oct 15 13:28:05 2015 -0500
Committer: Robert (Bobby) Evans 
Committed: Thu Oct 15 13:28:05 2015 -0500

--
 .../jvm/backtype/storm/ConfigValidation.java| 397 ---
 1 file changed, 397 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/415654dc/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
deleted file mode 100644
index e6c0986..000
--- a/storm-core/src/jvm/backtype/storm/ConfigValidation.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package backtype.storm;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Provides functionality for validating configuration fields.
- */
-public class ConfigValidation {
-
-/**
- * Declares methods for validating configuration values.
- */
-public static interface FieldValidator {
-/**
- * Validates the given field.
- * @param name the name of the field.
- * @param field The field to be validated.
- * @throws IllegalArgumentException if the field fails validation.
- */
-public void validateField(String name, Object field) throws 
IllegalArgumentException;
-}
-
-/**
- * Declares a method for validating configuration values that is nestable.
- */
-public static abstract class NestableFieldValidator implements 
FieldValidator {
-@Override
-public void validateField(String name, Object field) throws 
IllegalArgumentException {
-validateField(null, name, field);
-}
-
-/**
- * Validates the given field.
- * @param pd describes the parent wrapping this validator.
- * @param name the name of the field.
- * @param field The field to be validated.
- * @throws IllegalArgumentException if the field fails validation.
- */
-public abstract void validateField(String pd, String name, Object 
field) throws IllegalArgumentException;
-}
-
-/**
- * Returns a new NestableFieldValidator for a given class.
- * @param cls the Class the field should be a type of
- * @param nullAllowed whether or not a value of null is valid
- * @return a NestableFieldValidator for that class
- */
-public static NestableFieldValidator fv(final Class cls, final boolean 
nullAllowed) {
-return new NestableFieldValidator() {
-@Override
-public void validateField(String pd, String name, Object field)
-throws IllegalArgumentException {
-if (nullAllowed && field == null) {
-return;
-}
-if (! cls.isInstance(field)) {
-throw new IllegalArgumentException(
-pd + name + " must be a " + cls.getName() + ". 
("+field+")");
-}
-}
-};
-}
-
-/**
- * Returns a new NestableFieldValidator for a List of the given Class.
- * @param cls the Class of elements composing the list
- * @param nullAllowed whether or not a value of null is valid
- * @return a NestableFieldValidator for a list of the given class
- */
-public static NestableFieldValidator listFv(Class cls, boolean 
nullAllowed) {
-  return listFv(fv(cls, false), 

[1/5] storm git commit: [STORM-1084] - Improve Storm config validation process to use java annotations instead of *_SCHEMA format

2015-10-15 Thread bobby
Repository: storm
Updated Branches:
  refs/heads/master 9fe97b6ea -> 54772f83c


http://git-wip-us.apache.org/repos/asf/storm/blob/c7f0882f/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java
--
diff --git a/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java 
b/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java
new file mode 100644
index 000..2e4470c
--- /dev/null
+++ b/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java
@@ -0,0 +1,523 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package backtype.storm.validation;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashSet;
+import java.util.Map;
+
+/**
+ * Provides functionality for validating configuration fields.
+ */
+public class ConfigValidation {
+
+private static final Class CONFIG_CLASS = backtype.storm.Config.class;
+
+private static final Logger LOG = 
LoggerFactory.getLogger(ConfigValidation.class);
+
+public static abstract class Validator {
+public abstract void validateField(String name, Object o);
+}
+
+public abstract static class TypeValidator {
+public abstract void validateField(String name, Class type, Object o);
+}
+
+/**
+ * Validator definitions
+ */
+
+/**
+ * Validates if an object is not null
+ */
+
+public static class NotNullValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+if (o == null) {
+throw new IllegalArgumentException("Field " + name + "cannot 
be null! Actual value: " + o);
+}
+}
+}
+
+/**
+ * Validates basic types
+ */
+public static class SimpleTypeValidator extends TypeValidator {
+
+public void validateField(String name, Class type, Object o) {
+if (o == null) {
+return;
+}
+if (type.isInstance(o)) {
+return;
+}
+throw new IllegalArgumentException("Field " + name + " must be of 
type " + type + ". Object: " + o + " actual type: " + o.getClass());
+}
+}
+
+public static class StringValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+SimpleTypeValidator validator = new SimpleTypeValidator();
+validator.validateField(name, String.class, o);
+}
+}
+
+public static class BooleanValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+SimpleTypeValidator validator = new SimpleTypeValidator();
+validator.validateField(name, Boolean.class, o);
+}
+}
+
+public static class NumberValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+SimpleTypeValidator validator = new SimpleTypeValidator();
+validator.validateField(name, Number.class, o);
+}
+}
+
+public static class DoubleValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+SimpleTypeValidator validator = new SimpleTypeValidator();
+validator.validateField(name, Double.class, o);
+}
+}
+
+/**
+ * Validates a Integer.
+ */
+public static class IntegerValidator extends Validator {
+
+@Override
+public void validateField(String name, Object o) {
+validateInteger(name, o);
+}
+
+public void validateInteger(String name, Object o) {
+if (o == null) {
+return;
+}
+final long i;
+if (o instanceof Number &&
+(i = ((Number) o).longValue()) == ((Number) 
o).doubleValue()) {
+if (i <= Integer.MAX_VALUE && i >= Integer.MIN_VALUE) {
+return;
+}
+   

[2/5] storm git commit: [STORM-1084] - Improve Storm config validation process to use java annotations instead of *_SCHEMA format

2015-10-15 Thread bobby
[STORM-1084] - Improve Storm config validation process to use java annotations 
instead of *_SCHEMA format


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

Branch: refs/heads/master
Commit: c7f0882f79fa76cfc94a913bf28eb905471f3fc3
Parents: 9fe97b6
Author: Boyang Jerry Peng 
Authored: Thu Oct 15 10:26:53 2015 -0500
Committer: Boyang Jerry Peng 
Committed: Thu Oct 15 10:26:53 2015 -0500

--
 storm-core/src/clj/backtype/storm/config.clj|  53 +-
 storm-core/src/jvm/backtype/storm/Config.java   | 521 -
 .../storm/validation/ConfigValidation.java  | 523 +
 .../validation/ConfigValidationAnnotations.java | 216 +++
 .../storm/validation/ConfigValidationUtils.java | 175 ++
 .../test/clj/backtype/storm/config_test.clj | 186 --
 .../clj/backtype/storm/serialization_test.clj   |  14 +-
 .../jvm/backtype/storm/TestConfigValidate.java  | 565 +++
 8 files changed, 1756 insertions(+), 497 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/storm/blob/c7f0882f/storm-core/src/clj/backtype/storm/config.clj
--
diff --git a/storm-core/src/clj/backtype/storm/config.clj 
b/storm-core/src/clj/backtype/storm/config.clj
index 57471f4..0d4f1e6 100644
--- a/storm-core/src/clj/backtype/storm/config.clj
+++ b/storm-core/src/clj/backtype/storm/config.clj
@@ -17,8 +17,9 @@
 (ns backtype.storm.config
   (:import [java.io FileReader File IOException]
[backtype.storm.generated StormTopology])
-  (:import [backtype.storm Config ConfigValidation$FieldValidator])
+  (:import [backtype.storm Config])
   (:import [backtype.storm.utils Utils LocalState])
+  (:import [backtype.storm.validation ConfigValidation])
   (:import [org.apache.commons.io FileUtils])
   (:require [clojure [string :as str]])
   (:use [backtype.storm log util]))
@@ -28,7 +29,7 @@
 (defn- clojure-config-name [name]
   (.replace (.toUpperCase name) "_" "-"))
 
-;; define clojure constants for every configuration parameter
+; define clojure constants for every configuration parameter
 (doseq [f (seq (.getFields Config))]
   (let [name (.getName f)
 new-name (clojure-config-name name)]
@@ -39,35 +40,6 @@
   (dofor [f (seq (.getFields Config))]
  (.get f nil)))
 
-(defmulti get-FieldValidator class-selector)
-
-(defmethod get-FieldValidator nil [_]
-  (throw (IllegalArgumentException. "Cannot validate a nil field.")))
-
-(defmethod get-FieldValidator
-  ConfigValidation$FieldValidator [validator] validator)
-
-(defmethod get-FieldValidator Object
-  [klass]
-  {:pre [(not (nil? klass))]}
-  (reify ConfigValidation$FieldValidator
-(validateField [this name v]
-   (if (and (not (nil? v))
-(not (instance? klass v)))
- (throw (IllegalArgumentException.
-  (str "field " name " '" v "' must be a '" 
(.getName klass) "'")))
-
-;; Create a mapping of config-string -> validator
-;; Config fields must have a _SCHEMA field defined
-(def CONFIG-SCHEMA-MAP
-  (->> (.getFields Config)
-   (filter #(not (re-matches #".*_SCHEMA$" (.getName %
-   (map (fn [f] [(.get f nil)
- (get-FieldValidator
-   (-> Config
-   (.getField (str (.getName f) "_SCHEMA"))
-   (.get nil)))]))
-   (into {})))
 
 (defn cluster-mode
   [conf & args]
@@ -92,30 +64,13 @@
   [conf]
   (even-sampler (sampling-rate conf)))
 
-; storm.zookeeper.servers:
-; - "server1"
-; - "server2"
-; - "server3"
-; nimbus.host: "master"
-;
-; ### These all have default values as shown
-;
-; ### storm.* configs are general configurations
-; # the local dir is where jars are kept
-; storm.local.dir: "/mnt/storm"
-; storm.zookeeper.port: 2181
-; storm.zookeeper.root: "/storm"
-
 (defn read-default-config
   []
   (clojurify-structure (Utils/readDefaultConfig)))
 
 (defn validate-configs-with-schemas
   [conf]
-  (doseq [[k v] conf
-  :let [schema (CONFIG-SCHEMA-MAP k)]]
-(if (not (nil? schema))
-  (.validateField schema k v
+  (ConfigValidation/validateFields conf))
 
 (defn read-storm-config
   []

http://git-wip-us.apache.org/repos/asf/storm/blob/c7f0882f/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 fcdc8ad..a521b10 100644
--- 

[5/5] storm git commit: Added STORM-1084 to Changelog

2015-10-15 Thread bobby
Added STORM-1084 to Changelog


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

Branch: refs/heads/master
Commit: 54772f83ce68160741a76d0383c9f944eda2e058
Parents: 46d7c0e
Author: Robert (Bobby) Evans 
Authored: Thu Oct 15 13:08:41 2015 -0500
Committer: Robert (Bobby) Evans 
Committed: Thu Oct 15 13:08:41 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/54772f83/CHANGELOG.md
--
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0cc9686..5e17b7e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-1084: Improve Storm config validation process to use java annotations 
instead of *_SCHEMA format
  * STORM-1106: Netty should not limit attempts to reconnect
  * STORM-1103: Changes log message to DEBUG from INFO
  * STORM-1104: Nimbus HA fails to find newly downloaded code files



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

2015-10-15 Thread bobby
Merge branch 'STORM-1084' of https://github.com/jerrypeng/storm into STORM-1084

STORM-1084: Improve Storm config validation process to use java annotations 
instead of *_SCHEMA format


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

Branch: refs/heads/master
Commit: 46d7c0e53cd667f397242499d096461229e6510f
Parents: 9fe97b6 b5cb2ec
Author: Robert (Bobby) Evans 
Authored: Thu Oct 15 13:08:03 2015 -0500
Committer: Robert (Bobby) Evans 
Committed: Thu Oct 15 13:08:03 2015 -0500

--
 storm-core/src/clj/backtype/storm/config.clj|  53 +-
 storm-core/src/jvm/backtype/storm/Config.java   | 521 -
 .../storm/validation/ConfigValidation.java  | 563 ++
 .../validation/ConfigValidationAnnotations.java | 218 +++
 .../storm/validation/ConfigValidationUtils.java | 175 ++
 .../test/clj/backtype/storm/config_test.clj | 186 --
 .../clj/backtype/storm/serialization_test.clj   |  14 +-
 .../jvm/backtype/storm/TestConfigValidate.java  | 564 +++
 8 files changed, 1797 insertions(+), 497 deletions(-)
--