Skip to content

Use Worker instead of ZkWorker whenever possible#2249

Merged
nishantmonu51 merged 1 commit intoapache:masterfrom
metamx:workerExpanded
Feb 24, 2016
Merged

Use Worker instead of ZkWorker whenever possible#2249
nishantmonu51 merged 1 commit intoapache:masterfrom
metamx:workerExpanded

Conversation

@drcrallen
Copy link
Copy Markdown
Contributor

Depends on #1953

@drcrallen drcrallen mentioned this pull request Jan 11, 2016
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line snuck in during some of my commit shuffling. I'll split it out before final rebase

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revert this one. Stale changes from old commit

@drcrallen drcrallen added this to the 0.9.1 milestone Feb 9, 2016
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this have to happen? These properties seems like they should work on their own for everything except lastCompletedTaskTime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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…

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's reasonable

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Feb 9, 2016

Broadly looks good, I assume this is needed for #2246. would like to understand the property injection change better though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@drcrallen drcrallen force-pushed the workerExpanded branch 2 times, most recently from 8cf88d8 to 7cd7ab2 Compare February 16, 2016 18:09
@drcrallen
Copy link
Copy Markdown
Contributor Author

@gianm / @himanshug rebased.

@drcrallen
Copy link
Copy Markdown
Contributor Author

failedin

Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec <<< FAILURE! - in io.druid.indexing.overlord.config.RemoteTaskRunnerConfigTest
testHashCode(io.druid.indexing.overlord.config.RemoteTaskRunnerConfigTest)  Time elapsed: 0.013 sec  <<< FAILURE!
java.lang.AssertionError: Values should be different. Actual: 1709774762
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failEquals(Assert.java:185)
    at org.junit.Assert.assertNotEquals(Assert.java:161)
    at org.junit.Assert.assertNotEquals(Assert.java:198)
    at org.junit.Assert.assertNotEquals(Assert.java:209)
    at io.druid.indexing.overlord.config.RemoteTaskRunnerConfigTest.testHashCode(RemoteTaskRunnerConfigTest.java:335)

investigating

@drcrallen
Copy link
Copy Markdown
Contributor Author

was error in new code. fixed

@drcrallen
Copy link
Copy Markdown
Contributor Author

@himanshug / @gianm updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appears unused

@drcrallen
Copy link
Copy Markdown
Contributor Author

@gianm updated / addressed

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Feb 19, 2016

👍

@drcrallen
Copy link
Copy Markdown
Contributor Author

test failed from updated unit tests with missing parameters in master. fixed

public DateTime getLastCompletedTaskTime()
{
return lastCompletedTaskTime.get();
return worker.get().getLastCompletedTaskTime();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't see the variable lastCompletedTaskTime getting deleted ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class field was leftover value that was accidentally used in toString, removed

@nishantmonu51
Copy link
Copy Markdown
Member

👍, 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
nishantmonu51 added a commit that referenced this pull request Feb 24, 2016
Use Worker instead of ZkWorker whenever possible
@nishantmonu51 nishantmonu51 merged commit fb7eae3 into apache:master Feb 24, 2016
@drcrallen drcrallen deleted the workerExpanded branch February 24, 2016 18:10

public Collection<ZkWorker> getWorkers()
@Override
public Collection<Worker> getWorkers()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

((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.

gianm added a commit to gianm/druid that referenced this pull request Mar 3, 2016
Restores old behavior of this api, from before apache#2249 when getWorkers returned ZkWorkers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants