SubscribeJobSummarySignal
Description
Receives job information change subscription from the client. When the job status changes, it broadcasts the change to the registered client. If no message is received and no heartbeat is detected within two minutes, the server disconnects the connection and releases the subscription.
Prototype
rpc SubscribeJobSummarySignal(ClientInfo) returns (stream JobSummarySignal){}
Input Parameters
Parameter |
Type (Defined by Protobuf) |
Description |
|---|---|---|
ClientInfo |
message ClientInfo{ string role = 1; string clientId = 3; } |
ClientInfo.role: client role ClientInfo.clientId: client ID |
Return Value
Return Value |
Type (Defined by Protobuf) |
Description |
|---|---|---|
stream |
gRPC stream |
This API returns a gRPC stream. (The data structure of the return value is based on the programming language selected by the client.) The client can call the stream's Receive method (the actual name is determined by the client's programming language) to receive data pushed by the server. |
Data to Be Sent
Parameter |
Type (Defined by Protobuf) |
Description |
|---|---|---|
JobSummarySignal |
message JobSummarySignal{ string uuid = 1; string jobId = 2; string jobName = 3; string namespace =4; string frameWork = 5; string jobStatus = 6; string time = 7; string cmIndex = 8; string total = 9; string HcclJson = 10; string deleteTime = 11; string sharedTorIp = 12; string masterAddr = 13; string operator = 14; } |
uuid: message ID jobId: Kubernetes ID of a job jobName: job name namespace: job namespace frameWork: framework jobStatus: job status, including:
time: time when a job starts cmIndex: index total: total number of jobsummary ConfigMaps HcclJson: communication information about the processor used by a job The value can be escaped to the JSON format. The fields are described as follows:
deleteTime: time when a job is deleted sharedTorIp: information about the shared switch used by a job masterAddr: MASTER_ADDR value specified during PyTorch training operator: After receiving the command for adding a job, the status is updated to add. After receiving the command for deleting a job, the status is updated to delete. |