Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/525#discussion_r28708308
--- Diff: storm-core/src/jvm/backtype/storm/task/TopologyContext.java ---
@@ -205,32 +217,65 @@ public Object getTaskData(String name) {
public void setExecutorData(String name, Object data) {
_executorData.put(name, data);
}
-
+
public Object getExecutorData(String name) {
return _executorData.get(name);
- }
-
+ }
+
public void addTaskHook(ITaskHook hook) {
hook.prepare(_stormConf, this);
_hooks.add(hook);
}
-
+
public Collection<ITaskHook> getHooks() {
return _hooks;
}
+
+ public Object groupingToJSONableObject(Grouping grouping) {
+ if (grouping.is_set_fields()) {
+ return grouping.get_fields();
+ } else {
+ return grouping.getSetField().toString();
+ }
--- End diff --
I was thinking it would look kind of like.
```{"type":"SHUFFLE"}```
instead of having the fields be null. type would be the only required
field, but I am open to other ideas.
---
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.
---