You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pa...@apache.org on 2015/04/01 19:49:32 UTC

[01/45] storm git commit: STORM-691 Add basic lookup / persist bolts

Repository: storm
Updated Branches:
  refs/heads/nimbus-ha-branch a11fcc303 -> 765e4c2fa


http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisCluster.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisCluster.java b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisCluster.java
index 31434dc..ddb6939 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisCluster.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisCluster.java
@@ -23,11 +23,11 @@ import backtype.storm.StormSubmitter;
 import backtype.storm.generated.StormTopology;
 import backtype.storm.tuple.Fields;
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.apache.storm.redis.trident.state.RedisClusterState;
 import org.apache.storm.redis.trident.state.RedisClusterStateQuerier;
 import org.apache.storm.redis.trident.state.RedisClusterStateUpdater;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
 import storm.trident.Stream;
 import storm.trident.TridentState;
 import storm.trident.TridentTopology;
@@ -55,7 +55,7 @@ public class WordCountTridentRedisCluster {
         }
         JedisClusterConfig clusterConfig = new JedisClusterConfig.Builder().setNodes(nodes)
                                         .build();
-        TridentTupleMapper tupleMapper = new WordCountTupleMapper();
+        TupleMapper tupleMapper = new WordCountTupleMapper();
         RedisClusterState.Factory factory = new RedisClusterState.Factory(clusterConfig);
 
         TridentTopology topology = new TridentTopology();

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisClusterMap.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisClusterMap.java b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisClusterMap.java
index e9ae54d..de1f252 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisClusterMap.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisClusterMap.java
@@ -23,11 +23,9 @@ import backtype.storm.StormSubmitter;
 import backtype.storm.generated.StormTopology;
 import backtype.storm.tuple.Fields;
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.apache.storm.redis.trident.state.RedisClusterMapState;
-import org.apache.storm.redis.trident.state.RedisClusterStateUpdater;
-import org.apache.storm.redis.trident.state.RedisStateQuerier;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
 import storm.trident.Stream;
 import storm.trident.TridentState;
 import storm.trident.TridentTopology;
@@ -58,7 +56,7 @@ public class WordCountTridentRedisClusterMap {
         }
         JedisClusterConfig clusterConfig = new JedisClusterConfig.Builder().setNodes(nodes)
                                         .build();
-        TridentTupleMapper tupleMapper = new WordCountTupleMapper();
+        TupleMapper tupleMapper = new WordCountTupleMapper();
         StateFactory factory = RedisClusterMapState.transactional(clusterConfig);
 
         TridentTopology topology = new TridentTopology();

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisMap.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisMap.java b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisMap.java
index b096e55..4d4afe8 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisMap.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedisMap.java
@@ -23,12 +23,9 @@ import backtype.storm.StormSubmitter;
 import backtype.storm.generated.StormTopology;
 import backtype.storm.tuple.Fields;
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.apache.storm.redis.trident.state.RedisMapState;
-import org.apache.storm.redis.trident.state.RedisState;
-import org.apache.storm.redis.trident.state.RedisStateQuerier;
-import org.apache.storm.redis.trident.state.RedisStateUpdater;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
 import storm.trident.Stream;
 import storm.trident.TridentState;
 import storm.trident.TridentTopology;
