[Java]Get next job id only in driver (#20813)

## Why are these changes needed?
Job id is only used in driver, we should not get it in WORKER.
This commit is contained in:
Tao Wang 2021-12-01 15:48:21 +08:00 committed by GitHub
parent 4b9524ed76
commit f481081904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,7 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
rayConfig.nodeManagerPort = nodeInfo.getNodeManagerPort();
}
if (rayConfig.getJobId() == JobId.NIL) {
if (rayConfig.workerMode == WorkerType.DRIVER && rayConfig.getJobId() == JobId.NIL) {
rayConfig.setJobId(gcsClient.nextJobId());
}
int numWorkersPerProcess =