-
Notifications
You must be signed in to change notification settings - Fork 594
Add Window Bolt support #1215
base: master
Are you sure you want to change the base?
Add Window Bolt support #1215
Conversation
@kramasamy - right now most of codes are from Strom's master branch. I'm not sure if this is the right base. Or should I use some stable version, such as v1.0.2 or v1.1.0? In addition, is there anything I can do to make this one easy to review? |
@windie - I would suggest to use a stable version such as v1.0.1, then when we upgrade we can do the next version - it is very predictable. |
@kramasamy sounds great. Will update my PR to base on v1.0.1. |
thanks @windie - really appreciate the contribution. |
@windie - we can add you into our slack group of heron committers. But I don't know your email address. |
@kramasamy - Thanks! My email is ****** |
Invited - please remove your email from the comment. |
@windie - this should go into heron/storm - since this is storm api 1.0.0 compatible. Heron api under heron/api - is not supposed to be used by the users - since it is a hidden API. |
@kramasamy - Gotcha. |
The new files are copied from Storm. I created a diff between them to show the differences: https://gist.github.com/windie/28d84a7b00a587cd242ba55681df56dd |
@@ -186,6 +190,14 @@ public int getThisTaskIndex() { | |||
return getSources(getThisComponentId()); | |||
} | |||
*/ | |||
public Set<GlobalStreamId> getThisSourceIds() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is the correct way.
Right now Heron doesn't have the Grouping class, so I created the method to get all source streams. It's used by WindowedBoltExecutor.
In Storm, WindowedBoltExecutor uses getThisSources
(The above method commented out)
@kramasamy - updated. Please take a look. |
I fixed the failure test in #1263 |
@kramasamy will do when we have time... |
@maosongfu - can you review this? |
@windie - can you please add some detailed documentation for the types of windows supported? We want to verify and close this as soon as possible. |
@windie - how can we write unit tests for this? |
@windie - Hi, so great to add Window Bolt support!
I failed to run test-topology. Would you please take a look? And The error log is following:
I have a minor comment though. I think it will be great if we can add unit tests,example topology and doc for this. |
|
||
private Set<GlobalStreamId> getComponentStreams(TopologyContext context) { | ||
Set<GlobalStreamId> streams = new HashSet<>(); | ||
for (GlobalStreamId streamId : context.getThisSourceIds()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing. I will add examples, docs and unit tests at the weekend. |
@windie - hi, any update on this? |
@windie - any update on this? |
Sorry for the delay. Just added examples and unit tests to this PR. Right now this PR supports Storm's IWindowedBolt and Watermark but not IStatefulWindowedBolt.
|
@mycFelix fixed this error in my PR. You can just run |
@windie - Great! I'll check it ASAP. BTW, free to ping me at SLACK group anytime. |
Fix the style erorrs
* Emits a random integer and a timestamp value (offset by one day), | ||
* every 100 ms. The ts field can be used in tuple time based windowing. | ||
*/ | ||
@SuppressWarnings("serial") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of suppressing this here and elsewhere, can you add a serialVersionId?
If the storm code is mostly copied could you add a README.md file below heron/storm/src that explains what storm version we're using and how to diff against the storm repo to pull in future changes? |
The bug mentioned before is fixed. 👍 |
What's the convention for codes copied from Storm? Most of codes are changed because of the style errors and different log codes, it's impossible to apply any patches from storm repo directly. |
@kramasamy @nlu90 @windie I will propose to put all of these on top of heron in another repo or in a folder exclude style checking. |
How about just excluding style checking for //heron/storm? |
+1 for excluding style checks for /heron/storm and syncing source code without style changes. This will make it easier to diff/patch withe the storm repo. |
ok sounds good. Can we do separate PR for excluding style checking? |
@windie @kramasamy @billonahill It may not be a good idea to exclude everything in /heron/storm since there are still codes owned by us in this folder, especially for the parts converting storm into heron. Is it possible in the separate PR that we split this folder into two: one is for codes owned by us enforcing style checks, while another is for codes from outside excluding style checks. |
@maosongfu - any idea which directories under heron/storm is written by us? I can take care of separating it out. |
@kramasamy
They are converting storm job into heron job. |
Hi,guys. |
This adds Window bolt support. Most of codes are from Apache Storm master branch (https://github.com/apache/storm/tree/v1.0.2).
This only includes minimum codes for Windowed Bolt. I plan to add others in follow-up PRs.
Resolves #1124.