Github user aandis commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1798#discussion_r90398126
  
    --- Diff: storm-core/src/jvm/org/apache/storm/state/KeyValueState.java ---
    @@ -45,4 +47,9 @@
          * @return the value or defaultValue if no mapping is found
          */
         V get(K key, V defaultValue);
    +
    +    /**
    +     * @return all key value mappings as an unmodifiable map.
    +     */
    +    Map<K, V> getAll();
    --- End diff --
    
    @arunmahadevan You mean an `iterator` over the original 
[state](https://github.com/apache/storm/pull/1798/files#diff-ad463cc68c1b4705bce8681f13dcd6d4R35)?
 `iterator` also has a `remove` method which shouldn't be a supported operation 
over `KeyValueState` since there's 
[delete](https://github.com/apache/storm/commit/285668742742da6316d38c1ef492c7c873b5a649#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR2).
 That's the reason for creating and returning an unmodifiable map. :)


---
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.
---

Reply via email to