flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StefanRRichter <...@git.apache.org>
Subject [GitHub] flink pull request #4963: [FLINK-7475] [core][DataStream API] support update...
Date Wed, 03 Jan 2018 22:55:34 GMT
Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4963#discussion_r159548273
  
    --- Diff: flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
---
    @@ -158,4 +158,28 @@ public void mergeNamespaces(N target, Collection<N> sources)
throws Exception {
     			throw new Exception("Error while merging state in RocksDB", e);
     		}
     	}
    +
    +	@Override
    +	public void update(List<V> values) throws Exception {
    +		clear();
    +
    +		if (values != null && !values.isEmpty()) {
    --- End diff --
    
    What I meant, is not a RocksDB question, but a question if the list state should return
`null` or empty iterator if after the user stored an empty list under a key. That might make
a difference and right now, I the caller updates with empty list, the get is identical to
a non-existing mapping (`null`).


---

Mime
View raw message