Use Worker instead of ZkWorker whenever possible#2249
Use Worker instead of ZkWorker whenever possible#2249nishantmonu51 merged 1 commit intoapache:masterfrom
Conversation
There was a problem hiding this comment.
I think this line snuck in during some of my commit shuffling. I'll split it out before final rebase
f50ecba to
0439a55
Compare
There was a problem hiding this comment.
Will revert this one. Stale changes from old commit
d2d6620 to
2a45ac4
Compare
There was a problem hiding this comment.
Why does this have to happen? These properties seems like they should work on their own for everything except lastCompletedTaskTime.
There was a problem hiding this comment.
Also in light of the need for overriding it'd probably be cleaner to generate the disabledWorker every time someone posts a disable call. That happens so infrequently that there is not really much need to optimize it…
There was a problem hiding this comment.
that's reasonable
|
Broadly looks good, I assume this is needed for #2246. would like to understand the property injection change better though. |
8cf88d8 to
7cd7ab2
Compare
|
@gianm / @himanshug rebased. |
|
failedin investigating |
7cd7ab2 to
4c00347
Compare
|
was error in new code. fixed |
4c00347 to
d5aa7ff
Compare
|
@himanshug / @gianm updated |
d5aa7ff to
3944fe9
Compare
|
@gianm updated / addressed |
|
👍 |
3944fe9 to
8f63b4a
Compare
|
test failed from updated unit tests with missing parameters in master. fixed |
| public DateTime getLastCompletedTaskTime() | ||
| { | ||
| return lastCompletedTaskTime.get(); | ||
| return worker.get().getLastCompletedTaskTime(); |
There was a problem hiding this comment.
can't see the variable lastCompletedTaskTime getting deleted ?
There was a problem hiding this comment.
Class field was leftover value that was accidentally used in toString, removed
|
👍, only one minor nit about unused variable. |
* Moves last run task state information to Worker * Makes WorkerTaskRunner a TaskRunner which has interfaces to help with getting information about a Worker
8f63b4a to
ac13a59
Compare
Use Worker instead of ZkWorker whenever possible
|
|
||
| public Collection<ZkWorker> getWorkers() | ||
| @Override | ||
| public Collection<Worker> getWorkers() |
There was a problem hiding this comment.
@drcrallen this change made the overlord /druid/indexer/v1/workers API no longer return a runningTasks key for each worker, which may confuse some folks' rolling update scripts and definitely makes the web UI less useful.
how do you feel about having the OverlordResource specifically call getZkWorkers if the runner is an RTR? or would it make more sense to add a list of running tasks to the Worker object?
There was a problem hiding this comment.
((spoke in chat)) since io.druid.indexing.overlord.http.OverlordResource#getWorkers already special-cases the RTR, suggest making it get zk workers in that case until a more complete solution can be put in place.
Restores old behavior of this api, from before apache#2249 when getWorkers returned ZkWorkers.
Depends on #1953