GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/storm/pull/1664
STORM-2073 Reduce multi-steps on visitProject into one
This change is on top of STORM-2072 (#1663).
In STORM-1434 we revamped the way to build Trident topology for Storm SQL.
While revamping visitProject(), it should handle multiple things (calculate
expression, projection) and moreover Trident doesn't allow duplicated field
name. So we end up having multiple steps - each -> project -> each -> project -
which doesn't look good.
STORM-2072 is introducing a way to map / flatMap with specifying different
output fields. With this, we can reduce visitProject() to have just 1 step
instead of 4 steps.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/storm STORM-2073
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1664.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1664
----
commit 4e78c81d43a42b9209e1d198e1ec72a107806dbd
Author: Jungtaek Lim <[email protected]>
Date: 2016-08-31T04:16:46Z
STORM-2072 Add map, flatMap with different outputs (T->V) in Trident
* Introduce overloading methods of map and flatMap
* Now users can specify new output fields which replace origin fields
* Introduce OperationMapFunction and OperationFlatMapFunction
* which also extends Operation
* Trident will automatically determine this and handle properly
commit ce7206603ff9cc95ba81d078747aa9a6c3a5df99
Author: Jungtaek Lim <[email protected]>
Date: 2016-08-31T04:51:12Z
STORM-2073 Reduce multi-steps on visitProject into one
* Use map() with output fields to reduce steps into one
----
---
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.
---