Github user arunmahadevan commented on a diff in the pull request:
https://github.com/apache/storm/pull/1798#discussion_r92643170
--- Diff: storm-core/src/jvm/org/apache/storm/state/KeyValueState.java ---
@@ -52,4 +55,9 @@
* @param key the key
*/
V delete(K key);
+
+ /**
+ * @return an iterator over all key value mappings.
+ */
+ Iterator<Map.Entry<K, V>> iterator();
--- End diff --
The KeyValueState can extend `Iterable<Entry<K, V>>` so that the state can
be directly used in foreach constructs.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---