Skip to content
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

[Java] Simplify Java worker configuration #2938

Merged
merged 10 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set workerContext.driverId
  • Loading branch information
raulchen committed Sep 26, 2018
commit c5bb80fc8d5ceefd1743df233dc30d62fb19b034
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ public void start() throws Exception {
}
kvStore = new RedisClient(rayConfig.getRedisAddress());

// initialize worker context
if (rayConfig.workerMode == WorkerMode.DRIVER) {
// TODO: The relationship between workerID, driver_id and dummy_task.driver_id should be
// recheck carefully
workerContext.setWorkerId(rayConfig.driverId);
}

ObjectStoreLink store = new PlasmaClient(rayConfig.objectStoreSocketName, "", 0);
objectStoreProxy = new ObjectStoreProxy(this, store);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class WorkerContext {
private int currentTaskCallCount;

public WorkerContext(WorkerMode workerMode, UniqueId driverId) {
workerId = UniqueId.randomId();
workerId = workerMode == WorkerMode.DRIVER ? driverId : UniqueId.randomId();
currentTaskPutCount = 0;
currentTaskCallCount = 0;
currentClassLoader = null;
Expand Down