public class JobWorker extends Object implements Serializable
JobMaster through ray api, and JobMaster communicates
with JobWorker through Ray.call().
The JobWorker is responsible for creating tasks and defines the methods of communication between workers.
| Constructor and Description |
|---|
JobWorker() |
| Modifier and Type | Method and Description |
|---|---|
ExecutionVertex |
getExecutionVertex() |
StreamTask |
getTask() |
int |
getTaskId() |
StreamingWorkerConfig |
getWorkerConfig() |
JobWorkerContext |
getWorkerContext() |
Boolean |
init(JobWorkerContext workerContext)
Initialize JobWorker and data communication pipeline.
|
void |
onReaderMessage(byte[] buffer)
Used by upstream streaming queue to send data to this actor
|
byte[] |
onReaderMessageSync(byte[] buffer)
Used by upstream streaming queue to send data to this actor
and receive result from this actor
|
void |
onWriterMessage(byte[] buffer)
Used by downstream streaming queue to send data to this actor
|
byte[] |
onWriterMessageSync(byte[] buffer)
Used by downstream streaming queue to send data to this actor
and receive result from this actor
|
Boolean |
start()
Start worker's stream tasks.
|
public Boolean init(JobWorkerContext workerContext)
public Boolean start()
public int getTaskId()
public StreamingWorkerConfig getWorkerConfig()
public JobWorkerContext getWorkerContext()
public ExecutionVertex getExecutionVertex()
public StreamTask getTask()
public void onReaderMessage(byte[] buffer)
public byte[] onReaderMessageSync(byte[] buffer)
public void onWriterMessage(byte[] buffer)
public byte[] onWriterMessageSync(byte[] buffer)
Copyright © 2020. All rights reserved.