@NotThreadSafe
public final class JobWorkerIdRegistry
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
INVALID_WORKER_ID
The default value to initialize job worker id, the job worker id generated by job master will
never be the same as this value.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Long |
getWorkerId() |
static void |
registerWorker(JobMasterClient jobMasterClient,
WorkerNetAddress workerAddress)
Registers with
JobMaster to get a new job worker id. |
public static final long INVALID_WORKER_ID
public static void registerWorker(JobMasterClient jobMasterClient, WorkerNetAddress workerAddress) throws java.io.IOException, ConnectionFailedException
JobMaster to get a new job worker id.jobMasterClient - the job master client to be used for RPCworkerAddress - current worker addressjava.io.IOException - when fails to get a new worker idConnectionFailedException - if network connection failedpublic static java.lang.Long getWorkerId()
Copyright © 2022. All Rights Reserved.