-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix STORM-2979 (master branch) #2625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add in WorkerState an internal list of workerHooks and use it to start/stop
HeartSaVioR
left a comment
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.
Looks good, left some comments.
| @@ -599,20 +613,16 @@ public WorkerTopologyContext getWorkerTopologyContext() { | |||
| public void runWorkerStartHooks() { | |||
| WorkerTopologyContext workerContext = getWorkerTopologyContext(); | |||
| if (topology.is_set_worker_hooks()) { | |||
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.
if statement unnecessary for now.
| } | ||
|
|
||
| public void runWorkerShutdownHooks() { | ||
| if (topology.is_set_worker_hooks()) { |
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.
if statement unnecessary for now.
| int maxTaskId = getMaxTaskId(componentToSortedTasks); | ||
| this.workerTransfer = new WorkerTransfer(this, topologyConf, maxTaskId); | ||
| this.bpTracker = new BackPressureTracker(workerId, localTaskIds); | ||
| // |
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.
‘//‘ can be removed, and better to extract below to private method as we did above.
Use a private method to deserialize hooks remove unnecessary if statement
revans2
left a comment
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.
+1 looks good to me.
HeartSaVioR
left a comment
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.
+1
Add in WorkerState an internal list of deserialized workerHooks and use it to
start/stop