@@ -51,7 +48,7 @@ public class WordCountTridentRedisMap {
         JedisPoolConfig poolConfig = new JedisPoolConfig.Builder()
                                         .setHost(redisHost).setPort(redisPort)
                                         .build();
-        TridentTupleMapper tupleMapper = new WordCountTupleMapper();
+        TupleMapper tupleMapper = new WordCountTupleMapper();
         StateFactory factory = RedisMapState.transactional(poolConfig);
 
         TridentTopology topology = new TridentTopology();

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTupleMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTupleMapper.java b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTupleMapper.java
index 6454c9e..1e601c9 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTupleMapper.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTupleMapper.java
@@ -1,16 +1,16 @@
 package org.apache.storm.redis.trident;
 
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
-import storm.trident.tuple.TridentTuple;
+import backtype.storm.tuple.ITuple;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 
-public class WordCountTupleMapper implements TridentTupleMapper {
+public class WordCountTupleMapper implements TupleMapper {
     @Override
-    public String getKeyFromTridentTuple(TridentTuple tuple) {
+    public String getKeyFromTuple(ITuple tuple) {
         return tuple.getString(0);
     }
 
     @Override
-    public String getValueFromTridentTuple(TridentTuple tuple) {
+    public String getValueFromTuple(ITuple tuple) {
         return tuple.getInteger(1).toString();
     }
 }


[36/45] storm git commit: STORM-741: Allow users to pass a config value to perform impersonation.

Posted by pa...@apache.org.
STORM-741: Allow users to pass a config value to perform impersonation.


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

Branch: refs/heads/nimbus-ha-branch
Commit: bb968c8304e72d90d3d3d11c9fad66122f94dca7
Parents: 36e99fa
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Tue Mar 31 14:24:30 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Tue Mar 31 17:26:31 2015 -0700

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/Config.java             | 6 ++++++
 storm-core/src/jvm/backtype/storm/utils/NimbusClient.java | 7 +++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/bb968c83/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 9cddb2e..e6032f1 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -1228,6 +1228,12 @@ public class Config extends HashMap<String, Object> {
     public static final Object TRANSACTIONAL_ZOOKEEPER_PORT_SCHEMA = ConfigValidation.IntegerValidator;
 
     /**
+     * The user as which the nimbus client should be acquired to perform the operation.
+     */
+    public static final String STORM_DO_AS_USER="storm.doAsUser";
+    public static final Object STORM_DO_AS_USER_SCHEMA = String.class;
+
+    /**
      * The number of threads that should be used by the zeromq context in each worker process.
      */
     public static final String ZMQ_THREADS = "zmq.threads";

http://git-wip-us.apache.org/repos/asf/storm/blob/bb968c83/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java b/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
index b171353..6314deb 100644
--- a/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
+++ b/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
@@ -42,6 +42,13 @@ public class NimbusClient extends ThriftClient {
 
     public static NimbusClient getConfiguredClientAs(Map conf, String asUser) {
         try {
+            if(conf.containsKey(Config.STORM_DO_AS_USER)) {
+                if(asUser != null && !asUser.isEmpty()) {
+                    LOG.warn("You have specified a doAsUser as param {} and a doAsParam as config, config will take precedence."
+                            , asUser, conf.get(Config.STORM_DO_AS_USER));
+                }
+                asUser = (String) conf.get(Config.STORM_DO_AS_USER);
+            }
             String nimbusHost = (String) conf.get(Config.NIMBUS_HOST);
             return new NimbusClient(conf, nimbusHost, null, null, asUser);
         } catch (TTransportException ex) {


[34/45] storm git commit: STORM-615. Add REST API to upload topology.

Posted by pa...@apache.org.
STORM-615. Add REST API to upload topology.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 1945f709174bcd867c8412198c559bbb15e287d9
Parents: 117256b
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Thu Mar 12 13:58:31 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Tue Mar 31 17:21:33 2015 -0700

----------------------------------------------------------------------
 STORM-UI-REST-API.md                          | 31 ++++++++++++
 storm-core/src/clj/backtype/storm/ui/core.clj | 58 +++++++++++++++++++++-
 2 files changed, 87 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/1945f709/STORM-UI-REST-API.md
----------------------------------------------------------------------
diff --git a/STORM-UI-REST-API.md b/STORM-UI-REST-API.md
index 72b07d4..cdbf05e 100644
--- a/STORM-UI-REST-API.md
+++ b/STORM-UI-REST-API.md
@@ -616,6 +616,37 @@ error response:
 }
 ```
 
+### /api/v1/uploadTopology (POST)
+
+uploads a topology.
+
+Caution: This api doesn't work in security mode.
+
+|Parameter |Value   |Description  |
+|----------|--------|-------------|
+|topologyConfig |String (required)| topology json config  |
+|topologyJar |String (required)| topology jar file |
+
+Sample topologyConfig json:
+```json
+{"topologyMainClass": "storm.starter.WordCountTopology", "topologyMainClassArgs": ["wordcount1"]}
+```
+
+Examples:
+
+```no-highlight
+curl  -i -b ~/cookiejar.txt -c ~/cookiejar.txt -X POST  
+-H 'x-csrf-token: ycit8Wi89ZdAOo9KKaka/Pvd0vnx8TZzP8xSDDSw8J8bTfyn4jz38VN4Xcb7CF6xigRzDLaGVHbrSj80'  
+-F topologyConfig='{"topologyMainClass": "storm.starter.WordCountTopology", "topologyMainClassArgs": ["wordcount1"]}' 
+-F topologyJar=@examples/storm-starter/storm-starter-topologies-0.10.0-SNAPSHOT.jar 
+http://localhost:8080/api/v1/uploadTopology
+```
+
+Sample Response:
+
+```json
+{"status":"success"}
+```
 
 ### /api/v1/topology/:id/activate (POST)
 

http://git-wip-us.apache.org/repos/asf/storm/blob/1945f709/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj
index c64f35d..0a797a3 100644
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@ -16,7 +16,9 @@
 
 (ns backtype.storm.ui.core
   (:use compojure.core)
-  (:use ring.middleware.reload)
+  (:use [clojure.java.shell :only [sh]])
+  (:use ring.middleware.reload
+        ring.middleware.multipart-params)
   (:use [ring.middleware.json :only [wrap-json-params]])
   (:use [hiccup core page-helpers])
   (:use [backtype.storm config util log])
@@ -503,6 +505,39 @@
               (hashmap-to-persistent bolts))
        spout-comp-summs bolt-comp-summs window id))))
 
+(defn validate-tplg-submit-params [params]
+  (let [tplg-jar-file (params :topologyJar)
+        tplg-config (if (not-nil? (params :topologyConfig)) (from-json (params :topologyConfig)))]
+    (cond
+     (nil? tplg-jar-file) {:valid false :error "missing topology jar file"}
+     (nil? tplg-config) {:valid false :error "missing topology config"}
+     (nil? (tplg-config "topologyMainClass")) {:valid false :error "topologyMainClass missing in topologyConfig"}
+     :else {:valid true})))
+
+(defn run-tplg-submit-cmd [tplg-jar-file tplg-config user]
+  (let [tplg-main-class (if (not-nil? tplg-config) (trim (tplg-config "topologyMainClass")))
+        tplg-main-class-args (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyMainClassArgs")))
+        tplg-jvm-opts (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyJvmOpts")))
+        storm-home (System/getProperty "storm.home")
+        storm-conf-dir (str storm-home file-path-separator "conf")
+        storm-log-dir (if (not-nil? (*STORM-CONF* "storm.log.dir")) (*STORM-CONF* "storm.log.dir")
+                          (str storm-home file-path-separator "logs"))
+        storm-libs (str storm-home file-path-separator "lib" file-path-separator "*")
+        java-cmd (str (System/getProperty "java.home") file-path-separator "bin" file-path-separator "java")
+        storm-cmd (str storm-home file-path-separator "bin" file-path-separator "storm")
+        tplg-cmd-response (sh storm-cmd "jar" tplg-jar-file
+                              tplg-main-class
+                              tplg-main-class-args
+                              (if (not= user "unknown") (str "-c storm.doAsUser=" user) ""))]
+    (log-message "tplg-cmd-response " tplg-cmd-response)
+    (cond
+     (= (tplg-cmd-response :exit) 0) {"status" "success"}
+     (and (not= (tplg-cmd-response :exit) 0)
+          (not-nil? (re-find #"already exists on cluster" (tplg-cmd-response :err)))) {"status" "failed" "error" "Topology with the same name exists in cluster"}
+          (not= (tplg-cmd-response :exit) 0) {"status" "failed" "error" (clojure.string/trim-newline (tplg-cmd-response :err))}
+          :else {"status" "success" "response" "topology deployed"}
+          )))
+
 (defn cluster-configuration []
   (with-nimbus nimbus
     (.getNimbusConf ^Nimbus$Client nimbus)))
@@ -982,7 +1017,25 @@
         (.killTopologyWithOpts nimbus name options)
         (log-message "Killing topology '" name "' with wait time: " wait-time " secs")))
     (json-response (topology-op-response id "kill") (m "callback")))
-
+  (POST "/api/v1/uploadTopology" [:as {:keys [cookies servlet-request]} id & params]
+        (assert-authorized-user servlet-request "submitTopology")
+        (let [valid-tplg (validate-tplg-submit-params params)
+              valid (valid-tplg :valid)
+              context (ReqContext/context)]
+          (if http-creds-handler (.populateContext http-creds-handler context servlet-request))
+          (if (= valid true)
+            (let [tplg-file-data (params :topologyJar)
+                  tplg-temp-file (tplg-file-data :tempfile)
+                  tplg-file-name (tplg-file-data :filename)
+                  tplg-jar-file (clojure.string/join [(.getParent tplg-temp-file) file-path-separator tplg-file-name])
+                  tplg-config (if (not-nil? (params :topologyConfig)) (from-json (params :topologyConfig)))
+                  principal (if (.isImpersonating context) (.realPrincipal context) (.principal context))
+                  user (if principal (.getName principal) "unknown")]
+              (.renameTo tplg-temp-file (File. tplg-jar-file))
+              (let [ret (run-tplg-submit-cmd tplg-jar-file tplg-config user)]
+                (json-response ret (params "callback"))))
+            (json-response {"status" "failed" "error" (valid-tplg :error)} (params "callback"))
+            )))
   (GET "/" [:as {cookies :cookies}]
        (resp/redirect "/index.html"))
   (route/resources "/")
@@ -1012,6 +1065,7 @@
 (def app
   (handler/site (-> main-routes
                     (wrap-json-params)
+                    (wrap-multipart-params)
                     (wrap-reload '[backtype.storm.ui.core])
                     (wrap-anti-forgery {:error-response csrf-error-response})
                     catch-errors)))


[17/45] storm git commit: [storm-redis] Remove unused and buggy feature

Posted by pa...@apache.org.
[storm-redis] Remove unused and buggy feature

* We can introduce counter / various data types later


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

Branch: refs/heads/nimbus-ha-branch
Commit: c75de7e7e63f282f44306d7bd0635a7a9be5e925
Parents: a8a0dfd
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Mar 25 18:51:07 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Mar 25 18:51:07 2015 +0900

----------------------------------------------------------------------
 .../state/RedisStateSetCountQuerier.java        | 74 ------------------
 .../trident/state/RedisStateSetUpdater.java     | 80 --------------------
 2 files changed, 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c75de7e7/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
deleted file mode 100644
index 6b75f31..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
+++ /dev/null
@@ -1,74 +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 org.apache.storm.redis.trident.state;
-
-import backtype.storm.tuple.Values;
-import org.apache.storm.redis.common.mapper.TupleMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import redis.clients.jedis.Jedis;
-import storm.trident.operation.TridentCollector;
-import storm.trident.state.BaseQueryFunction;
-import storm.trident.tuple.TridentTuple;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RedisStateSetCountQuerier extends BaseQueryFunction<RedisState, Long> {
-    private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
-
-    private final String redisKeyPrefix;
-    private final TupleMapper tupleMapper;
-
-    public RedisStateSetCountQuerier(String redisKeyPrefix, TupleMapper tupleMapper) {
-        this.redisKeyPrefix = redisKeyPrefix;
-        this.tupleMapper = tupleMapper;
-    }
-
-    @Override
-    public List<Long> batchRetrieve(RedisState redisState, List<TridentTuple> inputs) {
-        List<Long> ret = new ArrayList<Long>();
-
-        Jedis jedis = null;
-        try {
-            jedis = redisState.getJedis();
-            for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTuple(input);
-                if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
-                    key = redisKeyPrefix + key;
-                }
-                long count = jedis.scard(key);
-                ret.add(count);
-
-                logger.debug("redis get key[" + key + "] count[" + count + "]");
-            }
-        } finally {
-            if (jedis != null) {
-                redisState.returnJedis(jedis);
-            }
-        }
-
-        return ret;
-    }
-
-    @Override
-    public void execute(TridentTuple tuple, Long s, TridentCollector collector) {
-        String key = this.tupleMapper.getKeyFromTuple(tuple);
-        collector.emit(new Values(key, s));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/c75de7e7/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
deleted file mode 100644
index d7c43da..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
+++ /dev/null
@@ -1,80 +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 org.apache.storm.redis.trident.state;
-
-import backtype.storm.tuple.Values;
-import org.apache.storm.redis.common.mapper.TupleMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import redis.clients.jedis.Jedis;
-import storm.trident.operation.TridentCollector;
-import storm.trident.state.BaseStateUpdater;
-import storm.trident.tuple.TridentTuple;
-
-import java.util.List;
-
-public class RedisStateSetUpdater extends BaseStateUpdater<RedisState> {
-    private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
-
-    private final String redisKeyPrefix;
-    private final TupleMapper tupleMapper;
-    private final int expireIntervalSec;
-
-    public RedisStateSetUpdater(String redisKeyPrefix, TupleMapper tupleMapper, int expireIntervalSec) {
-        this.redisKeyPrefix = redisKeyPrefix;
-        this.tupleMapper = tupleMapper;
-        if (expireIntervalSec > 0) {
-            this.expireIntervalSec = expireIntervalSec;
-        } else {
-            this.expireIntervalSec = 0;
-        }
-    }
-
-    @Override
-    public void updateState(RedisState redisState, List<TridentTuple> inputs,
-                            TridentCollector collector) {
-
-        Jedis jedis = null;
-        try {
-            jedis = redisState.getJedis();
-            for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTuple(input);
-                String redisKey = key;
-                if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
-                    redisKey = redisKeyPrefix + redisKey;
-                }
-                String value = this.tupleMapper.getValueFromTuple(input);
-
-                logger.debug("update key[" + key + "] redisKey[" + redisKey + "] value[" + value + "]");
-
-                if (this.expireIntervalSec > 0) {
-                    jedis.setex(redisKey, expireIntervalSec, value);
-                } else {
-                    jedis.set(redisKey, value);
-                }
-                Long count = jedis.scard(redisKey);
-
-                collector.emit(new Values(key, count));
-            }
-        } finally {
-            if (jedis != null) {
-                redisState.returnJedis(jedis);
-            }
-        }
-    }
-}


[27/45] storm git commit: STORM-711. All connectors should use collector.reportError and tuple anchoring.

Posted by pa...@apache.org.
STORM-711. All connectors should use collector.reportError and tuple anchoring.


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

Branch: refs/heads/nimbus-ha-branch
Commit: bb38f176de8e5515b6797b3cc86e47ec47fe020c
Parents: fe556e9
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Mar 29 21:52:51 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Mar 29 21:52:51 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/bb38f176/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 852e2cf..af9627f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-711: All connectors should use collector.reportError and tuple anchoring.
  * STORM-714: Make CSS more consistent with self, prev release
  * STORM-703: With hash key option for RedisMapState, only get values for keys in batch
  * STORM-691: Add basic lookup / persist bolts


[24/45] storm git commit: STORM-727: nimbus_auth_test should not use default nimbus port.

Posted by pa...@apache.org.
STORM-727: nimbus_auth_test should not use default nimbus port.


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

Branch: refs/heads/nimbus-ha-branch
Commit: fda686013f90e6bd575af1673ea92d092e3321a4
Parents: 6a0ebad
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Thu Mar 26 14:16:13 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Sun Mar 29 10:36:06 2015 -0700

----------------------------------------------------------------------
 .../storm/security/auth/nimbus_auth_test.clj    | 231 ++++++++++---------
 1 file changed, 118 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/fda68601/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj b/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
index 549256b..0a9c280 100644
--- a/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
+++ b/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
@@ -57,121 +57,126 @@
       (.stop nimbus-server#)))
 
 (deftest Simple-authentication-test 
-  (with-test-cluster [6627 nil nil "backtype.storm.security.auth.SimpleTransportPlugin"]
-    (let [storm-conf (merge (read-storm-config)
-                            {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                             STORM-NIMBUS-RETRY-TIMES 0})
-          client (NimbusClient. storm-conf "localhost" 6627 nimbus-timeout)
-          nimbus_client (.getClient client)]
-      (testing "(Positive authorization) Simple protocol w/o authentication/authorization enforcement"
-               (is (thrown-cause? NotAliveException
-                            (.activate nimbus_client "topo-name"))))
-      (.close client))))
+  (let [port (available-port)]
+    (with-test-cluster [port nil nil "backtype.storm.security.auth.SimpleTransportPlugin"]
+      (let [storm-conf (merge (read-storm-config)
+                              {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
+                               STORM-NIMBUS-RETRY-TIMES 0})
+            client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+            nimbus_client (.getClient client)]
+        (testing "(Positive authorization) Simple protocol w/o authentication/authorization enforcement"
+                 (is (thrown-cause? NotAliveException
+                              (.activate nimbus_client "topo-name"))))
+        (.close client)))))
   
-(deftest test-noop-authorization-w-simple-transport 
-  (with-test-cluster [6628 nil 
-                "backtype.storm.security.auth.authorizer.NoopAuthorizer" 
-                "backtype.storm.security.auth.SimpleTransportPlugin"]
-    (let [storm-conf (merge (read-storm-config)
-                             {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                              STORM-NIMBUS-RETRY-TIMES 0})
-          client (NimbusClient. storm-conf "localhost" 6628 nimbus-timeout)
-          nimbus_client (.getClient client)]
-      (testing "(Positive authorization) Authorization plugin should accept client request"
-               (is (thrown-cause? NotAliveException
-                            (.activate nimbus_client "topo-name"))))
-      (.close client))))
+(deftest test-noop-authorization-w-simple-transport
+  (let [port (available-port)]
+    (with-test-cluster [port nil
+                  "backtype.storm.security.auth.authorizer.NoopAuthorizer"
+                  "backtype.storm.security.auth.SimpleTransportPlugin"]
+      (let [storm-conf (merge (read-storm-config)
+                               {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
+                                STORM-NIMBUS-RETRY-TIMES 0})
+            client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+            nimbus_client (.getClient client)]
+        (testing "(Positive authorization) Authorization plugin should accept client request"
+                 (is (thrown-cause? NotAliveException
+                              (.activate nimbus_client "topo-name"))))
+        (.close client)))))
 
-(deftest test-deny-authorization-w-simple-transport 
-  (with-test-cluster [6629 nil
-                "backtype.storm.security.auth.authorizer.DenyAuthorizer" 
-                "backtype.storm.security.auth.SimpleTransportPlugin"]
-    (let [storm-conf (merge (read-storm-config)
-                             {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                             Config/NIMBUS_HOST "localhost"
-                             Config/NIMBUS_THRIFT_PORT 6629
-                             STORM-NIMBUS-RETRY-TIMES 0})
-          client (NimbusClient/getConfiguredClient storm-conf)
-          nimbus_client (.getClient client)
-          topologyInitialStatus (TopologyInitialStatus/findByValue 2)
-          submitOptions (SubmitOptions. topologyInitialStatus)]
-      (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil))) 
-      (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
-      (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
-      (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
-      (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
-      (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
-      (stubbing [nimbus/check-storm-active! nil
-                 nimbus/try-read-storm-conf-from-name {}]
-        (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
-        (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil)))
-      )
-      (stubbing [nimbus/try-read-storm-conf {}]
-        (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
-      (.close client))))
+(deftest test-deny-authorization-w-simple-transport
+  (let [port (available-port)]
+    (with-test-cluster [port nil
+                  "backtype.storm.security.auth.authorizer.DenyAuthorizer"
+                  "backtype.storm.security.auth.SimpleTransportPlugin"]
+      (let [storm-conf (merge (read-storm-config)
+                               {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
+                               Config/NIMBUS_HOST "localhost"
+                               Config/NIMBUS_THRIFT_PORT port
+                               STORM-NIMBUS-RETRY-TIMES 0})
+            client (NimbusClient/getConfiguredClient storm-conf)
+            nimbus_client (.getClient client)
+            topologyInitialStatus (TopologyInitialStatus/findByValue 2)
+            submitOptions (SubmitOptions. topologyInitialStatus)]
+        (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
+        (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
+        (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
+        (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
+        (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
+        (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
+        (stubbing [nimbus/check-storm-active! nil
+                   nimbus/try-read-storm-conf-from-name {}]
+          (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
+          (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil)))
+        )
+        (stubbing [nimbus/try-read-storm-conf {}]
+          (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
+        (.close client)))))
 
-(deftest test-noop-authorization-w-sasl-digest 
-  (with-test-cluster [6630
-                "test/clj/backtype/storm/security/auth/jaas_digest.conf" 
-                "backtype.storm.security.auth.authorizer.NoopAuthorizer" 
-                "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
-    (let [storm-conf (merge (read-storm-config)
-                            {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
-                             "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                             Config/NIMBUS_HOST "localhost"
-                             Config/NIMBUS_THRIFT_PORT 6630
-                             STORM-NIMBUS-RETRY-TIMES 0})
-          client (NimbusClient/getConfiguredClient storm-conf)
-          nimbus_client (.getClient client)]
-      (testing "(Positive authorization) Authorization plugin should accept client request"
-               (is (thrown-cause? NotAliveException
-                            (.activate nimbus_client "topo-name"))))
-      (.close client))))
+(deftest test-noop-authorization-w-sasl-digest
+  (let [port (available-port)]
+    (with-test-cluster [port
+                  "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                  "backtype.storm.security.auth.authorizer.NoopAuthorizer"
+                  "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
+      (let [storm-conf (merge (read-storm-config)
+                              {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
+                               "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                               Config/NIMBUS_HOST "localhost"
+                               Config/NIMBUS_THRIFT_PORT port
+                               STORM-NIMBUS-RETRY-TIMES 0})
+            client (NimbusClient/getConfiguredClient storm-conf)
+            nimbus_client (.getClient client)]
+        (testing "(Positive authorization) Authorization plugin should accept client request"
+                 (is (thrown-cause? NotAliveException
+                              (.activate nimbus_client "topo-name"))))
+        (.close client)))))
 
-(deftest test-deny-authorization-w-sasl-digest 
-  (with-test-cluster [6631
-                "test/clj/backtype/storm/security/auth/jaas_digest.conf" 
-                "backtype.storm.security.auth.authorizer.DenyAuthorizer" 
-                "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
-    (let [storm-conf (merge (read-storm-config)
-                            {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
-                             "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                             Config/NIMBUS_HOST "localhost"
-                             Config/NIMBUS_THRIFT_PORT 6631
-                             STORM-NIMBUS-RETRY-TIMES 0})
-          client (NimbusClient/getConfiguredClient storm-conf)
-          nimbus_client (.getClient client)
-          topologyInitialStatus (TopologyInitialStatus/findByValue 2)
-          submitOptions (SubmitOptions. topologyInitialStatus)]
-      (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil))) 
-      (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
-      (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
-      (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
-      (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
-      (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
-      (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
-      (stubbing [nimbus/check-storm-active! nil
-                 nimbus/try-read-storm-conf-from-name {}]
-        (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
-        (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
-        (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil))))
-      (stubbing [nimbus/try-read-storm-conf {}]
-        (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
-        (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
-      (.close client))))
+(deftest test-deny-authorization-w-sasl-digest
+  (let [port (available-port)]
+    (with-test-cluster [port
+                  "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                  "backtype.storm.security.auth.authorizer.DenyAuthorizer"
+                  "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
+      (let [storm-conf (merge (read-storm-config)
+                              {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
+                               "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                               Config/NIMBUS_HOST "localhost"
+                               Config/NIMBUS_THRIFT_PORT port
+                               STORM-NIMBUS-RETRY-TIMES 0})
+            client (NimbusClient/getConfiguredClient storm-conf)
+            nimbus_client (.getClient client)
+            topologyInitialStatus (TopologyInitialStatus/findByValue 2)
+            submitOptions (SubmitOptions. topologyInitialStatus)]
+        (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
+        (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
+        (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
+        (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
+        (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
+        (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
+        (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
+        (stubbing [nimbus/check-storm-active! nil
+                   nimbus/try-read-storm-conf-from-name {}]
+          (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
+          (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
+          (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil))))
+        (stubbing [nimbus/try-read-storm-conf {}]
+          (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
+          (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
+        (.close client)))))
 


[09/45] storm git commit: Make CSS more consistent with self, prev release

Posted by pa...@apache.org.
Make CSS more consistent with self, prev release


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

Branch: refs/heads/nimbus-ha-branch
Commit: d3b2d631a91b69eeeb8b92f554f8f1314dff1e2e
Parents: dcee1e2
Author: Derek Dagit <de...@yahoo-inc.com>
Authored: Fri Mar 20 09:48:05 2015 -0500
Committer: Derek Dagit <de...@yahoo-inc.com>
Committed: Fri Mar 20 09:48:05 2015 -0500

----------------------------------------------------------------------
 storm-core/src/ui/public/css/style.css | 62 +++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d3b2d631/storm-core/src/ui/public/css/style.css
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/css/style.css b/storm-core/src/ui/public/css/style.css
index df3d3db..3305959 100644
--- a/storm-core/src/ui/public/css/style.css
+++ b/storm-core/src/ui/public/css/style.css
@@ -27,3 +27,65 @@
 .anti-forgery-token {
     visibility:hidden;
 }
+
+body,
+.dataTables_wrapper label,
+div.dataTables_info[role="status"],
+.btn-default
+{
+    color: #6d6d6d;
+}
+
+table.dataTable thead th,
+table.dataTable.no-footer
+{
+    border-color: #d5d5d5;
+}
+
+.table > tbody > tr > td {
+    border-top-width: 1px;
+}
+
+table.dataTable {
+    border-collapse: collapse;
+}
+
+td {
+    border-bottom-style: solid;
+    border-bottom-width: 1px;
+    border-color: #d5d5d5;
+}
+
+a {
+    color: #0069d6;
+}
+
+a:hover {
+    color: #0050a3;
+}
+
+h1
+{
+    font-weight: bold;
+}
+
+h2
+{
+    color: #404040;
+    font-weight: bold;
+}
+
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc {
+    background-color: rgba(141, 192, 219, 0.25);
+    border-top-left-radius: 3px;
+    border-top-right-radius: 3px;
+}
+
+.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
+.dataTables_wrapper .dataTables_paginate .paginate_button:active {
+    background: none;
+    background-image: none;
+    border-color: transparent;
+    box-shadow: none;
+}


[23/45] storm git commit: STORM-731. Support compiling with HBase-1.0.0.

Posted by pa...@apache.org.
STORM-731. Support compiling with HBase-1.0.0.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 011debe9bf6fb1b001bdac81cfae01b2f9f823fb
Parents: 330e135
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Sun Mar 29 09:02:21 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Sun Mar 29 09:02:21 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/storm/hbase/trident/state/HBaseMapState.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/011debe9/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseMapState.java
----------------------------------------------------------------------
diff --git a/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseMapState.java b/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseMapState.java
index 82cc3f8..a040e51 100644
--- a/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseMapState.java
+++ b/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseMapState.java
@@ -231,6 +231,8 @@ public class HBaseMapState<T> implements IBackingMap<T> {
             throw new FailedException("Interrupted while writing to HBase", e);
         } catch (RetriesExhaustedWithDetailsException e) {
             throw new FailedException("Retries exhaused while writing to HBase", e);
+        } catch (IOException e) {
+            throw new FailedException("IOException while writing to HBase", e);
         }
     }
 


[04/45] storm git commit: When using a hash key as an option for RedisMapState, only get the values for keys in the requested batch.

Posted by pa...@apache.org.
When using a hash key as an option for RedisMapState, only get the values for keys in the requested batch.

This commit fixes a bug whereby if the state updater is constructed with a hash key (ie, the state will be stored as a key in a redis hash, versus as a key in the top-level redis space), each call to multiGet would request the entire hash and iterate to extract only the values in the hash relevant to the batch.

This can cause an inordinate amount of network traffic (and actually caused our interfaces to fall over) for states with either a moderately high cardinality or large values. Instead, the call to Redis should be an hmget (hash multiget) that takes the hash key as its first argument and an array of strings as the keys to fetch from that key, thereby retrieving only the requested values.

The change also deprecates and removes buildValuesFromMap.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 26bab1595c56f6f40ea2392401e829f3ccb0cff0
Parents: 27a3606
Author: David Katten <dk...@geoforce.com>
Authored: Tue Mar 10 15:52:40 2015 -0500
Committer: David Katten <dk...@geoforce.com>
Committed: Tue Mar 10 15:52:40 2015 -0500

----------------------------------------------------------------------
 .../storm/redis/trident/state/RedisMapState.java | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/26bab159/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
index f934cea..9726868 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
@@ -223,8 +223,10 @@ public class RedisMapState<T> implements IBackingMap<T> {
         if (keys.size() == 0) {
             return Collections.emptyList();
         }
+
+        String[] stringKeys = buildKeys(keys);
+
         if (Strings.isNullOrEmpty(this.options.hkey)) {
-            String[] stringKeys = buildKeys(keys);
             Jedis jedis = null;
             try {
                 jedis = jedisPool.getResource();
@@ -239,8 +241,7 @@ public class RedisMapState<T> implements IBackingMap<T> {
             Jedis jedis = null;
             try {
                 jedis = jedisPool.getResource();
-                Map<String, String> keyValue = jedis.hgetAll(this.options.hkey);
-                List<String> values = buildValuesFromMap(keys, keyValue);
+                List<String> values = jedis.hmget(this.options.hkey, stringKeys);
                 return deserializeValues(keys, values);
             } finally {
                 if (jedis != null) {
@@ -250,16 +251,6 @@ public class RedisMapState<T> implements IBackingMap<T> {
         }
     }
 
-    private List<String> buildValuesFromMap(List<List<Object>> keys, Map<String, String> keyValue) {
-        List<String> values = new ArrayList<String>(keys.size());
-        for (List<Object> key : keys) {
-            String strKey = keyFactory.build(key);
-            String value = keyValue.get(strKey);
-            values.add(value);
-        }
-        return values;
-    }
-
     private List<T> deserializeValues(List<List<Object>> keys, List<String> values) {
         List<T> result = new ArrayList<T>(keys.size());
         for (String value : values) {
@@ -303,7 +294,7 @@ public class RedisMapState<T> implements IBackingMap<T> {
                 for (int i = 0; i < keys.size(); i++) {
                     String val = new String(serializer.serialize(vals.get(i)));
                     keyValues.put(keyFactory.build(keys.get(i)), val);
-                }               
+                }
                 jedis.hmset(this.options.hkey, keyValues);
 
             } finally {


[19/45] storm git commit: Added STORM-723 to changelog

Posted by pa...@apache.org.
Added STORM-723 to changelog


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

Branch: refs/heads/nimbus-ha-branch
Commit: 6a0ebadea41b3def331a8ee4ca1fb172281499d8
Parents: 13f6e9b
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Thu Mar 26 09:28:55 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Thu Mar 26 09:28:55 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/6a0ebade/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed87cb5..620c9ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -90,6 +90,7 @@
  * STORM-541: Build produces maven warnings
  * STORM-634: Storm serialization changed to thrift to support rolling upgrade.
  * STORM-570: Switch from tablesorter to datatables jquery plugin.
+ * STORM-723: Remove RedisStateSetUpdater / RedisStateSetCountQuerier which didn't tested and have a bug
 
 ## 0.9.3-rc2
  * STORM-558: change "swap!" to "reset!" to fix assignment-versions in supervisor


[11/45] storm git commit: Merge branch 'redis-hgetall-fix' of https://github.com/dkatten/storm into STORM-703

Posted by pa...@apache.org.
Merge branch 'redis-hgetall-fix' of https://github.com/dkatten/storm into STORM-703

STORM-703: With hash key option for RedisMapState, only get values for keys in batch


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

Branch: refs/heads/nimbus-ha-branch
Commit: 1f9dc5f861341dd0828dc50ff04cb310061b3249
Parents: dcee1e2 26bab15
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Mar 24 09:16:35 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Mar 24 09:16:35 2015 -0500

----------------------------------------------------------------------
 .../storm/redis/trident/state/RedisMapState.java | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------



[31/45] storm git commit: Merge branch 'STORM-727' of https://github.com/Parth-Brahmbhatt/incubator-storm

Posted by pa...@apache.org.
Merge branch 'STORM-727' of https://github.com/Parth-Brahmbhatt/incubator-storm


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

Branch: refs/heads/nimbus-ha-branch
Commit: 480b63a4b608daf7e5b86c83492af598bb62ff1c
Parents: d063a1a fda6860
Author: Derek Dagit <de...@yahoo-inc.com>
Authored: Mon Mar 30 09:48:10 2015 -0500
Committer: Derek Dagit <de...@yahoo-inc.com>
Committed: Mon Mar 30 09:48:10 2015 -0500

----------------------------------------------------------------------
 .../storm/security/auth/nimbus_auth_test.clj    | 231 ++++++++++---------
 1 file changed, 118 insertions(+), 113 deletions(-)
----------------------------------------------------------------------



[41/45] storm git commit: Merge branch 'STORM-708' of https://github.com/harshach/incubator-storm into STORM-708

Posted by pa...@apache.org.
Merge branch 'STORM-708' of https://github.com/harshach/incubator-storm into STORM-708


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

Branch: refs/heads/nimbus-ha-branch
Commit: 33f1a4ef86852b6f033f512512d4f9969668bfda
Parents: cd62063 9c0581e
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:43:36 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:43:36 2015 -0700

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/ui/core.clj    |  4 +++-
 storm-core/src/clj/backtype/storm/ui/helpers.clj | 15 ++++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/33f1a4ef/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/33f1a4ef/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------


[42/45] storm git commit: Added STORM-708 to CHANGELOG.

Posted by pa...@apache.org.
Added STORM-708 to CHANGELOG.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 20084ba3405ac0ef089fa5b951e9f64f9e0f6f50
Parents: 33f1a4e
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:44:13 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:44:13 2015 -0700

----------------------------------------------------------------------
 CHANGELOG.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/20084ba3/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d11d5a6..bb1e4e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
 ## 0.11.0
- * STORM:615: Add REST API to upload topology.
+ * STORM-708: CORS support for STORM UI.
+ * STORM-615: Add REST API to upload topology.
  * STORM-741: Allow users to pass a config value to perform impersonation.
  * STORM-724: Document RedisStoreBolt and RedisLookupBolt which is missed.
  * STORM-711: All connectors should use collector.reportError and tuple anchoring.


[20/45] storm git commit: add blog post and update downloads for 0.9.4 release

Posted by pa...@apache.org.
add blog post and update downloads for 0.9.4 release


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

Branch: refs/heads/nimbus-ha-branch
Commit: d96a523cd4e6e4652a4e62883c2eca4706be6c2c
Parents: 6a0ebad
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Thu Mar 26 16:20:36 2015 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Thu Mar 26 16:20:36 2015 -0400

----------------------------------------------------------------------
 docs/_posts/2015-03-25-storm094-released.md | 24 +++++++++
 docs/downloads.html                         | 64 ++++++++++++++++--------
 2 files changed, 67 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/d96a523c/docs/_posts/2015-03-25-storm094-released.md
----------------------------------------------------------------------
diff --git a/docs/_posts/2015-03-25-storm094-released.md b/docs/_posts/2015-03-25-storm094-released.md
new file mode 100644
index 0000000..0119e38
--- /dev/null
+++ b/docs/_posts/2015-03-25-storm094-released.md
@@ -0,0 +1,24 @@
+---
+layout: post
+title: Storm 0.9.4 released
+author: P. Taylor Goetz
+---
+
+The Apache Storm community is pleased to announce that version 0.9.4 has been released and is available from [the downloads page](/downloads.html).
+
+This is a maintenance release that includes a number of important bug fixes that improve Storm's stability and fault tolerance. We encourage users of previous versions to upgrade to this latest release.
+
+
+Thanks
+------
+Special thanks are due to all those who have contributed to Apache Storm -- whether through direct code contributions, documentation, bug reports, or helping other users on the mailing lists. Your efforts are much appreciated.
+
+
+Full Changelog
+---------
+
+ * STORM-559: ZkHosts in README should use 2181 as port.
+ * STORM-682: supervisor should handle worker state corruption gracefully.
+ * STORM-693: when kafka bolt fails to write tuple, it should report error instead of silently acking.
+ * STORM-329: fix cascading Storm failure by improving reconnection strategy and buffering messages
+ * STORM-130: Supervisor getting killed due to java.io.FileNotFoundException: File '../stormconf.ser' does not exist.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/d96a523c/docs/downloads.html
----------------------------------------------------------------------
diff --git a/docs/downloads.html b/docs/downloads.html
index 1e3a97f..bb80b20 100644
--- a/docs/downloads.html
+++ b/docs/downloads.html
@@ -27,11 +27,51 @@ older:
   Current source code is hosted on GitHub, <a href="https://github.com/apache/storm">apache/storm</a>
   
   <h3>Current Release</h3>
-  The current release is 0.9.3. Source and binary distributions can be found below.
+  The current release is 0.9.4. Source and binary distributions can be found below.
   
-  The list of changes for this release can be found <a href="https://github.com/apache/storm/blob/v0.9.3/CHANGELOG.md">here.</a>
+  The list of changes for this release can be found <a href="https://github.com/apache/storm/blob/v0.9.4/CHANGELOG.md">here.</a>
 
   <ul>
+	  <li><a href="http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.4/apache-storm-0.9.4.tar.gz">apache-storm-0.9.4.tar.gz</a>
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.tar.gz.asc">PGP</a>]
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.tar.gz.sha">SHA512</a>] 
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.tar.gz.md5">MD5</a>]
+	  </li>
+	  <li><a href="http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.4/apache-storm-0.9.4.zip">apache-storm-0.9.4.zip</a>
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.zip.asc">PGP</a>]
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.zip.sha">SHA512</a>] 
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4.zip.md5">MD5</a>]
+	  </li>
+	  <li><a href="http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.tar.gz">apache-storm-0.9.4-src.tar.gz</a>
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.tar.gz.asc">PGP</a>]
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.tar.gz.sha">SHA512</a>] 
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.tar.gz.md5">MD5</a>]
+	  </li>
+	  <li><a href="http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.zip">apache-storm-0.9.4-src.zip</a>
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.zip.asc">PGP</a>]
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.zip.sha">SHA512</a>] 
+	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.4/apache-storm-0.9.4-src.zip.md5">MD5</a>]
+	  </li>
+  </ul>
+
+  Storm artifacts are hosted in <a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.storm%22">Maven Central</a>. You can add Storm as a dependency with the following coordinates:
+  <pre>
+groupId: <a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.storm%22">org.apache.storm</a>
+artifactId: storm-core
+version: 0.9.4
+  </pre>
+  
+  
+  The signing keys for releases can be found <a href="http://www.apache.org/dist/storm/KEYS">here.</a>
+  
+  <p>
+	  
+  </p>
+  <h3>Previous Releases</h3>
+  
+  <b>0.9.3</b>
+  
+  <ul>
 	  <li><a href="http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz">apache-storm-0.9.3.tar.gz</a>
 	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz.asc">PGP</a>]
 	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz.sha">SHA512</a>] 
@@ -53,21 +93,7 @@ older:
 	     [<a href="http://www.us.apache.org/dist/storm/apache-storm-0.9.3/apache-storm-0.9.3-src.zip.md5">MD5</a>]
 	  </li>
   </ul>
-
-  Storm artifacts are hosted in <a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.storm%22">Maven Central</a>. You can add Storm as a dependency with the following coordinates:
-  <pre>
-groupId: <a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.storm%22">org.apache.storm</a>
-artifactId: storm-core
-version: 0.9.3
-  </pre>
-  
-  
-  The signing keys for releases can be found <a href="http://www.apache.org/dist/storm/KEYS">here.</a>
   
-  <p>
-	  
-  </p>
-  <h3>Previous Releases</h3>
   
   <b>0.9.2-incubating</b>
   
@@ -94,11 +120,7 @@ version: 0.9.3
 	  </li>
   </ul>
   
-  
-  
-  
-  
-  
+
   <b>0.9.1-incubating</b>
   
   <ul>


[25/45] storm git commit: STORM-708. CORS support for STORM UI. Allow CORS to do POST.

Posted by pa...@apache.org.
STORM-708. CORS support for STORM UI. Allow CORS to do POST.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 9c0581e2f0c3ce534017c377e1c0ca206dc90634
Parents: 2c486b3
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Sun Mar 29 21:32:38 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Sun Mar 29 21:32:38 2015 -0700

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/ui/core.clj    | 3 ++-
 storm-core/src/clj/backtype/storm/ui/helpers.clj | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/9c0581e2/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj
index a13fcf3..b8ecbe2 100644
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@ -893,7 +893,8 @@
   [data callback :serialize-fn to-json :status 200]
      {:status status
       :headers (merge {"Cache-Control" "no-cache, no-store"
-                       "Access-Control-Allow-Origin" "*"}
+                       "Access-Control-Allow-Origin" "*"
+                       "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
                       (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
                           {"Content-Type" "application/json;charset=utf-8"}))
       :body (if (not-nil? callback)

http://git-wip-us.apache.org/repos/asf/storm/blob/9c0581e2/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index a7eb280..b54a46a 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -177,6 +177,7 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
     (.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
     (.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
     (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "X-Requested-With, X-Requested-By, Access-Control-Allow-Origin, Content-Type, Content-Length, Accept, Origin")
+    (.setInitParameter CrossOriginFilter/ACCESS_CONTROL_ALLOW_ORIGIN_HEADER "*")
     ))
 
 (defn config-filter [server handler filters-confs]


[10/45] storm git commit: STORM-708. CORS support for STORM UI.

Posted by pa...@apache.org.
STORM-708. CORS support for STORM UI.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 2c486b31844a18808364cfb3ff68ec967ec46124
Parents: 0201a90
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Sun Mar 22 11:03:42 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Sun Mar 22 11:03:42 2015 -0700

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/ui/core.clj    | 3 ++-
 storm-core/src/clj/backtype/storm/ui/helpers.clj | 7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/2c486b31/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj
index c64f35d..a13fcf3 100644
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@ -892,7 +892,8 @@
 (defnk json-response
   [data callback :serialize-fn to-json :status 200]
      {:status status
-      :headers (merge {"Cache-Control" "no-cache, no-store"}
+      :headers (merge {"Cache-Control" "no-cache, no-store"
+                       "Access-Control-Allow-Origin" "*"}
                       (if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
                           {"Content-Type" "application/json;charset=utf-8"}))
       :body (if (not-nil? callback)

http://git-wip-us.apache.org/repos/asf/storm/blob/2c486b31/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index 562a407..a7eb280 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -23,10 +23,12 @@
   (:use [backtype.storm.util :only [clojurify-structure uuid defnk url-encode]])
   (:use [clj-time coerce format])
   (:import [backtype.storm.generated ExecutorInfo ExecutorSummary])
+  (:import [java.util EnumSet])
   (:import [org.eclipse.jetty.server Server]
            [org.eclipse.jetty.server.nio SelectChannelConnector]
            [org.eclipse.jetty.server.ssl SslSocketConnector]
            [org.eclipse.jetty.servlet ServletHolder FilterMapping]
+           [org.eclipse.jetty.server DispatcherType]
            [org.eclipse.jetty.servlets CrossOriginFilter])
   (:require [ring.util servlet])
   (:require [compojure.route :as route]
@@ -174,7 +176,8 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
   (doto (org.eclipse.jetty.servlet.FilterHolder. (CrossOriginFilter.))
     (.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
     (.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
-    (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "*")))
+    (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "X-Requested-With, X-Requested-By, Access-Control-Allow-Origin, Content-Type, Content-Length, Accept, Origin")
+    ))
 
 (defn config-filter [server handler filters-confs]
   (if filters-confs
@@ -182,7 +185,7 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
                            (ring.util.servlet/servlet handler))
           context (doto (org.eclipse.jetty.servlet.ServletContextHandler. server "/")
                     (.addServlet servlet-holder "/"))]
-      (.addFilter context (cors-filter-handler) "/*" FilterMapping/ALL)
+      (.addFilter context (cors-filter-handler) "/*" (EnumSet/allOf DispatcherType))
       (doseq [{:keys [filter-name filter-class filter-params]} filters-confs]
         (if filter-class
           (let [filter-holder (doto (org.eclipse.jetty.servlet.FilterHolder.)


[21/45] storm git commit: Merge branch 'polish-ui-styles' of https://github.com/d2r/storm

Posted by pa...@apache.org.
Merge branch 'polish-ui-styles' of https://github.com/d2r/storm


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

Branch: refs/heads/nimbus-ha-branch
Commit: c207f925c3da4ac814c733612e590f3327e2fd2a
Parents: d96a523 d3b2d63
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Thu Mar 26 16:37:39 2015 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Thu Mar 26 16:37:39 2015 -0500

----------------------------------------------------------------------
 storm-core/src/ui/public/css/style.css | 62 +++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
----------------------------------------------------------------------



[15/45] storm git commit: Remove unused code

Posted by pa...@apache.org.
Remove unused code


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

Branch: refs/heads/nimbus-ha-branch
Commit: 286c52bbaea9c83d964ceacac1b44d5815294d3e
Parents: a8a0dfd
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Mar 25 18:30:52 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Mar 25 18:30:52 2015 +0900

----------------------------------------------------------------------
 .../redis/topology/PersistentWordCount.java     | 35 --------------------
 1 file changed, 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/286c52bb/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
index 14a969d..77c6ee8 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
@@ -45,41 +45,6 @@ public class PersistentWordCount {
     private static final String TEST_REDIS_HOST = "127.0.0.1";
     private static final int TEST_REDIS_PORT = 6379;
 
-    public static class StoreCountRedisBolt extends AbstractRedisBolt {
-        private static final Logger LOG = LoggerFactory.getLogger(StoreCountRedisBolt.class);
-
-        public StoreCountRedisBolt(JedisPoolConfig config) {
-            super(config);
-        }
-
-        public StoreCountRedisBolt(JedisClusterConfig config) {
-            super(config);
-        }
-
-        @Override
-        public void execute(Tuple input) {
-            String word = input.getStringByField("word");
-            int count = input.getIntegerByField("count");
-
-            JedisCommands commands = null;
-            try {
-                commands = getInstance();
-                commands.incrBy(word, count);
-            } catch (JedisConnectionException e) {
-                throw new RuntimeException("Unfortunately, this test requires redis-server running", e);
-            } catch (JedisException e) {
-                LOG.error("Exception occurred from Jedis/Redis", e);
-            } finally {
-                returnInstance(commands);
-                this.collector.ack(input);
-            }
-        }
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-        }
-    }
-
     public static void main(String[] args) throws Exception {
         Config config = new Config();
 


[05/45] storm git commit: apply defensive programming to switch statements

Posted by pa...@apache.org.
apply defensive programming to switch statements


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

Branch: refs/heads/nimbus-ha-branch
Commit: 62b5a7e58ac2441edb0717d24c751697623b239c
Parents: b129080
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Thu Mar 12 08:36:49 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Thu Mar 12 08:36:49 2015 +0900

----------------------------------------------------------------------
 .../main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java    | 3 +++
 .../src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/62b5a7e5/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
index c40e983..bbd7e6a 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
@@ -86,6 +86,9 @@ public class RedisLookupBolt extends AbstractRedisBolt {
                 case HYPER_LOG_LOG:
                     lookupValue = jedisCommand.pfcount(key);
                     break;
+
+                default:
+                    throw new IllegalArgumentException("Cannot process such data type: " + dataType);
             }
 
             List<Values> values = lookupMapper.toTuple(input, lookupValue);

http://git-wip-us.apache.org/repos/asf/storm/blob/62b5a7e5/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
index 5602c44..761c5ed 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
@@ -80,6 +80,9 @@ public class RedisStoreBolt extends AbstractRedisBolt {
                 case HYPER_LOG_LOG:
                     jedisCommand.pfadd(key, value);
                     break;
+
+                default:
+                    throw new IllegalArgumentException("Cannot process such data type: " + dataType);
             }
 
             collector.ack(input);


[12/45] storm git commit: Moved to 0.11.0-SNAPSHOT and added STORM-703 to Changelog and README

Posted by pa...@apache.org.
Moved to 0.11.0-SNAPSHOT and added STORM-703 to Changelog and README


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

Branch: refs/heads/nimbus-ha-branch
Commit: 549b01a0341437865d47a76f8a1da5d53597513c
Parents: 1f9dc5f
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Mar 24 09:39:54 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Mar 24 09:39:54 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.md                                             | 3 +++
 README.markdown                                          | 1 +
 examples/storm-starter/pom.xml                           | 2 +-
 external/storm-hbase/pom.xml                             | 2 +-
 external/storm-hdfs/pom.xml                              | 2 +-
 external/storm-hive/pom.xml                              | 2 +-
 external/storm-jdbc/pom.xml                              | 2 +-
 external/storm-kafka/pom.xml                             | 2 +-
 external/storm-redis/pom.xml                             | 2 +-
 pom.xml                                                  | 2 +-
 storm-buildtools/maven-shade-clojure-transformer/pom.xml | 2 +-
 storm-buildtools/storm-maven-plugins/pom.xml             | 2 +-
 storm-core/pom.xml                                       | 2 +-
 storm-dist/binary/pom.xml                                | 2 +-
 storm-dist/source/pom.xml                                | 2 +-
 15 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 424128a..969906e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 0.11.0
+ * STORM-703: With hash key option for RedisMapState, only get values for keys in batch
+
 ## 0.10.0
  * STORM-681: Auto insert license header with genthrift.sh
  * STORM-707: Client (Netty): improve logging to help troubleshooting connection woes

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 8f4fb5e..17849b7 100644
--- a/README.markdown
+++ b/README.markdown
@@ -192,6 +192,7 @@ under the License.
 * Hari Sekhon ([@harisekhon](https://github.com/harisekhon))
 * iBuddha ([@iBuddha](https://github.com/iBuddha))
 * Rekha Joshi ([@rekhajoshm](https://github.com/rekhajoshm))
+* Dave Katten ([@dkatten](https://github.com/dkatten))
 
 ## Acknowledgements
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/examples/storm-starter/pom.xml
----------------------------------------------------------------------
diff --git a/examples/storm-starter/pom.xml b/examples/storm-starter/pom.xml
index f59e692..a422c9b 100644
--- a/examples/storm-starter/pom.xml
+++ b/examples/storm-starter/pom.xml
@@ -20,7 +20,7 @@
   <parent>
       <artifactId>storm</artifactId>
       <groupId>org.apache.storm</groupId>
-      <version>0.10.0-SNAPSHOT</version>
+      <version>0.11.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-hbase/pom.xml b/external/storm-hbase/pom.xml
index b2f8f44..f93998d 100644
--- a/external/storm-hbase/pom.xml
+++ b/external/storm-hbase/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-hdfs/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/pom.xml b/external/storm-hdfs/pom.xml
index dcbfb7a..5b59eb1 100644
--- a/external/storm-hdfs/pom.xml
+++ b/external/storm-hdfs/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-hive/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-hive/pom.xml b/external/storm-hive/pom.xml
index adf7567..32dbc4d 100644
--- a/external/storm-hive/pom.xml
+++ b/external/storm-hive/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>storm</artifactId>
     <groupId>org.apache.storm</groupId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.11.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-jdbc/pom.xml b/external/storm-jdbc/pom.xml
index 894dd54..cc4c09b 100644
--- a/external/storm-jdbc/pom.xml
+++ b/external/storm-jdbc/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml
index 73e3a46..9296e0b 100644
--- a/external/storm-kafka/pom.xml
+++ b/external/storm-kafka/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/external/storm-redis/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-redis/pom.xml b/external/storm-redis/pom.xml
index e4d7daa..30a0880 100644
--- a/external/storm-redis/pom.xml
+++ b/external/storm-redis/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 236e20f..524bcbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
 
     <groupId>org.apache.storm</groupId>
     <artifactId>storm</artifactId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.11.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Storm</name>
     <description>Distributed and fault-tolerant realtime computation</description>

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/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 6056c6b..6489027 100644
--- a/storm-buildtools/maven-shade-clojure-transformer/pom.xml
+++ b/storm-buildtools/maven-shade-clojure-transformer/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/storm-buildtools/storm-maven-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/storm-buildtools/storm-maven-plugins/pom.xml b/storm-buildtools/storm-maven-plugins/pom.xml
index 5579d03..de2155a 100644
--- a/storm-buildtools/storm-maven-plugins/pom.xml
+++ b/storm-buildtools/storm-maven-plugins/pom.xml
@@ -22,7 +22,7 @@
   <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
   </parent>
   <groupId>org.apache.storm</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 7f7b812..ff04494 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
     <groupId>org.apache.storm</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/storm-dist/binary/pom.xml
----------------------------------------------------------------------
diff --git a/storm-dist/binary/pom.xml b/storm-dist/binary/pom.xml
index e70dfcf..c2d709d 100644
--- a/storm-dist/binary/pom.xml
+++ b/storm-dist/binary/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <groupId>org.apache.storm</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/549b01a0/storm-dist/source/pom.xml
----------------------------------------------------------------------
diff --git a/storm-dist/source/pom.xml b/storm-dist/source/pom.xml
index 49770a4..5b83c07 100644
--- a/storm-dist/source/pom.xml
+++ b/storm-dist/source/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>storm</artifactId>
         <groupId>org.apache.storm</groupId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.11.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <groupId>org.apache.storm</groupId>


[07/45] storm git commit: STORM-711: modifying all connectors to use collector.reportError instead of logging and use tuple anchoring when emitting a tuple.

Posted by pa...@apache.org.
STORM-711: modifying all connectors to use collector.reportError instead of logging and use tuple anchoring when emitting a tuple.


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

Branch: refs/heads/nimbus-ha-branch
Commit: ffb1562cb0eb3fbd916423136fcd3c181fbf6212
Parents: 2666d99
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Wed Mar 18 10:15:53 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Wed Mar 18 10:49:27 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java     | 2 +-
 .../main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java   | 4 ++--
 .../java/org/apache/storm/hbase/trident/state/HBaseState.java    | 2 +-
 .../src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java       | 2 +-
 .../main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/ffb1562c/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 f7f0886..cf29aa5 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
@@ -62,7 +62,7 @@ public class HBaseBolt  extends AbstractHBaseBolt {
         try {
             this.hBaseClient.batchMutate(mutations);
         } catch(Exception e){
-            LOG.warn("Failing tuple. Error writing rowKey " + rowKey, e);
+            this.collector.reportError(e);
             this.collector.fail(tuple);
             return;
         }

http://git-wip-us.apache.org/repos/asf/storm/blob/ffb1562c/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java
index c6838be..fd32f50 100644
--- a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java
+++ b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java
@@ -67,11 +67,11 @@ public class HBaseLookupBolt extends AbstractHBaseBolt {
         try {
             Result result = hBaseClient.batchGet(Lists.newArrayList(get))[0];
             for(Values values : rowToTupleMapper.toValues(tuple, result)) {
-                this.collector.emit(values);
+                this.collector.emit(tuple, values);
             }
             this.collector.ack(tuple);
         } catch (Exception e) {
-            LOG.warn("Could not perform Lookup for rowKey =" + rowKey + " from Hbase.", e);
+            this.collector.reportError(e);
             this.collector.fail(tuple);
         }
     }

http://git-wip-us.apache.org/repos/asf/storm/blob/ffb1562c/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseState.java
----------------------------------------------------------------------
diff --git a/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseState.java b/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseState.java
index 71ab7c4..04518ca 100644
--- a/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseState.java
+++ b/external/storm-hbase/src/main/java/org/apache/storm/hbase/trident/state/HBaseState.java
@@ -141,7 +141,7 @@ public class HBaseState implements State {
         try {
             hBaseClient.batchMutate(mutations);
         } catch (Exception e) {
-            LOG.warn("Batch write failed but some requests might have succeeded. Triggering replay.", e);
+            collector.reportError(e);
             throw new FailedException(e);
         }
     }

http://git-wip-us.apache.org/repos/asf/storm/blob/ffb1562c/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java
index a416357..dcb09e7 100644
--- a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java
+++ b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java
@@ -112,7 +112,7 @@ public class HdfsBolt extends AbstractHdfsBolt{
                 this.rotationPolicy.reset();
             }
         } catch (IOException e) {
-            LOG.warn("write/sync failed.", e);
+            this.collector.reportError(e);
             this.collector.fail(tuple);
         }
     }

http://git-wip-us.apache.org/repos/asf/storm/blob/ffb1562c/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java
index fc9bb4f..baf4df0 100644
--- a/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java
+++ b/external/storm-hdfs/src/main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java
@@ -123,7 +123,7 @@ public class SequenceFileBolt extends AbstractHdfsBolt {
                 this.rotationPolicy.reset();
             }
         } catch (IOException e) {
-            LOG.warn("write/sync failed.", e);
+            this.collector.reportError(e);
             this.collector.fail(tuple);
         }
 


[26/45] storm git commit: Merge branch 'STORM-711' of https://github.com/Parth-Brahmbhatt/incubator-storm into STORM-711

Posted by pa...@apache.org.
Merge branch 'STORM-711' of https://github.com/Parth-Brahmbhatt/incubator-storm into STORM-711


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

Branch: refs/heads/nimbus-ha-branch
Commit: fe556e9f7a857158e9bad24cea74b7a063a783de
Parents: 330e135 ffb1562
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Mar 29 21:39:29 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Mar 29 21:39:29 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java     | 2 +-
 .../main/java/org/apache/storm/hbase/bolt/HBaseLookupBolt.java   | 4 ++--
 .../java/org/apache/storm/hbase/trident/state/HBaseState.java    | 2 +-
 .../src/main/java/org/apache/storm/hdfs/bolt/HdfsBolt.java       | 2 +-
 .../main/java/org/apache/storm/hdfs/bolt/SequenceFileBolt.java   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[45/45] storm git commit: Merge remote-tracking branch 'apache/master' into nimbus-ha

Posted by pa...@apache.org.
Merge remote-tracking branch 'apache/master' into nimbus-ha

Conflicts:
	storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
	storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj


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

Branch: refs/heads/nimbus-ha-branch
Commit: 765e4c2fabafbfe31fb0f43e5b670fd3b91d1a2e
Parents: a11fcc3 2aaa718
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Wed Apr 1 10:44:56 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Wed Apr 1 10:44:56 2015 -0700

----------------------------------------------------------------------
 CHANGELOG.md                                    |  13 ++
 README.markdown                                 |   2 +
 STORM-UI-REST-API.md                            |  30 +++
 docs/_posts/2015-03-25-storm094-released.md     |  24 ++
 docs/downloads.html                             |  64 ++++--
 examples/storm-starter/pom.xml                  |   2 +-
 external/storm-hbase/pom.xml                    |   2 +-
 .../org/apache/storm/hbase/bolt/HBaseBolt.java  |   2 +-
 .../storm/hbase/bolt/HBaseLookupBolt.java       |   4 +-
 .../hbase/trident/state/HBaseMapState.java      |   2 +
 .../storm/hbase/trident/state/HBaseState.java   |   2 +-
 external/storm-hdfs/pom.xml                     |   2 +-
 .../org/apache/storm/hdfs/bolt/HdfsBolt.java    |   2 +-
 .../storm/hdfs/bolt/SequenceFileBolt.java       |   2 +-
 external/storm-hive/pom.xml                     |   2 +-
 external/storm-jdbc/pom.xml                     |   2 +-
 external/storm-kafka/pom.xml                    |   2 +-
 .../src/jvm/storm/kafka/KafkaUtils.java         |  16 +-
 external/storm-redis/README.md                  | 108 ++++++++-
 external/storm-redis/pom.xml                    |   2 +-
 .../storm/redis/bolt/AbstractRedisBolt.java     |   8 +-
 .../storm/redis/bolt/RedisLookupBolt.java       | 112 ++++++++++
 .../apache/storm/redis/bolt/RedisStoreBolt.java | 100 +++++++++
 .../redis/common/config/JedisClusterConfig.java |  82 +++++++
 .../redis/common/config/JedisPoolConfig.java    |  97 +++++++++
 .../common/container/JedisClusterContainer.java |  47 ++++
 .../JedisCommandsContainerBuilder.java          |  38 ++++
 .../JedisCommandsInstanceContainer.java         |  25 +++
 .../redis/common/container/JedisContainer.java  |  65 ++++++
 .../common/mapper/RedisDataTypeDescription.java |  50 +++++
 .../redis/common/mapper/RedisLookupMapper.java  |  40 ++++
 .../storm/redis/common/mapper/RedisMapper.java  |  22 ++
 .../redis/common/mapper/RedisStoreMapper.java   |  21 ++
 .../storm/redis/common/mapper/TupleMapper.java  |  27 +++
 .../trident/mapper/TridentTupleMapper.java      |  27 ---
 .../trident/state/RedisClusterMapState.java     |   2 +-
 .../redis/trident/state/RedisClusterState.java  |   2 +-
 .../trident/state/RedisClusterStateQuerier.java |  10 +-
 .../trident/state/RedisClusterStateUpdater.java |  10 +-
 .../redis/trident/state/RedisMapState.java      |  21 +-
 .../storm/redis/trident/state/RedisState.java   |   2 +-
 .../redis/trident/state/RedisStateQuerier.java  |  10 +-
 .../state/RedisStateSetCountQuerier.java        |  74 -------
 .../trident/state/RedisStateSetUpdater.java     |  80 -------
 .../redis/trident/state/RedisStateUpdater.java  |  10 +-
 .../redis/util/config/JedisClusterConfig.java   |  82 -------
 .../redis/util/config/JedisPoolConfig.java      |  97 ---------
 .../util/container/JedisClusterContainer.java   |  47 ----
 .../JedisCommandsContainerBuilder.java          |  38 ----
 .../JedisCommandsInstanceContainer.java         |  25 ---
 .../redis/util/container/JedisContainer.java    |  65 ------
 .../storm/redis/topology/LookupWordCount.java   | 115 ++++++----
 .../redis/topology/PersistentWordCount.java     |  81 ++++---
 .../storm/redis/topology/WordCounter.java       |  19 +-
 .../redis/trident/WordCountTridentRedis.java    |   7 +-
 .../trident/WordCountTridentRedisCluster.java   |   6 +-
 .../WordCountTridentRedisClusterMap.java        |   8 +-
 .../redis/trident/WordCountTridentRedisMap.java |   9 +-
 .../redis/trident/WordCountTupleMapper.java     |  10 +-
 pom.xml                                         |   2 +-
 .../maven-shade-clojure-transformer/pom.xml     |   2 +-
 storm-buildtools/storm-maven-plugins/pom.xml    |   2 +-
 storm-core/pom.xml                              |   2 +-
 storm-core/src/clj/backtype/storm/ui/core.clj   |  62 +++++-
 .../src/clj/backtype/storm/ui/helpers.clj       |  15 +-
 storm-core/src/jvm/backtype/storm/Config.java   |   6 +
 .../jvm/backtype/storm/utils/NimbusClient.java  |  29 ++-
 storm-core/src/ui/public/css/style.css          |  62 ++++++
 .../storm/security/auth/nimbus_auth_test.clj    | 217 ++++++++++---------
 storm-dist/binary/pom.xml                       |   2 +-
 storm-dist/source/pom.xml                       |   2 +-
 71 files changed, 1425 insertions(+), 854 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/STORM-UI-REST-API.md
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/storm-core/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --cc storm-core/src/clj/backtype/storm/ui/core.clj
index 553434e,ab2b2d9..02c3d90
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@@ -16,10 -16,12 +16,12 @@@
  
  (ns backtype.storm.ui.core
    (:use compojure.core)
-   (:use ring.middleware.reload)
+   (:use [clojure.java.shell :only [sh]])
+   (:use ring.middleware.reload
+         ring.middleware.multipart-params)
    (:use [ring.middleware.json :only [wrap-json-params]])
    (:use [hiccup core page-helpers])
 -  (:use [backtype.storm config util log])
 +  (:use [backtype.storm config util log zookeeper])
    (:use [backtype.storm.ui helpers])
    (:use [backtype.storm.daemon [common :only [ACKER-COMPONENT-ID ACKER-INIT-STREAM-ID ACKER-ACK-STREAM-ID
                                                ACKER-FAIL-STREAM-ID system-id? mk-authorization-handler]]])
@@@ -499,8 -505,41 +501,41 @@@
                (hashmap-to-persistent bolts))
         spout-comp-summs bolt-comp-summs window id))))
  
+ (defn validate-tplg-submit-params [params]
+   (let [tplg-jar-file (params :topologyJar)
+         tplg-config (if (not-nil? (params :topologyConfig)) (from-json (params :topologyConfig)))]
+     (cond
+      (nil? tplg-jar-file) {:valid false :error "missing topology jar file"}
+      (nil? tplg-config) {:valid false :error "missing topology config"}
+      (nil? (tplg-config "topologyMainClass")) {:valid false :error "topologyMainClass missing in topologyConfig"}
+      :else {:valid true})))
+ 
+ (defn run-tplg-submit-cmd [tplg-jar-file tplg-config user]
+   (let [tplg-main-class (if (not-nil? tplg-config) (trim (tplg-config "topologyMainClass")))
+         tplg-main-class-args (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyMainClassArgs")))
+         tplg-jvm-opts (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyJvmOpts")))
+         storm-home (System/getProperty "storm.home")
+         storm-conf-dir (str storm-home file-path-separator "conf")
+         storm-log-dir (if (not-nil? (*STORM-CONF* "storm.log.dir")) (*STORM-CONF* "storm.log.dir")
+                           (str storm-home file-path-separator "logs"))
+         storm-libs (str storm-home file-path-separator "lib" file-path-separator "*")
+         java-cmd (str (System/getProperty "java.home") file-path-separator "bin" file-path-separator "java")
+         storm-cmd (str storm-home file-path-separator "bin" file-path-separator "storm")
+         tplg-cmd-response (sh storm-cmd "jar" tplg-jar-file
+                               tplg-main-class
+                               tplg-main-class-args
+                               (if (not= user "unknown") (str "-c storm.doAsUser=" user) ""))]
+     (log-message "tplg-cmd-response " tplg-cmd-response)
+     (cond
+      (= (tplg-cmd-response :exit) 0) {"status" "success"}
+      (and (not= (tplg-cmd-response :exit) 0)
+           (not-nil? (re-find #"already exists on cluster" (tplg-cmd-response :err)))) {"status" "failed" "error" "Topology with the same name exists in cluster"}
+           (not= (tplg-cmd-response :exit) 0) {"status" "failed" "error" (clojure.string/trim-newline (tplg-cmd-response :err))}
+           :else {"status" "success" "response" "topology deployed"}
+           )))
+ 
  (defn cluster-configuration []
 -  (with-nimbus nimbus
 +  (thrift/with-configured-nimbus-connection nimbus
      (.getNimbusConf ^Nimbus$Client nimbus)))
  
  (defn cluster-summary

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

http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
----------------------------------------------------------------------
diff --cc storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
index 071d2b6,6314deb..08610e9
--- a/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
+++ b/storm-core/src/jvm/backtype/storm/utils/NimbusClient.java
@@@ -46,34 -41,23 +46,43 @@@ public class NimbusClient extends Thrif
      }
  
      public static NimbusClient getConfiguredClientAs(Map conf, String asUser) {
 -        try {
 -            if(conf.containsKey(Config.STORM_DO_AS_USER)) {
 -                if(asUser != null && !asUser.isEmpty()) {
 -                    LOG.warn("You have specified a doAsUser as param {} and a doAsParam as config, config will take precedence."
 -                            , asUser, conf.get(Config.STORM_DO_AS_USER));
++        if (conf.containsKey(Config.STORM_DO_AS_USER)) {
++            if (asUser != null && !asUser.isEmpty()) {
++                LOG.warn("You have specified a doAsUser as param {} and a doAsParam as config, config will take precedence."
++                        , asUser, conf.get(Config.STORM_DO_AS_USER));
++            }
++            asUser = (String) conf.get(Config.STORM_DO_AS_USER);
++        }
++
 +        List<String> seeds = (List<String>) conf.get(Config.NIMBUS_SEEDS);
-         for(String seed : seeds) {
++        for (String seed : seeds) {
 +            String[] split = seed.split(":");
 +            String host = split[0];
 +            int port = Integer.parseInt(split[1]);
 +            try {
-                 NimbusClient client = new NimbusClient(conf,host,port);
++                NimbusClient client = new NimbusClient(conf, host, port);
 +                ClusterSummary clusterInfo = client.getClient().getClusterInfo();
 +                List<NimbusSummary> nimbuses = clusterInfo.get_nimbuses();
-                 if(nimbuses != null) {
-                     for(NimbusSummary nimbusSummary : nimbuses) {
-                         if(nimbusSummary.is_isLeader()) {
++                if (nimbuses != null) {
++                    for (NimbusSummary nimbusSummary : nimbuses) {
++                        if (nimbusSummary.is_isLeader()) {
 +                            return new NimbusClient(conf, nimbusSummary.get_host(), nimbusSummary.get_port(), null, asUser);
 +                        }
 +                    }
++                    throw new RuntimeException("Found nimbuses " + nimbuses + " none of which is elected as leader, please try " +
++                            "again after some time.");
                  }
-                 throw new RuntimeException("Found nimbuses " + nimbuses + " none of which is elected as leader, please try " +
-                         "again after some time.");
 -                asUser = (String) conf.get(Config.STORM_DO_AS_USER);
 +            } catch (Exception e) {
-                 LOG.warn("Ignoring exception while trying to get leader nimbus info from " + seed, e);
++                LOG.warn("Ignoring exception while trying to get leader nimbus info from " + seed
++                        + ". will retry with a different seed host.", e);
              }
 -            String nimbusHost = (String) conf.get(Config.NIMBUS_HOST);
 -            return new NimbusClient(conf, nimbusHost, null, null, asUser);
 -        } catch (TTransportException ex) {
 -            throw new RuntimeException(ex);
          }
-         throw new RuntimeException("Could not find leader nimbus from seed hosts " + seeds +". " +
++        throw new RuntimeException("Could not find leader nimbus from seed hosts " + seeds + ". " +
 +                "Did you specify a valid list of nimbus host:port for config " + Config.NIMBUS_SEEDS);
      }
  
      public NimbusClient(Map conf, String host, int port) throws TTransportException {
--        this(conf, host, port, null);
++        this(conf, host, port, null, null);
      }
  
      public NimbusClient(Map conf, String host, int port, Integer timeout) throws TTransportException {

http://git-wip-us.apache.org/repos/asf/storm/blob/765e4c2f/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
----------------------------------------------------------------------
diff --cc storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
index 8908593,0a9c280..dff3042
--- a/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
+++ b/storm-core/test/clj/backtype/storm/security/auth/nimbus_auth_test.clj
@@@ -56,120 -56,127 +56,125 @@@
        (testing/kill-local-storm-cluster cluster-map#)
        (.stop nimbus-server#)))
  
 -(deftest Simple-authentication-test 
 +(deftest Simple-authentication-test
-   (with-test-cluster [6627 nil nil "backtype.storm.security.auth.SimpleTransportPlugin"]
-     (let [storm-conf (merge (read-storm-config)
-                             {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                              STORM-NIMBUS-RETRY-TIMES 0})
-           client (NimbusClient. storm-conf "localhost" 6627 nimbus-timeout)
-           nimbus_client (.getClient client)]
-       (testing "(Positive authorization) Simple protocol w/o authentication/authorization enforcement"
-                (is (thrown-cause? NotAliveException
-                             (.activate nimbus_client "topo-name"))))
-       (.close client))))
+   (let [port (available-port)]
+     (with-test-cluster [port nil nil "backtype.storm.security.auth.SimpleTransportPlugin"]
+       (let [storm-conf (merge (read-storm-config)
+                               {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
+                                STORM-NIMBUS-RETRY-TIMES 0})
+             client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+             nimbus_client (.getClient client)]
+         (testing "(Positive authorization) Simple protocol w/o authentication/authorization enforcement"
+                  (is (thrown-cause? NotAliveException
+                               (.activate nimbus_client "topo-name"))))
+         (.close client)))))
 -  
 +
  (deftest test-noop-authorization-w-simple-transport
-   (with-test-cluster [6628 nil
-                 "backtype.storm.security.auth.authorizer.NoopAuthorizer"
-                 "backtype.storm.security.auth.SimpleTransportPlugin"]
-     (let [storm-conf (merge (read-storm-config)
-                              {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                               STORM-NIMBUS-RETRY-TIMES 0})
-           client (NimbusClient. storm-conf "localhost" 6628 nimbus-timeout)
-           nimbus_client (.getClient client)]
-       (testing "(Positive authorization) Authorization plugin should accept client request"
-                (is (thrown-cause? NotAliveException
-                             (.activate nimbus_client "topo-name"))))
-       (.close client))))
+   (let [port (available-port)]
+     (with-test-cluster [port nil
+                   "backtype.storm.security.auth.authorizer.NoopAuthorizer"
+                   "backtype.storm.security.auth.SimpleTransportPlugin"]
+       (let [storm-conf (merge (read-storm-config)
+                                {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
+                                 STORM-NIMBUS-RETRY-TIMES 0})
+             client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+             nimbus_client (.getClient client)]
+         (testing "(Positive authorization) Authorization plugin should accept client request"
+                  (is (thrown-cause? NotAliveException
+                               (.activate nimbus_client "topo-name"))))
+         (.close client)))))
  
  (deftest test-deny-authorization-w-simple-transport
-   (with-test-cluster [6629 nil
-                 "backtype.storm.security.auth.authorizer.DenyAuthorizer"
-                 "backtype.storm.security.auth.SimpleTransportPlugin"]
-     (let [storm-conf (merge (read-storm-config)
-                              {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
-                              Config/NIMBUS_THRIFT_PORT 6629
-                              STORM-NIMBUS-RETRY-TIMES 0})
-           client (NimbusClient. storm-conf "localhost" 6629 nimbus-timeout)
-           nimbus_client (.getClient client)
-           topologyInitialStatus (TopologyInitialStatus/findByValue 2)
-           submitOptions (SubmitOptions. topologyInitialStatus)]
-       (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
-       (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
-       (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
+   (let [port (available-port)]
+     (with-test-cluster [port nil
+                   "backtype.storm.security.auth.authorizer.DenyAuthorizer"
+                   "backtype.storm.security.auth.SimpleTransportPlugin"]
+       (let [storm-conf (merge (read-storm-config)
+                                {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.SimpleTransportPlugin"
 -                               Config/NIMBUS_HOST "localhost"
+                                Config/NIMBUS_THRIFT_PORT port
+                                STORM-NIMBUS-RETRY-TIMES 0})
 -            client (NimbusClient/getConfiguredClient storm-conf)
++            client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+             nimbus_client (.getClient client)
+             topologyInitialStatus (TopologyInitialStatus/findByValue 2)
+             submitOptions (SubmitOptions. topologyInitialStatus)]
+         (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
+         (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
+         (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
 +
-       (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
-       (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
-       (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
-       (stubbing [nimbus/check-storm-active! nil
-                  nimbus/try-read-storm-conf-from-name {}]
-         (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
-         (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil)))
-       )
-       (stubbing [nimbus/try-read-storm-conf {}]
-         (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
-       (.close client))))
+         (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
+         (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
+         (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
+         (stubbing [nimbus/check-storm-active! nil
+                    nimbus/try-read-storm-conf-from-name {}]
+           (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
+           (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil)))
+         )
+         (stubbing [nimbus/try-read-storm-conf {}]
+           (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
+         (.close client)))))
  
  (deftest test-noop-authorization-w-sasl-digest
-   (with-test-cluster [6630
-                 "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                 "backtype.storm.security.auth.authorizer.NoopAuthorizer"
-                 "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
-     (let [storm-conf (merge (read-storm-config)
-                             {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
-                              "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                              Config/NIMBUS_THRIFT_PORT 6630
-                              STORM-NIMBUS-RETRY-TIMES 0})
-           client (NimbusClient. storm-conf "localhost" 6630 nimbus-timeout)
-           nimbus_client (.getClient client)]
-       (testing "(Positive authorization) Authorization plugin should accept client request"
-                (is (thrown-cause? NotAliveException
-                             (.activate nimbus_client "topo-name"))))
-       (.close client))))
+   (let [port (available-port)]
+     (with-test-cluster [port
+                   "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                   "backtype.storm.security.auth.authorizer.NoopAuthorizer"
+                   "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
+       (let [storm-conf (merge (read-storm-config)
+                               {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
+                                "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
 -                               Config/NIMBUS_HOST "localhost"
+                                Config/NIMBUS_THRIFT_PORT port
+                                STORM-NIMBUS-RETRY-TIMES 0})
 -            client (NimbusClient/getConfiguredClient storm-conf)
++            client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+             nimbus_client (.getClient client)]
+         (testing "(Positive authorization) Authorization plugin should accept client request"
+                  (is (thrown-cause? NotAliveException
+                               (.activate nimbus_client "topo-name"))))
+         (.close client)))))
  
  (deftest test-deny-authorization-w-sasl-digest
-   (with-test-cluster [6631
-                 "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                 "backtype.storm.security.auth.authorizer.DenyAuthorizer"
-                 "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
-     (let [storm-conf (merge (read-storm-config)
-                             {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
-                              "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
-                              Config/NIMBUS_THRIFT_PORT 6631
-                              STORM-NIMBUS-RETRY-TIMES 0})
-           client (NimbusClient. storm-conf "localhost" 6631 nimbus-timeout)
-           nimbus_client (.getClient client)
-           topologyInitialStatus (TopologyInitialStatus/findByValue 2)
-           submitOptions (SubmitOptions. topologyInitialStatus)]
-       (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
-       (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
-       (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
-       (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
-       (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
-       (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
-       (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
-       (stubbing [nimbus/check-storm-active! nil
-                  nimbus/try-read-storm-conf-from-name {}]
-         (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
-         (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
-         (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil))))
-       (stubbing [nimbus/try-read-storm-conf {}]
-         (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
-         (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
-       (.close client))))
+   (let [port (available-port)]
+     (with-test-cluster [port
+                   "test/clj/backtype/storm/security/auth/jaas_digest.conf"
+                   "backtype.storm.security.auth.authorizer.DenyAuthorizer"
+                   "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"]
+       (let [storm-conf (merge (read-storm-config)
+                               {STORM-THRIFT-TRANSPORT-PLUGIN "backtype.storm.security.auth.digest.DigestSaslTransportPlugin"
+                                "java.security.auth.login.config" "test/clj/backtype/storm/security/auth/jaas_digest.conf"
 -                               Config/NIMBUS_HOST "localhost"
+                                Config/NIMBUS_THRIFT_PORT port
+                                STORM-NIMBUS-RETRY-TIMES 0})
 -            client (NimbusClient/getConfiguredClient storm-conf)
++            client (NimbusClient. storm-conf "localhost" port nimbus-timeout)
+             nimbus_client (.getClient client)
+             topologyInitialStatus (TopologyInitialStatus/findByValue 2)
+             submitOptions (SubmitOptions. topologyInitialStatus)]
+         (is (thrown-cause? AuthorizationException (.submitTopology nimbus_client  "topo-name" nil nil nil)))
+         (is (thrown-cause? AuthorizationException (.submitTopologyWithOpts nimbus_client  "topo-name" nil nil nil submitOptions)))
+         (is (thrown-cause? AuthorizationException (.beginFileUpload nimbus_client)))
+         (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil)))
+         (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil)))
+         (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client)))
+         (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client)))
+         (stubbing [nimbus/check-storm-active! nil
+                    nimbus/try-read-storm-conf-from-name {}]
+           (is (thrown-cause? AuthorizationException (.killTopology nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.killTopologyWithOpts nimbus_client "topo-name" (KillOptions.))))
+           (is (thrown-cause? AuthorizationException (.activate nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.deactivate nimbus_client "topo-name")))
+           (is (thrown-cause? AuthorizationException (.rebalance nimbus_client "topo-name" nil))))
+         (stubbing [nimbus/try-read-storm-conf {}]
+           (is (thrown-cause? AuthorizationException (.getTopologyConf nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getTopology nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getUserTopology nimbus_client "topo-ID")))
+           (is (thrown-cause? AuthorizationException (.getTopologyInfo nimbus_client "topo-ID"))))
+         (.close client)))))
  


[18/45] storm git commit: Merge branch 'STORM-723' of https://github.com/HeartSaVioR/storm into STORM-723

Posted by pa...@apache.org.
Merge branch 'STORM-723' of https://github.com/HeartSaVioR/storm into STORM-723

STORM-723: Remove RedisStateSetUpdater / RedisStateSetCountQuerier which didn't tested and have a bug


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

Branch: refs/heads/nimbus-ha-branch
Commit: 13f6e9bca350f2626ab962b4927ae6df8324175e
Parents: a8a0dfd c75de7e
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Thu Mar 26 09:28:06 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Thu Mar 26 09:28:06 2015 -0500

----------------------------------------------------------------------
 .../state/RedisStateSetCountQuerier.java        | 74 ------------------
 .../trident/state/RedisStateSetUpdater.java     | 80 --------------------
 2 files changed, 154 deletions(-)
----------------------------------------------------------------------



[43/45] storm git commit: Merge branch 'storm-kafka-metrics-with-topic' of https://github.com/chawco/storm into STORM-713

Posted by pa...@apache.org.
Merge branch 'storm-kafka-metrics-with-topic' of https://github.com/chawco/storm into STORM-713


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

Branch: refs/heads/nimbus-ha-branch
Commit: 55c3f22ddacec13273596dbe9618818a33166b36
Parents: 20084ba 1e3bf8c
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 21:05:49 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 21:05:49 2015 -0700

----------------------------------------------------------------------
 .../storm-kafka/src/jvm/storm/kafka/KafkaUtils.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[35/45] storm git commit: STORM-615. Add REST API to upload topology.

Posted by pa...@apache.org.
STORM-615. Add REST API to upload topology.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 002bf003f6b014c1a4f8b83de0a21165691f138b
Parents: 1945f70
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Tue Mar 31 17:24:47 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Tue Mar 31 17:24:47 2015 -0700

----------------------------------------------------------------------
 STORM-UI-REST-API.md | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/002bf003/STORM-UI-REST-API.md
----------------------------------------------------------------------
diff --git a/STORM-UI-REST-API.md b/STORM-UI-REST-API.md
index cdbf05e..808344b 100644
--- a/STORM-UI-REST-API.md
+++ b/STORM-UI-REST-API.md
@@ -620,7 +620,6 @@ error response:
 
 uploads a topology.
 
-Caution: This api doesn't work in security mode.
 
 |Parameter |Value   |Description  |
 |----------|--------|-------------|


[38/45] storm git commit: Added STORM-741 to CHANGELOG.

Posted by pa...@apache.org.
Added STORM-741 to CHANGELOG.


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

Branch: refs/heads/nimbus-ha-branch
Commit: db6df0cafaada08c79679b828721336263341c6c
Parents: 003f08d
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:24:15 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:24:15 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/db6df0ca/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0de063..a81810e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-741: Allow users to pass a config value to perform impersonation.
  * STORM-724: Document RedisStoreBolt and RedisLookupBolt which is missed.
  * STORM-711: All connectors should use collector.reportError and tuple anchoring.
  * STORM-714: Make CSS more consistent with self, prev release


[13/45] storm git commit: Merge branch 'STORM-691' of https://github.com/HeartSaVioR/storm into STORM-691

Posted by pa...@apache.org.
Merge branch 'STORM-691' of https://github.com/HeartSaVioR/storm into STORM-691

STORM-691: Add basic lookup / persist bolts


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

Branch: refs/heads/nimbus-ha-branch
Commit: cea3faa84464e543131d330ed3ea1522129eb791
Parents: 549b01a 62b5a7e
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Mar 24 09:44:29 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Mar 24 09:44:29 2015 -0500

----------------------------------------------------------------------
 .../storm/redis/bolt/AbstractRedisBolt.java     |   8 +-
 .../storm/redis/bolt/RedisLookupBolt.java       | 112 ++++++++++++++++++
 .../apache/storm/redis/bolt/RedisStoreBolt.java | 100 ++++++++++++++++
 .../redis/common/config/JedisClusterConfig.java |  82 +++++++++++++
 .../redis/common/config/JedisPoolConfig.java    |  97 ++++++++++++++++
 .../common/container/JedisClusterContainer.java |  47 ++++++++
 .../JedisCommandsContainerBuilder.java          |  38 ++++++
 .../JedisCommandsInstanceContainer.java         |  25 ++++
 .../redis/common/container/JedisContainer.java  |  65 +++++++++++
 .../common/mapper/RedisDataTypeDescription.java |  50 ++++++++
 .../redis/common/mapper/RedisLookupMapper.java  |  40 +++++++
 .../storm/redis/common/mapper/RedisMapper.java  |  22 ++++
 .../redis/common/mapper/RedisStoreMapper.java   |  21 ++++
 .../storm/redis/common/mapper/TupleMapper.java  |  27 +++++
 .../trident/mapper/TridentTupleMapper.java      |  27 -----
 .../trident/state/RedisClusterMapState.java     |   2 +-
 .../redis/trident/state/RedisClusterState.java  |   2 +-
 .../trident/state/RedisClusterStateQuerier.java |  10 +-
 .../trident/state/RedisClusterStateUpdater.java |  10 +-
 .../redis/trident/state/RedisMapState.java      |   2 +-
 .../storm/redis/trident/state/RedisState.java   |   2 +-
 .../redis/trident/state/RedisStateQuerier.java  |  10 +-
 .../state/RedisStateSetCountQuerier.java        |  10 +-
 .../trident/state/RedisStateSetUpdater.java     |  10 +-
 .../redis/trident/state/RedisStateUpdater.java  |  10 +-
 .../redis/util/config/JedisClusterConfig.java   |  82 -------------
 .../redis/util/config/JedisPoolConfig.java      |  97 ----------------
 .../util/container/JedisClusterContainer.java   |  47 --------
 .../JedisCommandsContainerBuilder.java          |  38 ------
 .../JedisCommandsInstanceContainer.java         |  25 ----
 .../redis/util/container/JedisContainer.java    |  65 -----------
 .../storm/redis/topology/LookupWordCount.java   | 115 +++++++++++++------
 .../redis/topology/PersistentWordCount.java     |  46 +++++++-
 .../storm/redis/topology/WordCounter.java       |  19 ++-
 .../redis/trident/WordCountTridentRedis.java    |   7 +-
 .../trident/WordCountTridentRedisCluster.java   |   6 +-
 .../WordCountTridentRedisClusterMap.java        |   8 +-
 .../redis/trident/WordCountTridentRedisMap.java |   9 +-
 .../redis/trident/WordCountTupleMapper.java     |  10 +-
 39 files changed, 912 insertions(+), 491 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/cea3faa8/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/cea3faa8/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java
----------------------------------------------------------------------


[44/45] storm git commit: Added STORM-713 to CHANGELOG.

Posted by pa...@apache.org.
Added STORM-713 to CHANGELOG.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 2aaa718094af0d0e931eb3a7a66251268d64896b
Parents: 55c3f22
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 21:06:25 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 21:06:25 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/2aaa7180/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb1e4e6..0656691 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-713: Include topic information with Kafka metrics.
  * STORM-708: CORS support for STORM UI.
  * STORM-615: Add REST API to upload topology.
  * STORM-741: Allow users to pass a config value to perform impersonation.


[22/45] storm git commit: Adding STORM-714 to CHANGELOG.md

Posted by pa...@apache.org.
Adding STORM-714 to CHANGELOG.md


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

Branch: refs/heads/nimbus-ha-branch
Commit: 330e1356d25073f09faa815e422a1ecd95786faf
Parents: c207f92
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Thu Mar 26 16:42:42 2015 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Thu Mar 26 16:42:42 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/330e1356/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 620c9ea..852e2cf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-714: Make CSS more consistent with self, prev release
  * STORM-703: With hash key option for RedisMapState, only get values for keys in batch
  * STORM-691: Add basic lookup / persist bolts
 


[40/45] storm git commit: Added STORM-615 to CHANGELOG.

Posted by pa...@apache.org.
Added STORM-615 to CHANGELOG.


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

Branch: refs/heads/nimbus-ha-branch
Commit: cd62063206e4f888f35510a792cdbdf18582e533
Parents: 7b1f3f6
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:37:14 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:37:14 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/cd620632/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a81810e..d11d5a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM:615: Add REST API to upload topology.
  * STORM-741: Allow users to pass a config value to perform impersonation.
  * STORM-724: Document RedisStoreBolt and RedisLookupBolt which is missed.
  * STORM-711: All connectors should use collector.reportError and tuple anchoring.


[33/45] storm git commit: Adding Parth Brahmbhatt to list of committers.

Posted by pa...@apache.org.
Adding Parth Brahmbhatt to list of committers.


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

Branch: refs/heads/nimbus-ha-branch
Commit: bc530b46bdd7c7995ebd7dd6d9fe41dcb2d8cea7
Parents: 36e99fa
Author: Parth Brahmbhatt <br...@gmail.com>
Authored: Tue Mar 31 09:00:53 2015 -0700
Committer: Parth Brahmbhatt <br...@gmail.com>
Committed: Tue Mar 31 09:00:53 2015 -0700

----------------------------------------------------------------------
 README.markdown | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/bc530b46/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 17849b7..8a06329 100644
--- a/README.markdown
+++ b/README.markdown
@@ -81,6 +81,7 @@ under the License.
 * Sriharsha Chintalapani([@harshach](https://github.com/harshach))
 * Sean Zhong ([@clockfly] (http://github.com/clockfly))
 * Kyle Nusbaum ([@knusbaum](https://github.com/knusbaum))
+* Parth Brahmbhatt ([@Parth-Brahmbhatt](https://github.com/Parth-Brahmbhatt))
 
 ## Contributors
 


[03/45] storm git commit: Add missing Apache license header

Posted by pa...@apache.org.
Add missing Apache license header


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

Branch: refs/heads/nimbus-ha-branch
Commit: b129080f4b578870b03a8d5788b418c2259a4805
Parents: f7c0bf8
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Sat Feb 28 22:45:33 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Sat Feb 28 22:45:33 2015 +0900

----------------------------------------------------------------------
 .../common/mapper/RedisDataTypeDescription.java    | 17 +++++++++++++++++
 .../storm/redis/common/mapper/RedisMapper.java     | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b129080f/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
index d2a4af2..ba981d0 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
@@ -1,3 +1,20 @@
+/**
+ * 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 org.apache.storm.redis.common.mapper;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/storm/blob/b129080f/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
index d19acaa..416ce5f 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
@@ -1,3 +1,20 @@
+/**
+ * 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 org.apache.storm.redis.common.mapper;
 
 public interface RedisMapper {


[06/45] storm git commit: STORM-708. CORS support for STORM UI.

Posted by pa...@apache.org.
STORM-708. CORS support for STORM UI.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 0201a90aec9a73c75ec7bed640ddf70efb1874d8
Parents: 3d48f42
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Mon Mar 16 15:33:31 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Mon Mar 16 15:33:31 2015 -0700

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/ui/helpers.clj | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/0201a90a/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index 925b9dc..562a407 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -26,7 +26,8 @@
   (:import [org.eclipse.jetty.server Server]
            [org.eclipse.jetty.server.nio SelectChannelConnector]
            [org.eclipse.jetty.server.ssl SslSocketConnector]
-           [org.eclipse.jetty.servlet ServletHolder FilterMapping])
+           [org.eclipse.jetty.servlet ServletHolder FilterMapping]
+           [org.eclipse.jetty.servlets CrossOriginFilter])
   (:require [ring.util servlet])
   (:require [compojure.route :as route]
             [compojure.handler :as handler]))
@@ -168,12 +169,20 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
   (when (> port 0)
     (.addConnector server (mk-ssl-connector port ks-path ks-password ks-type))))
 
+(defn cors-filter-handler
+  []
+  (doto (org.eclipse.jetty.servlet.FilterHolder. (CrossOriginFilter.))
+    (.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
+    (.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
+    (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "*")))
+
 (defn config-filter [server handler filters-confs]
   (if filters-confs
     (let [servlet-holder (ServletHolder.
                            (ring.util.servlet/servlet handler))
           context (doto (org.eclipse.jetty.servlet.ServletContextHandler. server "/")
                     (.addServlet servlet-holder "/"))]
+      (.addFilter context (cors-filter-handler) "/*" FilterMapping/ALL)
       (doseq [{:keys [filter-name filter-class filter-params]} filters-confs]
         (if filter-class
           (let [filter-holder (doto (org.eclipse.jetty.servlet.FilterHolder.)


[37/45] storm git commit: Merge branch 'STORM-741' of https://github.com/Parth-Brahmbhatt/incubator-storm into STORM-741

Posted by pa...@apache.org.
Merge branch 'STORM-741' of https://github.com/Parth-Brahmbhatt/incubator-storm into STORM-741


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

Branch: refs/heads/nimbus-ha-branch
Commit: 003f08d2d0d224c68d620ded35ae2bebc8cfa810
Parents: bc530b4 bb968c8
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:23:37 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:23:37 2015 -0700

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/Config.java             | 6 ++++++
 storm-core/src/jvm/backtype/storm/utils/NimbusClient.java | 7 +++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------



[14/45] storm git commit: Added STORM-691 to changelog

Posted by pa...@apache.org.
Added STORM-691 to changelog


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

Branch: refs/heads/nimbus-ha-branch
Commit: a8a0dfdbf930886dbaa920698228376b3a0f31a4
Parents: cea3faa
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Tue Mar 24 09:53:06 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Tue Mar 24 09:53:06 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/a8a0dfdb/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 969906e..ed87cb5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
 ## 0.11.0
  * STORM-703: With hash key option for RedisMapState, only get values for keys in batch
+ * STORM-691: Add basic lookup / persist bolts
 
 ## 0.10.0
  * STORM-681: Auto insert license header with genthrift.sh


[30/45] storm git commit: Merge branch 'STORM-731' of https://github.com/harshach/incubator-storm into STORM-731-V2

Posted by pa...@apache.org.
Merge branch 'STORM-731' of https://github.com/harshach/incubator-storm into STORM-731-V2


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

Branch: refs/heads/nimbus-ha-branch
Commit: d063a1ac38a66c8aa5aa9107e45233f9be053020
Parents: 0d5d4b1 011debe
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Mar 29 22:35:00 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Mar 29 22:35:00 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/storm/hbase/trident/state/HBaseMapState.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------



[32/45] storm git commit: Update CHANGELOG for STORM-727

Posted by pa...@apache.org.
Update CHANGELOG for STORM-727


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

Branch: refs/heads/nimbus-ha-branch
Commit: 36e99fa2dfdd13cd43d8fa8c558c670cd7750ed0
Parents: 480b63a
Author: Derek Dagit <de...@yahoo-inc.com>
Authored: Mon Mar 30 09:51:28 2015 -0500
Committer: Derek Dagit <de...@yahoo-inc.com>
Committed: Mon Mar 30 09:51:28 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/storm/blob/36e99fa2/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc2b5dc..c0de063 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
  * STORM-714: Make CSS more consistent with self, prev release
  * STORM-703: With hash key option for RedisMapState, only get values for keys in batch
  * STORM-691: Add basic lookup / persist bolts
+ * STORM-727: Storm tests should succeed even if a storm process is running locally.
 
 ## 0.10.0
  * STORM-681: Auto insert license header with genthrift.sh


[08/45] storm git commit: STORM-713: Include topic information with Kafka metrics.

Posted by pa...@apache.org.
STORM-713: Include topic information with Kafka metrics.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 1e3bf8c09cb1be6b60ca57fce2b6d859a57e173a
Parents: bb8d48d
Author: Craig Hawco <cr...@upsight.com>
Authored: Thu Mar 19 11:35:59 2015 -0400
Committer: Craig Hawco <cr...@upsight.com>
Committed: Thu Mar 19 14:02:26 2015 -0400

----------------------------------------------------------------------
 .../storm-kafka/src/jvm/storm/kafka/KafkaUtils.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/1e3bf8c0/external/storm-kafka/src/jvm/storm/kafka/KafkaUtils.java
----------------------------------------------------------------------
diff --git a/external/storm-kafka/src/jvm/storm/kafka/KafkaUtils.java b/external/storm-kafka/src/jvm/storm/kafka/KafkaUtils.java
index 137dc99..50241f7 100644
--- a/external/storm-kafka/src/jvm/storm/kafka/KafkaUtils.java
+++ b/external/storm-kafka/src/jvm/storm/kafka/KafkaUtils.java
@@ -121,19 +121,19 @@ public class KafkaUtils {
                         }
                         long latestEmittedOffset = e.getValue();
                         long spoutLag = latestTimeOffset - latestEmittedOffset;
-                        ret.put(partition.getId() + "/" + "spoutLag", spoutLag);
-                        ret.put(partition.getId() + "/" + "earliestTimeOffset", earliestTimeOffset);
-                        ret.put(partition.getId() + "/" + "latestTimeOffset", latestTimeOffset);
-                        ret.put(partition.getId() + "/" + "latestEmittedOffset", latestEmittedOffset);
+                        ret.put(_topic + "/" + partition.getId() + "/" + "spoutLag", spoutLag);
+                        ret.put(_topic + "/" + partition.getId() + "/" + "earliestTimeOffset", earliestTimeOffset);
+                        ret.put(_topic + "/" + partition.getId() + "/" + "latestTimeOffset", latestTimeOffset);
+                        ret.put(_topic + "/" + partition.getId() + "/" + "latestEmittedOffset", latestEmittedOffset);
                         totalSpoutLag += spoutLag;
                         totalEarliestTimeOffset += earliestTimeOffset;
                         totalLatestTimeOffset += latestTimeOffset;
                         totalLatestEmittedOffset += latestEmittedOffset;
                     }
-                    ret.put("totalSpoutLag", totalSpoutLag);
-                    ret.put("totalEarliestTimeOffset", totalEarliestTimeOffset);
-                    ret.put("totalLatestTimeOffset", totalLatestTimeOffset);
-                    ret.put("totalLatestEmittedOffset", totalLatestEmittedOffset);
+                    ret.put(_topic + "/" + "totalSpoutLag", totalSpoutLag);
+                    ret.put(_topic + "/" + "totalEarliestTimeOffset", totalEarliestTimeOffset);
+                    ret.put(_topic + "/" + "totalLatestTimeOffset", totalLatestTimeOffset);
+                    ret.put(_topic + "/" + "totalLatestEmittedOffset", totalLatestEmittedOffset);
                     return ret;
                 } else {
                     LOG.info("Metrics Tick: Not enough data to calculate spout lag.");


[28/45] storm git commit: Merge branch 'STORM-724' of https://github.com/HeartSaVioR/storm into STORM-724

Posted by pa...@apache.org.
Merge branch 'STORM-724' of https://github.com/HeartSaVioR/storm into STORM-724


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

Branch: refs/heads/nimbus-ha-branch
Commit: c8d31271a0c8a96749499e402d3c2cfeae63de9f
Parents: bb38f17 4b9b976
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Mar 29 22:01:38 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Mar 29 22:01:38 2015 -0700

----------------------------------------------------------------------
 external/storm-redis/README.md                  | 108 ++++++++++++++++++-
 .../redis/topology/PersistentWordCount.java     |  35 ------
 2 files changed, 106 insertions(+), 37 deletions(-)
----------------------------------------------------------------------



[29/45] storm git commit: Added STORM-724 to CHANGELOG.

Posted by pa...@apache.org.
Added STORM-724 to CHANGELOG.


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

Branch: refs/heads/nimbus-ha-branch
Commit: 0d5d4b129e34efa6f52d8c5f5fd92ca23e3fcb6a
Parents: c8d3127
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Sun Mar 29 22:10:01 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Sun Mar 29 22:10:01 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/storm/blob/0d5d4b12/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af9627f..cc2b5dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## 0.11.0
+ * STORM-724: Document RedisStoreBolt and RedisLookupBolt which is missed.
  * STORM-711: All connectors should use collector.reportError and tuple anchoring.
  * STORM-714: Make CSS more consistent with self, prev release
  * STORM-703: With hash key option for RedisMapState, only get values for keys in batch


[02/45] storm git commit: STORM-691 Add basic lookup / persist bolts

Posted by pa...@apache.org.
STORM-691 Add basic lookup / persist bolts

* Add Basic lookup / persist Bolts
** support data types : string, list, hash, set, sorted set, hyperloglog
* rename util package to common


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

Branch: refs/heads/nimbus-ha-branch
Commit: f7c0bf8a7c843c6e555ee982a85e3952d1c28b33
Parents: 64d7ac6
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Sat Feb 28 22:29:32 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Sat Feb 28 22:29:32 2015 +0900

----------------------------------------------------------------------
 .../storm/redis/bolt/AbstractRedisBolt.java     |   8 +-
 .../storm/redis/bolt/RedisLookupBolt.java       | 109 ++++++++++++++++++
 .../apache/storm/redis/bolt/RedisStoreBolt.java |  97 ++++++++++++++++
 .../redis/common/config/JedisClusterConfig.java |  82 +++++++++++++
 .../redis/common/config/JedisPoolConfig.java    |  97 ++++++++++++++++
 .../common/container/JedisClusterContainer.java |  47 ++++++++
 .../JedisCommandsContainerBuilder.java          |  38 ++++++
 .../JedisCommandsInstanceContainer.java         |  25 ++++
 .../redis/common/container/JedisContainer.java  |  65 +++++++++++
 .../common/mapper/RedisDataTypeDescription.java |  33 ++++++
 .../redis/common/mapper/RedisLookupMapper.java  |  40 +++++++
 .../storm/redis/common/mapper/RedisMapper.java  |   5 +
 .../redis/common/mapper/RedisStoreMapper.java   |  21 ++++
 .../storm/redis/common/mapper/TupleMapper.java  |  27 +++++
 .../trident/mapper/TridentTupleMapper.java      |  27 -----
 .../trident/state/RedisClusterMapState.java     |   2 +-
 .../redis/trident/state/RedisClusterState.java  |   2 +-
 .../trident/state/RedisClusterStateQuerier.java |  10 +-
 .../trident/state/RedisClusterStateUpdater.java |  10 +-
 .../redis/trident/state/RedisMapState.java      |   2 +-
 .../storm/redis/trident/state/RedisState.java   |   2 +-
 .../redis/trident/state/RedisStateQuerier.java  |  10 +-
 .../state/RedisStateSetCountQuerier.java        |  10 +-
 .../trident/state/RedisStateSetUpdater.java     |  10 +-
 .../redis/trident/state/RedisStateUpdater.java  |  10 +-
 .../redis/util/config/JedisClusterConfig.java   |  82 -------------
 .../redis/util/config/JedisPoolConfig.java      |  97 ----------------
 .../util/container/JedisClusterContainer.java   |  47 --------
 .../JedisCommandsContainerBuilder.java          |  38 ------
 .../JedisCommandsInstanceContainer.java         |  25 ----
 .../redis/util/container/JedisContainer.java    |  65 -----------
 .../storm/redis/topology/LookupWordCount.java   | 115 +++++++++++++------
 .../redis/topology/PersistentWordCount.java     |  46 +++++++-
 .../storm/redis/topology/WordCounter.java       |  19 ++-
 .../redis/trident/WordCountTridentRedis.java    |   7 +-
 .../trident/WordCountTridentRedisCluster.java   |   6 +-
 .../WordCountTridentRedisClusterMap.java        |   8 +-
 .../redis/trident/WordCountTridentRedisMap.java |   9 +-
 .../redis/trident/WordCountTupleMapper.java     |  10 +-
 39 files changed, 872 insertions(+), 491 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/AbstractRedisBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/AbstractRedisBolt.java b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/AbstractRedisBolt.java
index 0b2a7f3..158fcaa 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/AbstractRedisBolt.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/AbstractRedisBolt.java
@@ -20,10 +20,10 @@ package org.apache.storm.redis.bolt;
 import backtype.storm.task.OutputCollector;
 import backtype.storm.task.TopologyContext;
 import backtype.storm.topology.base.BaseRichBolt;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
-import org.apache.storm.redis.util.container.JedisCommandsContainerBuilder;
-import org.apache.storm.redis.util.container.JedisCommandsInstanceContainer;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import org.apache.storm.redis.common.container.JedisCommandsContainerBuilder;
+import org.apache.storm.redis.common.container.JedisCommandsInstanceContainer;
 import redis.clients.jedis.JedisCommands;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
new file mode 100644
index 0000000..c40e983
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisLookupBolt.java
@@ -0,0 +1,109 @@
+/**
+ * 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 org.apache.storm.redis.bolt;
+
+import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.tuple.Tuple;
+import backtype.storm.tuple.Values;
+import org.apache.storm.redis.common.mapper.RedisDataTypeDescription;
+import org.apache.storm.redis.common.mapper.RedisLookupMapper;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import redis.clients.jedis.JedisCommands;
+
+import java.util.List;
+
+public class RedisLookupBolt extends AbstractRedisBolt {
+    private final RedisLookupMapper lookupMapper;
+    private final RedisDataTypeDescription.RedisDataType dataType;
+    private final String additionalKey;
+
+    public RedisLookupBolt(JedisPoolConfig config, RedisLookupMapper lookupMapper) {
+        super(config);
+
+        this.lookupMapper = lookupMapper;
+
+        RedisDataTypeDescription dataTypeDescription = lookupMapper.getDataTypeDescription();
+        this.dataType = dataTypeDescription.getDataType();
+        this.additionalKey = dataTypeDescription.getAdditionalKey();
+    }
+
+    public RedisLookupBolt(JedisClusterConfig config, RedisLookupMapper lookupMapper) {
+        super(config);
+
+        this.lookupMapper = lookupMapper;
+
+        RedisDataTypeDescription dataTypeDescription = lookupMapper.getDataTypeDescription();
+        this.dataType = dataTypeDescription.getDataType();
+        this.additionalKey = dataTypeDescription.getAdditionalKey();
+    }
+
+    @Override
+    public void execute(Tuple input) {
+        String key = lookupMapper.getKeyFromTuple(input);
+        Object lookupValue = null;
+
+        JedisCommands jedisCommand = null;
+        try {
+            jedisCommand = getInstance();
+
+            switch (dataType) {
+                case STRING:
+                    lookupValue = jedisCommand.get(key);
+                    break;
+
+                case LIST:
+                    lookupValue = jedisCommand.lpop(key);
+                    break;
+
+                case HASH:
+                    lookupValue = jedisCommand.hget(additionalKey, key);
+                    break;
+
+                case SET:
+                    lookupValue = jedisCommand.scard(key);
+                    break;
+
+                case SORTED_SET:
+                    lookupValue = jedisCommand.zscore(additionalKey, key);
+                    break;
+
+                case HYPER_LOG_LOG:
+                    lookupValue = jedisCommand.pfcount(key);
+                    break;
+            }
+
+            List<Values> values = lookupMapper.toTuple(input, lookupValue);
+            for (Values value : values) {
+                collector.emit(input, value);
+            }
+
+            collector.ack(input);
+        } catch (Exception e) {
+            this.collector.reportError(e);
+            this.collector.fail(input);
+        } finally {
+            returnInstance(jedisCommand);
+        }
+    }
+
+    @Override
+    public void declareOutputFields(OutputFieldsDeclarer declarer) {
+        lookupMapper.declareOutputFields(declarer);
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
new file mode 100644
index 0000000..5602c44
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisStoreBolt.java
@@ -0,0 +1,97 @@
+/**
+ * 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 org.apache.storm.redis.bolt;
+
+import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.tuple.Tuple;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import org.apache.storm.redis.common.mapper.RedisDataTypeDescription;
+import org.apache.storm.redis.common.mapper.RedisStoreMapper;
+import redis.clients.jedis.JedisCommands;
+
+public class RedisStoreBolt extends AbstractRedisBolt {
+    private final RedisStoreMapper storeMapper;
+    private final RedisDataTypeDescription.RedisDataType dataType;
+    private final String additionalKey;
+
+    public RedisStoreBolt(JedisPoolConfig config, RedisStoreMapper storeMapper) {
+        super(config);
+        this.storeMapper = storeMapper;
+
+        RedisDataTypeDescription dataTypeDescription = storeMapper.getDataTypeDescription();
+        this.dataType = dataTypeDescription.getDataType();
+        this.additionalKey = dataTypeDescription.getAdditionalKey();
+    }
+
+    public RedisStoreBolt(JedisClusterConfig config, RedisStoreMapper storeMapper) {
+        super(config);
+        this.storeMapper = storeMapper;
+
+        RedisDataTypeDescription dataTypeDescription = storeMapper.getDataTypeDescription();
+        this.dataType = dataTypeDescription.getDataType();
+        this.additionalKey = dataTypeDescription.getAdditionalKey();
+    }
+
+    @Override
+    public void execute(Tuple input) {
+        String key = storeMapper.getKeyFromTuple(input);
+        String value = storeMapper.getValueFromTuple(input);
+
+        JedisCommands jedisCommand = null;
+        try {
+            jedisCommand = getInstance();
+
+            switch (dataType) {
+                case STRING:
+                    jedisCommand.set(key, value);
+                    break;
+
+                case LIST:
+                    jedisCommand.rpush(key, value);
+                    break;
+
+                case HASH:
+                    jedisCommand.hset(additionalKey, key, value);
+                    break;
+
+                case SET:
+                    jedisCommand.sadd(key, value);
+                    break;
+
+                case SORTED_SET:
+                    jedisCommand.zadd(additionalKey, Double.valueOf(value), key);
+
+                case HYPER_LOG_LOG:
+                    jedisCommand.pfadd(key, value);
+                    break;
+            }
+
+            collector.ack(input);
+        } catch (Exception e) {
+            this.collector.reportError(e);
+            this.collector.fail(input);
+        } finally {
+            returnInstance(jedisCommand);
+        }
+    }
+
+    @Override
+    public void declareOutputFields(OutputFieldsDeclarer declarer) {
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisClusterConfig.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisClusterConfig.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisClusterConfig.java
new file mode 100644
index 0000000..a13eced
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisClusterConfig.java
@@ -0,0 +1,82 @@
+/**
+ * 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 org.apache.storm.redis.common.config;
+
+import com.google.common.base.Preconditions;
+import redis.clients.jedis.HostAndPort;
+import redis.clients.jedis.Protocol;
+
+import java.io.Serializable;
+import java.net.InetSocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+public class JedisClusterConfig implements Serializable {
+    private Set<InetSocketAddress> nodes;
+    private int timeout;
+    private int maxRedirections;
+
+    public JedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections) {
+        this.nodes = nodes;
+        this.timeout = timeout;
+        this.maxRedirections = maxRedirections;
+    }
+
+    public Set<HostAndPort> getNodes() {
+        Set<HostAndPort> ret = new HashSet<HostAndPort>();
+        for (InetSocketAddress node : nodes) {
+            ret.add(new HostAndPort(node.getHostName(), node.getPort()));
+        }
+        return ret;
+    }
+
+    public int getTimeout() {
+        return timeout;
+    }
+
+    public int getMaxRedirections() {
+        return maxRedirections;
+    }
+
+    public static class Builder {
+        private Set<InetSocketAddress> nodes;
+        private int timeout = Protocol.DEFAULT_TIMEOUT;
+        private int maxRedirections = 5;
+
+        public Builder setNodes(Set<InetSocketAddress> nodes) {
+            this.nodes = nodes;
+            return this;
+        }
+
+        public Builder setTimeout(int timeout) {
+            this.timeout = timeout;
+            return this;
+        }
+
+        public Builder setMaxRedirections(int maxRedirections) {
+            this.maxRedirections = maxRedirections;
+            return this;
+        }
+
+        public JedisClusterConfig build() {
+            Preconditions.checkNotNull(this.nodes, "Node information should be presented");
+
+            return new JedisClusterConfig(nodes, timeout, maxRedirections);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisPoolConfig.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisPoolConfig.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisPoolConfig.java
new file mode 100644
index 0000000..cc5f6e4
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/config/JedisPoolConfig.java
@@ -0,0 +1,97 @@
+/**
+ * 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 org.apache.storm.redis.common.config;
+
+import redis.clients.jedis.Protocol;
+
+import java.io.Serializable;
+
+public class JedisPoolConfig implements Serializable {
+    public static final String DEFAULT_HOST = "127.0.0.1";
+
+    private String host;
+    private int port;
+    private int timeout;
+    private int database;
+    private String password;
+
+    public JedisPoolConfig(String host, int port, int timeout, String password, int database) {
+        this.host = host;
+        this.port = port;
+        this.timeout = timeout;
+        this.database = database;
+        this.password = password;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public int getTimeout() {
+        return timeout;
+    }
+
+    public int getDatabase() {
+        return database;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public static class Builder {
+        private String host = DEFAULT_HOST;
+        private int port = Protocol.DEFAULT_PORT;
+        private int timeout = Protocol.DEFAULT_TIMEOUT;
+        private int database = Protocol.DEFAULT_DATABASE;
+        private String password;
+
+        public Builder setHost(String host) {
+            this.host = host;
+            return this;
+        }
+
+        public Builder setPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        public Builder setTimeout(int timeout) {
+            this.timeout = timeout;
+            return this;
+        }
+
+        public Builder setDatabase(int database) {
+            this.database = database;
+            return this;
+        }
+
+        public Builder setPassword(String password) {
+            this.password = password;
+            return this;
+        }
+
+        public JedisPoolConfig build() {
+            return new JedisPoolConfig(host, port, timeout, password, database);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisClusterContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisClusterContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisClusterContainer.java
new file mode 100644
index 0000000..a1ff19f
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisClusterContainer.java
@@ -0,0 +1,47 @@
+/**
+ * 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 org.apache.storm.redis.common.container;
+
+import redis.clients.jedis.JedisCluster;
+import redis.clients.jedis.JedisCommands;
+
+import java.io.Closeable;
+
+public class JedisClusterContainer implements JedisCommandsInstanceContainer, Closeable {
+
+    private JedisCluster jedisCluster;
+
+    public JedisClusterContainer(JedisCluster jedisCluster) {
+        this.jedisCluster = jedisCluster;
+    }
+
+    @Override
+    public JedisCommands getInstance() {
+        return this.jedisCluster;
+    }
+
+    @Override
+    public void returnInstance(JedisCommands jedisCommands) {
+        // do nothing
+    }
+
+    @Override
+    public void close() {
+        this.jedisCluster.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsContainerBuilder.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsContainerBuilder.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsContainerBuilder.java
new file mode 100644
index 0000000..a2f8c2e
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsContainerBuilder.java
@@ -0,0 +1,38 @@
+/**
+ * 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 org.apache.storm.redis.common.container;
+
+import org.apache.storm.redis.common.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import redis.clients.jedis.JedisCluster;
+import redis.clients.jedis.JedisPool;
+
+public class JedisCommandsContainerBuilder {
+
+    public static final redis.clients.jedis.JedisPoolConfig DEFAULT_POOL_CONFIG = new redis.clients.jedis.JedisPoolConfig();
+
+    public static JedisCommandsInstanceContainer build(JedisPoolConfig config) {
+        JedisPool jedisPool = new JedisPool(DEFAULT_POOL_CONFIG, config.getHost(), config.getPort(), config.getTimeout(), config.getPassword(), config.getDatabase());
+        return new JedisContainer(jedisPool);
+    }
+
+    public static JedisCommandsInstanceContainer build(JedisClusterConfig config) {
+        JedisCluster jedisCluster = new JedisCluster(config.getNodes(), config.getTimeout(), config.getMaxRedirections(), DEFAULT_POOL_CONFIG);
+        return new JedisClusterContainer(jedisCluster);
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsInstanceContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsInstanceContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsInstanceContainer.java
new file mode 100644
index 0000000..9ec32b9
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisCommandsInstanceContainer.java
@@ -0,0 +1,25 @@
+/**
+ * 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 org.apache.storm.redis.common.container;
+
+import redis.clients.jedis.JedisCommands;
+
+public interface JedisCommandsInstanceContainer {
+    JedisCommands getInstance();
+    void returnInstance(JedisCommands jedisCommands);
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisContainer.java
new file mode 100644
index 0000000..621c05b
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/container/JedisContainer.java
@@ -0,0 +1,65 @@
+/**
+ * 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 org.apache.storm.redis.common.container;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisCommands;
+import redis.clients.jedis.JedisPool;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+public class JedisContainer implements JedisCommandsInstanceContainer, Closeable {
+    private static final Logger LOG = LoggerFactory.getLogger(JedisContainer.class);
+
+    private JedisPool jedisPool;
+
+    public JedisContainer(JedisPool jedisPool) {
+        this.jedisPool = jedisPool;
+    }
+
+    @Override
+    public JedisCommands getInstance() {
+        return jedisPool.getResource();
+    }
+
+    @Override
+    public void returnInstance(JedisCommands jedisCommands) {
+        if (jedisCommands == null) {
+            return;
+        }
+
+        try {
+            ((Closeable) jedisCommands).close();
+        } catch (IOException e) {
+            LOG.warn("Failed to close (return) instance to pool");
+            try {
+                jedisPool.returnBrokenResource((Jedis) jedisCommands);
+            } catch (Exception e2) {
+                LOG.error("Failed to discard instance from pool");
+            }
+        }
+    }
+
+    @Override
+    public void close() {
+        jedisPool.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
new file mode 100644
index 0000000..d2a4af2
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisDataTypeDescription.java
@@ -0,0 +1,33 @@
+package org.apache.storm.redis.common.mapper;
+
+import java.io.Serializable;
+
+public class RedisDataTypeDescription implements Serializable {
+    public enum RedisDataType { STRING, HASH, LIST, SET, SORTED_SET, HYPER_LOG_LOG }
+
+    private RedisDataType dataType;
+    private String additionalKey;
+
+    public RedisDataTypeDescription(RedisDataType dataType) {
+        this(dataType, null);
+    }
+
+    public RedisDataTypeDescription(RedisDataType dataType, String additionalKey) {
+        this.dataType = dataType;
+        this.additionalKey = additionalKey;
+
+        if (dataType == RedisDataType.HASH || dataType == RedisDataType.SORTED_SET) {
+            if (additionalKey == null) {
+                throw new IllegalArgumentException("Hash and Sorted Set should have additional key");
+            }
+        }
+    }
+
+    public RedisDataType getDataType() {
+        return dataType;
+    }
+
+    public String getAdditionalKey() {
+        return additionalKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisLookupMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisLookupMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisLookupMapper.java
new file mode 100644
index 0000000..880aea1
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisLookupMapper.java
@@ -0,0 +1,40 @@
+/**
+ * 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 org.apache.storm.redis.common.mapper;
+
+import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.tuple.ITuple;
+import backtype.storm.tuple.Values;
+
+import java.util.List;
+
+public interface RedisLookupMapper extends TupleMapper, RedisMapper {
+    /**
+     * Converts return value from Redis to a list of storm values that can be emitted.
+     * @param input the input tuple.
+     * @param value Redis query response value. Can be String, Boolean, Long regarding of data type.
+     * @return a List of storm values that can be emitted. Each item in list is emitted as an output tuple.
+     */
+    public List<Values> toTuple(ITuple input, Object value);
+
+    /**
+     * declare what are the fields that this code will output.
+     * @param declarer
+     */
+    void declareOutputFields(OutputFieldsDeclarer declarer);
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
new file mode 100644
index 0000000..d19acaa
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisMapper.java
@@ -0,0 +1,5 @@
+package org.apache.storm.redis.common.mapper;
+
+public interface RedisMapper {
+    public RedisDataTypeDescription getDataTypeDescription();
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisStoreMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisStoreMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisStoreMapper.java
new file mode 100644
index 0000000..b3d7adf
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/RedisStoreMapper.java
@@ -0,0 +1,21 @@
+/**
+ * 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 org.apache.storm.redis.common.mapper;
+
+public interface RedisStoreMapper extends TupleMapper, RedisMapper {
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/TupleMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/TupleMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/TupleMapper.java
new file mode 100644
index 0000000..86664b8
--- /dev/null
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/common/mapper/TupleMapper.java
@@ -0,0 +1,27 @@
+/**
+ * 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 org.apache.storm.redis.common.mapper;
+
+import backtype.storm.tuple.ITuple;
+
+import java.io.Serializable;
+
+public interface TupleMapper extends Serializable {
+    public String getKeyFromTuple(ITuple tuple);
+    public String getValueFromTuple(ITuple tuple);
+}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/mapper/TridentTupleMapper.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/mapper/TridentTupleMapper.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/mapper/TridentTupleMapper.java
deleted file mode 100644
index 4c10143..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/mapper/TridentTupleMapper.java
+++ /dev/null
@@ -1,27 +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 org.apache.storm.redis.trident.mapper;
-
-import storm.trident.tuple.TridentTuple;
-
-import java.io.Serializable;
-
-public interface TridentTupleMapper extends Serializable {
-    public String getKeyFromTridentTuple(TridentTuple tuple);
-    public String getValueFromTridentTuple(TridentTuple tuple);
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterMapState.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterMapState.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterMapState.java
index 24c1df1..1154376 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterMapState.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterMapState.java
@@ -23,7 +23,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.JedisCluster;

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterState.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterState.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterState.java
index 493ffdd..d74e838 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterState.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterState.java
@@ -18,7 +18,7 @@
 package org.apache.storm.redis.trident.state;
 
 import backtype.storm.task.IMetricsContext;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.JedisCluster;

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateQuerier.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateQuerier.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateQuerier.java
index e0207e2..17614a1 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateQuerier.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateQuerier.java
@@ -19,7 +19,7 @@ package org.apache.storm.redis.trident.state;
 
 import backtype.storm.tuple.Values;
 import com.google.common.collect.Lists;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.JedisCluster;
@@ -33,9 +33,9 @@ public class RedisClusterStateQuerier extends BaseQueryFunction<RedisClusterStat
     private static final Logger logger = LoggerFactory.getLogger(RedisClusterState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
 
-    public RedisClusterStateQuerier(String redisKeyPrefix, TridentTupleMapper tupleMapper) {
+    public RedisClusterStateQuerier(String redisKeyPrefix, TupleMapper tupleMapper) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
     }
@@ -52,7 +52,7 @@ public class RedisClusterStateQuerier extends BaseQueryFunction<RedisClusterStat
 
 
             for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTridentTuple(input);
+                String key = this.tupleMapper.getKeyFromTuple(input);
                 if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                     key = redisKeyPrefix + key;
                 }
@@ -72,7 +72,7 @@ public class RedisClusterStateQuerier extends BaseQueryFunction<RedisClusterStat
 
     @Override
     public void execute(TridentTuple tuple, String s, TridentCollector collector) {
-        String key = this.tupleMapper.getKeyFromTridentTuple(tuple);
+        String key = this.tupleMapper.getKeyFromTuple(tuple);
         collector.emit(new Values(key, s));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateUpdater.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateUpdater.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateUpdater.java
index e72735a..023b527 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateUpdater.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisClusterStateUpdater.java
@@ -17,7 +17,7 @@
  */
 package org.apache.storm.redis.trident.state;
 
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.JedisCluster;
@@ -31,10 +31,10 @@ public class RedisClusterStateUpdater extends BaseStateUpdater<RedisClusterState
     private static final Logger logger = LoggerFactory.getLogger(RedisClusterState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
     private final int expireIntervalSec;
 
-    public RedisClusterStateUpdater(String redisKeyPrefix, TridentTupleMapper tupleMapper, int expireIntervalSec) {
+    public RedisClusterStateUpdater(String redisKeyPrefix, TupleMapper tupleMapper, int expireIntervalSec) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
         if (expireIntervalSec > 0) {
@@ -52,12 +52,12 @@ public class RedisClusterStateUpdater extends BaseStateUpdater<RedisClusterState
         try {
             jedisCluster = redisClusterState.getJedisCluster();
             for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTridentTuple(input);
+                String key = this.tupleMapper.getKeyFromTuple(input);
                 String redisKey = key;
                 if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                     redisKey = redisKeyPrefix + redisKey;
                 }
-                String value = this.tupleMapper.getValueFromTridentTuple(input);
+                String value = this.tupleMapper.getValueFromTuple(input);
 
                 logger.debug("update key[" + key + "] redisKey[" + redisKey + "] value[" + value + "]");
 

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
index f934cea..7f3edd1 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisMapState.java
@@ -22,7 +22,7 @@ import backtype.storm.tuple.Values;
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java
index f2fd624..2c7fd13 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisState.java
@@ -18,7 +18,7 @@
 package org.apache.storm.redis.trident.state;
 
 import backtype.storm.task.IMetricsContext;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateQuerier.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateQuerier.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateQuerier.java
index 051088e..294e83b 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateQuerier.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateQuerier.java
@@ -19,7 +19,7 @@ package org.apache.storm.redis.trident.state;
 
 import backtype.storm.tuple.Values;
 import com.google.common.collect.Lists;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;
@@ -33,9 +33,9 @@ public class RedisStateQuerier extends BaseQueryFunction<RedisState, String> {
     private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
 
-    public RedisStateQuerier(String redisKeyPrefix, TridentTupleMapper tupleMapper) {
+    public RedisStateQuerier(String redisKeyPrefix, TupleMapper tupleMapper) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
     }
@@ -44,7 +44,7 @@ public class RedisStateQuerier extends BaseQueryFunction<RedisState, String> {
     public List<String> batchRetrieve(RedisState redisState, List<TridentTuple> inputs) {
         List<String> keys = Lists.newArrayList();
         for (TridentTuple input : inputs) {
-            String key = this.tupleMapper.getKeyFromTridentTuple(input);
+            String key = this.tupleMapper.getKeyFromTuple(input);
             if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                 key = redisKeyPrefix + key;
             }
@@ -64,7 +64,7 @@ public class RedisStateQuerier extends BaseQueryFunction<RedisState, String> {
 
     @Override
     public void execute(TridentTuple tuple, String s, TridentCollector collector) {
-        String key = this.tupleMapper.getKeyFromTridentTuple(tuple);
+        String key = this.tupleMapper.getKeyFromTuple(tuple);
         collector.emit(new Values(key, s));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
index 5b04d59..6b75f31 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetCountQuerier.java
@@ -18,7 +18,7 @@
 package org.apache.storm.redis.trident.state;
 
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;
@@ -33,9 +33,9 @@ public class RedisStateSetCountQuerier extends BaseQueryFunction<RedisState, Lon
     private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
 
-    public RedisStateSetCountQuerier(String redisKeyPrefix, TridentTupleMapper tupleMapper) {
+    public RedisStateSetCountQuerier(String redisKeyPrefix, TupleMapper tupleMapper) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
     }
@@ -48,7 +48,7 @@ public class RedisStateSetCountQuerier extends BaseQueryFunction<RedisState, Lon
         try {
             jedis = redisState.getJedis();
             for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTridentTuple(input);
+                String key = this.tupleMapper.getKeyFromTuple(input);
                 if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                     key = redisKeyPrefix + key;
                 }
@@ -68,7 +68,7 @@ public class RedisStateSetCountQuerier extends BaseQueryFunction<RedisState, Lon
 
     @Override
     public void execute(TridentTuple tuple, Long s, TridentCollector collector) {
-        String key = this.tupleMapper.getKeyFromTridentTuple(tuple);
+        String key = this.tupleMapper.getKeyFromTuple(tuple);
         collector.emit(new Values(key, s));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
index c36d1f0..d7c43da 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateSetUpdater.java
@@ -18,7 +18,7 @@
 package org.apache.storm.redis.trident.state;
 
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;
@@ -32,10 +32,10 @@ public class RedisStateSetUpdater extends BaseStateUpdater<RedisState> {
     private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
     private final int expireIntervalSec;
 
-    public RedisStateSetUpdater(String redisKeyPrefix, TridentTupleMapper tupleMapper, int expireIntervalSec) {
+    public RedisStateSetUpdater(String redisKeyPrefix, TupleMapper tupleMapper, int expireIntervalSec) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
         if (expireIntervalSec > 0) {
@@ -53,12 +53,12 @@ public class RedisStateSetUpdater extends BaseStateUpdater<RedisState> {
         try {
             jedis = redisState.getJedis();
             for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTridentTuple(input);
+                String key = this.tupleMapper.getKeyFromTuple(input);
                 String redisKey = key;
                 if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                     redisKey = redisKeyPrefix + redisKey;
                 }
-                String value = this.tupleMapper.getValueFromTridentTuple(input);
+                String value = this.tupleMapper.getValueFromTuple(input);
 
                 logger.debug("update key[" + key + "] redisKey[" + redisKey + "] value[" + value + "]");
 

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateUpdater.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateUpdater.java b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateUpdater.java
index 67f7c51..664a222 100644
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateUpdater.java
+++ b/external/storm-redis/src/main/java/org/apache/storm/redis/trident/state/RedisStateUpdater.java
@@ -17,7 +17,7 @@
  */
 package org.apache.storm.redis.trident.state;
 
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.Jedis;
@@ -31,10 +31,10 @@ public class RedisStateUpdater extends BaseStateUpdater<RedisState> {
     private static final Logger logger = LoggerFactory.getLogger(RedisState.class);
 
     private final String redisKeyPrefix;
-    private final TridentTupleMapper tupleMapper;
+    private final TupleMapper tupleMapper;
     private final int expireIntervalSec;
 
-    public RedisStateUpdater(String redisKeyPrefix, TridentTupleMapper tupleMapper, int expireIntervalSec) {
+    public RedisStateUpdater(String redisKeyPrefix, TupleMapper tupleMapper, int expireIntervalSec) {
         this.redisKeyPrefix = redisKeyPrefix;
         this.tupleMapper = tupleMapper;
         if (expireIntervalSec > 0) {
@@ -51,12 +51,12 @@ public class RedisStateUpdater extends BaseStateUpdater<RedisState> {
         try {
             jedis = redisState.getJedis();
             for (TridentTuple input : inputs) {
-                String key = this.tupleMapper.getKeyFromTridentTuple(input);
+                String key = this.tupleMapper.getKeyFromTuple(input);
                 String redisKey = key;
                 if (redisKeyPrefix != null && redisKeyPrefix.length() > 0) {
                     redisKey = redisKeyPrefix + redisKey;
                 }
-                String value = this.tupleMapper.getValueFromTridentTuple(input);
+                String value = this.tupleMapper.getValueFromTuple(input);
 
                 logger.debug("update key[" + key + "] redisKey[" + redisKey + "] value[" + value + "]");
 

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisClusterConfig.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisClusterConfig.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisClusterConfig.java
deleted file mode 100644
index 355119a..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisClusterConfig.java
+++ /dev/null
@@ -1,82 +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 org.apache.storm.redis.util.config;
-
-import com.google.common.base.Preconditions;
-import redis.clients.jedis.HostAndPort;
-import redis.clients.jedis.Protocol;
-
-import java.io.Serializable;
-import java.net.InetSocketAddress;
-import java.util.HashSet;
-import java.util.Set;
-
-public class JedisClusterConfig implements Serializable {
-    private Set<InetSocketAddress> nodes;
-    private int timeout;
-    private int maxRedirections;
-
-    public JedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections) {
-        this.nodes = nodes;
-        this.timeout = timeout;
-        this.maxRedirections = maxRedirections;
-    }
-
-    public Set<HostAndPort> getNodes() {
-        Set<HostAndPort> ret = new HashSet<HostAndPort>();
-        for (InetSocketAddress node : nodes) {
-            ret.add(new HostAndPort(node.getHostName(), node.getPort()));
-        }
-        return ret;
-    }
-
-    public int getTimeout() {
-        return timeout;
-    }
-
-    public int getMaxRedirections() {
-        return maxRedirections;
-    }
-
-    public static class Builder {
-        private Set<InetSocketAddress> nodes;
-        private int timeout = Protocol.DEFAULT_TIMEOUT;
-        private int maxRedirections = 5;
-
-        public Builder setNodes(Set<InetSocketAddress> nodes) {
-            this.nodes = nodes;
-            return this;
-        }
-
-        public Builder setTimeout(int timeout) {
-            this.timeout = timeout;
-            return this;
-        }
-
-        public Builder setMaxRedirections(int maxRedirections) {
-            this.maxRedirections = maxRedirections;
-            return this;
-        }
-
-        public JedisClusterConfig build() {
-            Preconditions.checkNotNull(this.nodes, "Node information should be presented");
-
-            return new JedisClusterConfig(nodes, timeout, maxRedirections);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisPoolConfig.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisPoolConfig.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisPoolConfig.java
deleted file mode 100644
index 9a42cf7..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/config/JedisPoolConfig.java
+++ /dev/null
@@ -1,97 +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 org.apache.storm.redis.util.config;
-
-import redis.clients.jedis.Protocol;
-
-import java.io.Serializable;
-
-public class JedisPoolConfig implements Serializable {
-    public static final String DEFAULT_HOST = "127.0.0.1";
-
-    private String host;
-    private int port;
-    private int timeout;
-    private int database;
-    private String password;
-
-    public JedisPoolConfig(String host, int port, int timeout, String password, int database) {
-        this.host = host;
-        this.port = port;
-        this.timeout = timeout;
-        this.database = database;
-        this.password = password;
-    }
-
-    public String getHost() {
-        return host;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public int getTimeout() {
-        return timeout;
-    }
-
-    public int getDatabase() {
-        return database;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public static class Builder {
-        private String host = DEFAULT_HOST;
-        private int port = Protocol.DEFAULT_PORT;
-        private int timeout = Protocol.DEFAULT_TIMEOUT;
-        private int database = Protocol.DEFAULT_DATABASE;
-        private String password;
-
-        public Builder setHost(String host) {
-            this.host = host;
-            return this;
-        }
-
-        public Builder setPort(int port) {
-            this.port = port;
-            return this;
-        }
-
-        public Builder setTimeout(int timeout) {
-            this.timeout = timeout;
-            return this;
-        }
-
-        public Builder setDatabase(int database) {
-            this.database = database;
-            return this;
-        }
-
-        public Builder setPassword(String password) {
-            this.password = password;
-            return this;
-        }
-
-        public JedisPoolConfig build() {
-            return new JedisPoolConfig(host, port, timeout, password, database);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisClusterContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisClusterContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisClusterContainer.java
deleted file mode 100644
index 5fd4115..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisClusterContainer.java
+++ /dev/null
@@ -1,47 +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 org.apache.storm.redis.util.container;
-
-import redis.clients.jedis.JedisCluster;
-import redis.clients.jedis.JedisCommands;
-
-import java.io.Closeable;
-
-public class JedisClusterContainer implements JedisCommandsInstanceContainer, Closeable {
-
-    private JedisCluster jedisCluster;
-
-    public JedisClusterContainer(JedisCluster jedisCluster) {
-        this.jedisCluster = jedisCluster;
-    }
-
-    @Override
-    public JedisCommands getInstance() {
-        return this.jedisCluster;
-    }
-
-    @Override
-    public void returnInstance(JedisCommands jedisCommands) {
-        // do nothing
-    }
-
-    @Override
-    public void close() {
-        this.jedisCluster.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsContainerBuilder.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsContainerBuilder.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsContainerBuilder.java
deleted file mode 100644
index 8d2dd38..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsContainerBuilder.java
+++ /dev/null
@@ -1,38 +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 org.apache.storm.redis.util.container;
-
-import org.apache.storm.redis.util.config.JedisClusterConfig;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
-import redis.clients.jedis.JedisCluster;
-import redis.clients.jedis.JedisPool;
-
-public class JedisCommandsContainerBuilder {
-
-    public static final redis.clients.jedis.JedisPoolConfig DEFAULT_POOL_CONFIG = new redis.clients.jedis.JedisPoolConfig();
-
-    public static JedisCommandsInstanceContainer build(JedisPoolConfig config) {
-        JedisPool jedisPool = new JedisPool(DEFAULT_POOL_CONFIG, config.getHost(), config.getPort(), config.getTimeout(), config.getPassword(), config.getDatabase());
-        return new JedisContainer(jedisPool);
-    }
-
-    public static JedisCommandsInstanceContainer build(JedisClusterConfig config) {
-        JedisCluster jedisCluster = new JedisCluster(config.getNodes(), config.getTimeout(), config.getMaxRedirections(), DEFAULT_POOL_CONFIG);
-        return new JedisClusterContainer(jedisCluster);
-    }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsInstanceContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsInstanceContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsInstanceContainer.java
deleted file mode 100644
index 847d6a5..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisCommandsInstanceContainer.java
+++ /dev/null
@@ -1,25 +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 org.apache.storm.redis.util.container;
-
-import redis.clients.jedis.JedisCommands;
-
-public interface JedisCommandsInstanceContainer {
-    JedisCommands getInstance();
-    void returnInstance(JedisCommands jedisCommands);
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisContainer.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisContainer.java b/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisContainer.java
deleted file mode 100644
index e75cccc..0000000
--- a/external/storm-redis/src/main/java/org/apache/storm/redis/util/container/JedisContainer.java
+++ /dev/null
@@ -1,65 +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 org.apache.storm.redis.util.container;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import redis.clients.jedis.Jedis;
-import redis.clients.jedis.JedisCommands;
-import redis.clients.jedis.JedisPool;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-public class JedisContainer implements JedisCommandsInstanceContainer, Closeable {
-    private static final Logger LOG = LoggerFactory.getLogger(JedisContainer.class);
-
-    private JedisPool jedisPool;
-
-    public JedisContainer(JedisPool jedisPool) {
-        this.jedisPool = jedisPool;
-    }
-
-    @Override
-    public JedisCommands getInstance() {
-        return jedisPool.getResource();
-    }
-
-    @Override
-    public void returnInstance(JedisCommands jedisCommands) {
-        if (jedisCommands == null) {
-            return;
-        }
-
-        try {
-            ((Closeable) jedisCommands).close();
-        } catch (IOException e) {
-            LOG.warn("Failed to close (return) instance to pool");
-            try {
-                jedisPool.returnBrokenResource((Jedis) jedisCommands);
-            } catch (Exception e2) {
-                LOG.error("Failed to discard instance from pool");
-            }
-        }
-    }
-
-    @Override
-    public void close() {
-        jedisPool.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/LookupWordCount.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/LookupWordCount.java b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/LookupWordCount.java
index a62fdff..ae053de 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/LookupWordCount.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/LookupWordCount.java
@@ -20,72 +20,65 @@ package org.apache.storm.redis.topology;
 import backtype.storm.Config;
 import backtype.storm.LocalCluster;
 import backtype.storm.StormSubmitter;
+import backtype.storm.task.OutputCollector;
+import backtype.storm.task.TopologyContext;
 import backtype.storm.topology.OutputFieldsDeclarer;
 import backtype.storm.topology.TopologyBuilder;
+import backtype.storm.topology.base.BaseRichBolt;
 import backtype.storm.tuple.Fields;
+import backtype.storm.tuple.ITuple;
 import backtype.storm.tuple.Tuple;
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.bolt.AbstractRedisBolt;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import com.google.common.collect.Lists;
+import org.apache.storm.redis.bolt.RedisLookupBolt;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import org.apache.storm.redis.common.mapper.RedisDataTypeDescription;
+import org.apache.storm.redis.common.mapper.RedisLookupMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import redis.clients.jedis.JedisCommands;
-import redis.clients.jedis.exceptions.JedisConnectionException;
-import redis.clients.jedis.exceptions.JedisException;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 import java.util.Random;
 
 public class LookupWordCount {
     private static final String WORD_SPOUT = "WORD_SPOUT";
     private static final String LOOKUP_BOLT = "LOOKUP_BOLT";
+    private static final String PRINT_BOLT = "PRINT_BOLT";
 
     private static final String TEST_REDIS_HOST = "127.0.0.1";
     private static final int TEST_REDIS_PORT = 6379;
 
-    public static class LookupWordTotalCountBolt extends AbstractRedisBolt {
-        private static final Logger LOG = LoggerFactory.getLogger(LookupWordTotalCountBolt.class);
+    public static class PrintWordTotalCountBolt extends BaseRichBolt {
+        private static final Logger LOG = LoggerFactory.getLogger(PrintWordTotalCountBolt.class);
         private static final Random RANDOM = new Random();
+        private OutputCollector collector;
 
-        public LookupWordTotalCountBolt(JedisPoolConfig config) {
-            super(config);
-        }
-
-        public LookupWordTotalCountBolt(JedisClusterConfig config) {
-            super(config);
+        @Override
+        public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
+            this.collector = collector;
         }
 
         @Override
         public void execute(Tuple input) {
-            JedisCommands jedisCommands = null;
-            try {
-                jedisCommands = getInstance();
-                String wordName = input.getStringByField("word");
-                String countStr = jedisCommands.get(wordName);
+            String wordName = input.getStringByField("wordName");
+            String countStr = input.getStringByField("count");
+
+            // print lookup result with low probability
+            if(RANDOM.nextInt(1000) > 995) {
+                int count = 0;
                 if (countStr != null) {
-                    int count = Integer.parseInt(countStr);
-                    this.collector.emit(new Values(wordName, count));
-
-                    // print lookup result with low probability
-                    if(RANDOM.nextInt(1000) > 995) {
-                        LOG.info("Lookup result - word : " + wordName + " / count : " + count);
-                    }
-                } else {
-                    // skip
-                    LOG.warn("Word not found in Redis - word : " + wordName);
+                    count = Integer.parseInt(countStr);
                 }
-            } finally {
-                if (jedisCommands != null) {
-                    returnInstance(jedisCommands);
-                }
-                this.collector.ack(input);
+                LOG.info("Lookup result - word : " + wordName + " / count : " + count);
             }
+
+            collector.ack(input);
         }
 
         @Override
         public void declareOutputFields(OutputFieldsDeclarer declarer) {
-            // wordName, count
-            declarer.declare(new Fields("wordName", "count"));
         }
     }
 
@@ -104,12 +97,16 @@ public class LookupWordCount {
                 .setHost(host).setPort(port).build();
 
         WordSpout spout = new WordSpout();
-        LookupWordTotalCountBolt redisLookupBolt = new LookupWordTotalCountBolt(poolConfig);
+        RedisLookupMapper lookupMapper = setupLookupMapper();
+        RedisLookupBolt lookupBolt = new RedisLookupBolt(poolConfig, lookupMapper);
+
+        PrintWordTotalCountBolt printBolt = new PrintWordTotalCountBolt();
 
         //wordspout -> lookupbolt
         TopologyBuilder builder = new TopologyBuilder();
         builder.setSpout(WORD_SPOUT, spout, 1);
-        builder.setBolt(LOOKUP_BOLT, redisLookupBolt, 1).shuffleGrouping(WORD_SPOUT);
+        builder.setBolt(LOOKUP_BOLT, lookupBolt, 1).shuffleGrouping(WORD_SPOUT);
+        builder.setBolt(PRINT_BOLT, printBolt, 1).shuffleGrouping(LOOKUP_BOLT);
 
         if (args.length == 2) {
             LocalCluster cluster = new LocalCluster();
@@ -124,4 +121,46 @@ public class LookupWordCount {
             System.out.println("Usage: LookupWordCount <redis host> <redis port> (topology name)");
         }
     }
+
+    private static RedisLookupMapper setupLookupMapper() {
+        return new WordCountRedisLookupMapper();
+    }
+
+    private static class WordCountRedisLookupMapper implements RedisLookupMapper {
+        private RedisDataTypeDescription description;
+        private final String hashKey = "wordCount";
+
+        public WordCountRedisLookupMapper() {
+            description = new RedisDataTypeDescription(
+                    RedisDataTypeDescription.RedisDataType.HASH, hashKey);
+        }
+
+        @Override
+        public List<Values> toTuple(ITuple input, Object value) {
+            String member = getKeyFromTuple(input);
+            List<Values> values = Lists.newArrayList();
+            values.add(new Values(member, value));
+            return values;
+        }
+
+        @Override
+        public void declareOutputFields(OutputFieldsDeclarer declarer) {
+            declarer.declare(new Fields("wordName", "count"));
+        }
+
+        @Override
+        public RedisDataTypeDescription getDataTypeDescription() {
+            return description;
+        }
+
+        @Override
+        public String getKeyFromTuple(ITuple tuple) {
+            return tuple.getStringByField("word");
+        }
+
+        @Override
+        public String getValueFromTuple(ITuple tuple) {
+            return null;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
index 535d7b9..14a969d 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/PersistentWordCount.java
@@ -23,10 +23,14 @@ import backtype.storm.StormSubmitter;
 import backtype.storm.topology.OutputFieldsDeclarer;
 import backtype.storm.topology.TopologyBuilder;
 import backtype.storm.tuple.Fields;
+import backtype.storm.tuple.ITuple;
 import backtype.storm.tuple.Tuple;
 import org.apache.storm.redis.bolt.AbstractRedisBolt;
-import org.apache.storm.redis.util.config.JedisClusterConfig;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import org.apache.storm.redis.bolt.RedisStoreBolt;
+import org.apache.storm.redis.common.config.JedisClusterConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
+import org.apache.storm.redis.common.mapper.RedisDataTypeDescription;
+import org.apache.storm.redis.common.mapper.RedisStoreMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import redis.clients.jedis.JedisCommands;
@@ -36,7 +40,7 @@ import redis.clients.jedis.exceptions.JedisException;
 public class PersistentWordCount {
     private static final String WORD_SPOUT = "WORD_SPOUT";
     private static final String COUNT_BOLT = "COUNT_BOLT";
-    private static final String REDIS_BOLT = "REDIS_BOLT";
+    private static final String STORE_BOLT = "STORE_BOLT";
 
     private static final String TEST_REDIS_HOST = "127.0.0.1";
     private static final int TEST_REDIS_PORT = 6379;
@@ -92,14 +96,15 @@ public class PersistentWordCount {
 
         WordSpout spout = new WordSpout();
         WordCounter bolt = new WordCounter();
-        StoreCountRedisBolt redisBolt = new StoreCountRedisBolt(poolConfig);
+        RedisStoreMapper storeMapper = setupStoreMapper();
+        RedisStoreBolt storeBolt = new RedisStoreBolt(poolConfig, storeMapper);
 
         // wordSpout ==> countBolt ==> RedisBolt
         TopologyBuilder builder = new TopologyBuilder();
 
         builder.setSpout(WORD_SPOUT, spout, 1);
-        builder.setBolt(COUNT_BOLT, bolt, 1).shuffleGrouping(WORD_SPOUT);
-        builder.setBolt(REDIS_BOLT, redisBolt, 1).fieldsGrouping(COUNT_BOLT, new Fields("word"));
+        builder.setBolt(COUNT_BOLT, bolt, 1).fieldsGrouping(WORD_SPOUT, new Fields("word"));
+        builder.setBolt(STORE_BOLT, storeBolt, 1).shuffleGrouping(COUNT_BOLT);
 
         if (args.length == 2) {
             LocalCluster cluster = new LocalCluster();
@@ -114,4 +119,33 @@ public class PersistentWordCount {
             System.out.println("Usage: PersistentWordCount <redis host> <redis port> (topology name)");
         }
     }
+
+    private static RedisStoreMapper setupStoreMapper() {
+        return new WordCountStoreMapper();
+    }
+
+    private static class WordCountStoreMapper implements RedisStoreMapper {
+        private RedisDataTypeDescription description;
+        private final String hashKey = "wordCount";
+
+        public WordCountStoreMapper() {
+            description = new RedisDataTypeDescription(
+                    RedisDataTypeDescription.RedisDataType.HASH, hashKey);
+        }
+
+        @Override
+        public RedisDataTypeDescription getDataTypeDescription() {
+            return description;
+        }
+
+        @Override
+        public String getKeyFromTuple(ITuple tuple) {
+            return tuple.getStringByField("word");
+        }
+
+        @Override
+        public String getValueFromTuple(ITuple tuple) {
+            return tuple.getStringByField("count");
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/WordCounter.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/WordCounter.java b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/WordCounter.java
index 6a0548d..6f25038 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/topology/WordCounter.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/topology/WordCounter.java
@@ -23,23 +23,32 @@ import backtype.storm.topology.IBasicBolt;
 import backtype.storm.topology.OutputFieldsDeclarer;
 import backtype.storm.tuple.Fields;
 import backtype.storm.tuple.Tuple;
+import backtype.storm.tuple.Values;
+import com.google.common.collect.Maps;
 
 import java.util.Map;
 
 import static backtype.storm.utils.Utils.tuple;
 
 public class WordCounter implements IBasicBolt {
-
+    private Map<String, Integer> wordCounter = Maps.newHashMap();
 
     @SuppressWarnings("rawtypes")
     public void prepare(Map stormConf, TopologyContext context) {
     }
 
-    /*
-     * Just output the word value with a count of 1.
-     */
     public void execute(Tuple input, BasicOutputCollector collector) {
-        collector.emit(tuple(input.getValues().get(0), 1));
+        String word = input.getStringByField("word");
+        int count;
+        if (wordCounter.containsKey(word)) {
+            count = wordCounter.get(word) + 1;
+            wordCounter.put(word, wordCounter.get(word) + 1);
+        } else {
+            count = 1;
+        }
+
+        wordCounter.put(word, count);
+        collector.emit(new Values(word, String.valueOf(count)));
     }
 
     public void cleanup() {

http://git-wip-us.apache.org/repos/asf/storm/blob/f7c0bf8a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedis.java
----------------------------------------------------------------------
diff --git a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedis.java b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedis.java
index 9a28cb7..8b6ebc5 100644
--- a/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedis.java
+++ b/external/storm-redis/src/test/java/org/apache/storm/redis/trident/WordCountTridentRedis.java
@@ -23,15 +23,14 @@ import backtype.storm.StormSubmitter;
 import backtype.storm.generated.StormTopology;
 import backtype.storm.tuple.Fields;
 import backtype.storm.tuple.Values;
-import org.apache.storm.redis.trident.mapper.TridentTupleMapper;
+import org.apache.storm.redis.common.mapper.TupleMapper;
 import org.apache.storm.redis.trident.state.RedisState;
 import org.apache.storm.redis.trident.state.RedisStateQuerier;
 import org.apache.storm.redis.trident.state.RedisStateUpdater;
-import org.apache.storm.redis.util.config.JedisPoolConfig;
+import org.apache.storm.redis.common.config.JedisPoolConfig;
 import storm.trident.Stream;
 import storm.trident.TridentState;
 import storm.trident.TridentTopology;
-import storm.trident.state.StateFactory;
 import storm.trident.testing.FixedBatchSpout;
 
 public class WordCountTridentRedis {
@@ -48,7 +47,7 @@ public class WordCountTridentRedis {
         JedisPoolConfig poolConfig = new JedisPoolConfig.Builder()
                                         .setHost(redisHost).setPort(redisPort)
                                         .build();
-        TridentTupleMapper tupleMapper = new WordCountTupleMapper();
+        TupleMapper tupleMapper = new WordCountTupleMapper();
         RedisState.Factory factory = new RedisState.Factory(poolConfig);
 
         TridentTopology topology = new TridentTopology();


[16/45] storm git commit: [storm-redis] Include explanation of basic bolts

Posted by pa...@apache.org.
[storm-redis] Include explanation of basic bolts


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

Branch: refs/heads/nimbus-ha-branch
Commit: 4b9b9767c2bcc9b10a541d950a81827d89b4607e
Parents: 286c52b
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Mar 25 18:31:03 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Mar 25 18:31:03 2015 +0900

----------------------------------------------------------------------
 external/storm-redis/README.md | 108 +++++++++++++++++++++++++++++++++++-
 1 file changed, 106 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/4b9b9767/external/storm-redis/README.md
----------------------------------------------------------------------
diff --git a/external/storm-redis/README.md b/external/storm-redis/README.md
index b01854f..32480e6 100644
--- a/external/storm-redis/README.md
+++ b/external/storm-redis/README.md
@@ -2,6 +2,8 @@
 
 Storm/Trident integration for [Redis](http://redis.io/)
 
+Storm-redis uses Jedis for Redis client.
+
 ## Usage
 
 ### How do I use it?
@@ -12,12 +14,114 @@ use it as a maven dependency:
 <dependency>
     <groupId>org.apache.storm</groupId>
     <artifactId>storm-redis</artifactId>
-    <version>0.10.0</version>
+    <version>{storm.version}</version>
     <type>jar</type>
 </dependency>
 ```
 
-### AbstractRedisBolt usage:
+### For normal Bolt
+
+Storm-redis provides basic Bolt implementations, ```RedisLookupBolt``` and ```RedisStoreBolt```.
+
+As name represents its usage, ```RedisLookupBolt``` retrieves value from Redis using key, and ```RedisStoreBolt``` stores key / value to Redis. One tuple will be matched to one key / value pair, and you can define match pattern to ```TupleMapper```.
+
+You can also choose data type from ```RedisDataTypeDescription``` to use. Please refer ```RedisDataTypeDescription.RedisDataType``` to see what data types are supported. In some data types (hash and sorted set), it requires additional key and converted key from tuple becomes element.
+
+These interfaces are combined with ```RedisLookupMapper``` and ```RedisStoreMapper``` which fit ```RedisLookupBolt``` and ```RedisStoreBolt``` respectively.
+
+#### RedisLookupBolt example
+
+```java
+
+class WordCountRedisLookupMapper implements RedisLookupMapper {
+    private RedisDataTypeDescription description;
+    private final String hashKey = "wordCount";
+
+    public WordCountRedisLookupMapper() {
+        description = new RedisDataTypeDescription(
+                RedisDataTypeDescription.RedisDataType.HASH, hashKey);
+    }
+
+    @Override
+    public List<Values> toTuple(ITuple input, Object value) {
+        String member = getKeyFromTuple(input);
+        List<Values> values = Lists.newArrayList();
+        values.add(new Values(member, value));
+        return values;
+    }
+
+    @Override
+    public void declareOutputFields(OutputFieldsDeclarer declarer) {
+        declarer.declare(new Fields("wordName", "count"));
+    }
+
+    @Override
+    public RedisDataTypeDescription getDataTypeDescription() {
+        return description;
+    }
+
+    @Override
+    public String getKeyFromTuple(ITuple tuple) {
+        return tuple.getStringByField("word");
+    }
+
+    @Override
+    public String getValueFromTuple(ITuple tuple) {
+        return null;
+    }
+}
+
+```
+
+```java
+
+JedisPoolConfig poolConfig = new JedisPoolConfig.Builder()
+        .setHost(host).setPort(port).build();
+RedisLookupMapper lookupMapper = new WordCountRedisLookupMapper();
+RedisLookupBolt lookupBolt = new RedisLookupBolt(poolConfig, lookupMapper);
+```
+
+#### RedisStoreBolt example
+
+```java
+
+class WordCountStoreMapper implements RedisStoreMapper {
+    private RedisDataTypeDescription description;
+    private final String hashKey = "wordCount";
+
+    public WordCountStoreMapper() {
+        description = new RedisDataTypeDescription(
+            RedisDataTypeDescription.RedisDataType.HASH, hashKey);
+    }
+
+    @Override
+    public RedisDataTypeDescription getDataTypeDescription() {
+        return description;
+    }
+
+    @Override
+    public String getKeyFromTuple(ITuple tuple) {
+        return tuple.getStringByField("word");
+    }
+
+    @Override
+    public String getValueFromTuple(ITuple tuple) {
+        return tuple.getStringByField("count");
+    }
+}
+```
+
+```java
+
+JedisPoolConfig poolConfig = new JedisPoolConfig.Builder()
+                .setHost(host).setPort(port).build();
+RedisStoreMapper storeMapper = new WordCountStoreMapper();
+RedisStoreBolt storeBolt = new RedisStoreBolt(poolConfig, storeMapper);
+```
+
+### For non-simple Bolt
+
+If your scenario doesn't fit ```RedisStoreBolt``` and ```RedisLookupBolt```, storm-redis also provides ```AbstractRedisBolt``` to let you extend and apply your business logic.
 
 ```java
 


[39/45] storm git commit: Merge branch 'STORM-615-V2' of https://github.com/harshach/incubator-storm into STORM-615

Posted by pa...@apache.org.
Merge branch 'STORM-615-V2' of https://github.com/harshach/incubator-storm into STORM-615


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

Branch: refs/heads/nimbus-ha-branch
Commit: 7b1f3f67619d86394e628f984ebb784adec86f2d
Parents: db6df0c 002bf00
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:36:43 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:36:43 2015 -0700

----------------------------------------------------------------------
 STORM-UI-REST-API.md                          | 30 +++++++++++
 storm-core/src/clj/backtype/storm/ui/core.clj | 58 +++++++++++++++++++++-
 2 files changed, 86 insertions(+), 2 deletions(-)
----------------------------------------------------------------------