Github user arunmahadevan commented on a diff in the pull request: https://github.com/apache/storm/pull/1470#discussion_r68537628 --- Diff: external/storm-redis/src/main/java/org/apache/storm/redis/state/RedisKeyValueState.java --- @@ -60,22 +64,23 @@ public RedisKeyValueState(String namespace) { } public RedisKeyValueState(String namespace, JedisPoolConfig poolConfig) { - this(namespace, poolConfig, new DefaultStateSerializer<K>(), new DefaultStateSerializer<V>()); + this(namespace, poolConfig, new DefaultStateSerializer<K>(), new DefaultStateSerializer<Optional<V>>()); } - public RedisKeyValueState(String namespace, JedisPoolConfig poolConfig, Serializer<K> keySerializer, Serializer<V> valueSerializer) { + public RedisKeyValueState(String namespace, JedisPoolConfig poolConfig, Serializer<K> keySerializer, Serializer<Optional<V>> valueSerializer) { this(namespace, JedisCommandsContainerBuilder.build(poolConfig), keySerializer, valueSerializer); } public RedisKeyValueState(String namespace, JedisCommandsInstanceContainer jedisContainer, - Serializer<K> keySerializer, Serializer<V> valueSerializer) { + Serializer<K> keySerializer, Serializer<Optional<V>> valueSerializer) { base64Encoder = new BASE64Encoder(); base64Decoder = new BASE64Decoder(); this.namespace = namespace; this.prepareNamespace = namespace + "$prepare"; this.txidNamespace = namespace + "$txid"; this.keySerializer = keySerializer; this.valueSerializer = valueSerializer; + this.tombstone = encode(valueSerializer.serialize(Optional.<V>absent())); --- End diff -- Can `tombstone` be a static final constant ?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---