nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pvill...@apache.org
Subject nifi git commit: NIFI-5795 RedisDistributedMapCacheClientService put missing option
Date Mon, 03 Dec 2018 09:38:02 GMT
Repository: nifi
Updated Branches:
  refs/heads/master 7df537aec -> cc9f89b00


NIFI-5795 RedisDistributedMapCacheClientService put missing option

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #3135.


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

Branch: refs/heads/master
Commit: cc9f89b00326af02a2968d3724d8625791278af7
Parents: 7df537a
Author: luup2k <3969130+luup2k@users.noreply.github.com>
Authored: Tue Nov 6 20:05:23 2018 +0100
Committer: Pierre Villard <pierre.villard.fr@gmail.com>
Committed: Mon Dec 3 10:37:47 2018 +0100

----------------------------------------------------------------------
 .../nifi/redis/service/RedisDistributedMapCacheClientService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/cc9f89b0/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
b/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
index 604c5ef..145c69f 100644
--- a/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
+++ b/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
@@ -38,6 +38,7 @@ import org.springframework.data.redis.connection.RedisConnection;
 import org.springframework.data.redis.core.Cursor;
 import org.springframework.data.redis.core.ScanOptions;
 import org.springframework.data.redis.core.types.Expiration;
+import org.springframework.data.redis.connection.RedisStringCommands.SetOption;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -188,7 +189,7 @@ public class RedisDistributedMapCacheClientService extends AbstractControllerSer
     public <K, V> void put(final K key, final V value, final Serializer<K> keySerializer,
final Serializer<V> valueSerializer) throws IOException {
         withConnection(redisConnection -> {
             final Tuple<byte[],byte[]> kv = serialize(key, value, keySerializer, valueSerializer);
-            redisConnection.set(kv.getKey(), kv.getValue(), Expiration.seconds(ttl), null);
+            redisConnection.set(kv.getKey(), kv.getValue(), Expiration.seconds(ttl), SetOption.upsert());
             return null;
         });
     }


Mime
View raw message