You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/03/26 15:29:29 UTC

[1/3] storm git commit: [storm-redis] Remove unused and buggy feature

Repository: storm
Updated Branches:
  refs/heads/master a8a0dfdbf -> 6a0ebadea


[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/master
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);
-            }
-        }
-    }
-}


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

Posted by bo...@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/master
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(-)
----------------------------------------------------------------------



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

Posted by bo...@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/master
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