FMX commented on code in PR #3231:
URL: https://github.com/apache/celeborn/pull/3231#discussion_r2232922263


##########
common/src/main/proto/TransportMessages.proto:
##########
@@ -939,3 +982,104 @@ message PbReadReducerPartitionEndResponse {
   int32 status = 1;
   string errorMsg = 2;
 }
+
+enum PbMetaRequestType {
+  Unknown = 0;
+
+  UnRegisterShuffle = 12;
+  RequestSlots = 13;
+
+  //deprecated
+  ReleaseSlots = 14;
+
+  AppHeartbeat = 15;
+  AppLost = 16;
+  WorkerLost = 17;
+  WorkerHeartbeat = 18;
+  RegisterWorker = 19;
+  ReportWorkerUnavailable = 20;
+  UpdatePartitionSize = 21;
+  WorkerRemove = 22;
+  RemoveWorkersUnavailableInfo = 23;
+  WorkerExclude = 24;
+  WorkerEvent = 25;
+  ApplicationMeta = 26;
+  ReportWorkerDecommission = 27;
+  BatchUnRegisterShuffle = 28;
+
+  ReviseLostShuffles = 29;
+}
+
+message PbMetaRequest {
+  PbMetaRequestType cmdType = 1; // Type of the command
+
+  optional string requestId = 2;
+
+  optional PbMetaRequestSlotsRequest requestSlotsRequest = 10;
+  // deprecated
+  optional PbReleaseSlots releaseSlotsRequest = 11;
+  optional PbMetaUnregisterShuffle unregisterShuffleRequest = 12;
+  optional PbMetaAppHeartbeatRequest appHeartbeatRequest = 13;
+  optional PbApplicationLost appLostRequest = 14;
+  optional PbWorkerAddress workerLostRequest = 15;
+  optional PbMetaWorkerHeartbeatRequest workerHeartbeatRequest = 16;
+  optional PbMetaRegisterWorkerRequest registerWorkerRequest = 17;
+  optional PbReportWorkerUnavailable reportWorkerUnavailableRequest = 18;
+  optional PbWorkerAddress workerRemoveRequest = 19;
+  optional PbRemoveWorkersUnavailableInfo removeWorkersUnavailableInfoRequest 
= 20;
+  optional PbMetaWorkerExcludeRequest workerExcludeRequest = 21;
+  optional PbWorkerEventRequest workerEventRequest = 22;
+  optional PbApplicationMeta applicationMetaRequest = 23;
+  optional PbReportWorkerDecommission reportWorkerDecommissionRequest = 24;
+  optional PbMetaBatchUnregisterShuffles batchUnregisterShuffleRequest = 25;
+  optional PbReviseLostShuffles reviseLostShufflesRequest = 102;
+}
+
+message PbMetaRequestSlotsRequest {
+  string shuffleKey = 1;
+  string hostName = 2;
+  map<string, PbSlotInfo> workerAllocations = 3;
+}
+
+message PbMetaAppHeartbeatRequest {
+  string appId = 1;
+  int64 time = 2;
+  int64 totalWritten = 3;
+  int64 fileCount = 4;
+  optional int64 shuffleCount = 5;
+  map<string, int64> shuffleFallbackCounts = 6;
+  PbHeartbeatInfo heartbeatInfo = 7;
+  optional int64 applicationCount = 8;
+  map<string, int64> applicationFallbackCounts = 9;
+}
+
+message PbMetaWorkerExcludeRequest {
+  repeated PbWorkerAddress workersToAdd = 1;
+  repeated PbWorkerAddress workersToRemove = 2;
+}
+
+message PbWorkerAddress {
+  string host = 1;
+  int32 rpcPort = 2;
+  int32 pushPort = 3;
+  int32 fetchPort = 4;
+  int32 replicatePort = 5;
+  int32 internalPort = 6;
+}
+
+enum PbMetaRequestStatus {
+  UNKNOWN = 0;
+  OK = 1;
+  INTERNAL_ERROR= 2;
+}
+
+message PbMetaRequestResponse {
+  PbMetaRequestType cmdType = 1; // Type of the command
+
+  optional bool success = 2;

Review Comment:
   We should maintain the protobuf style consistency; you can remove all 
unnecessary optional statements here.



##########
common/src/main/proto/TransportMessages.proto:
##########
@@ -939,3 +982,104 @@ message PbReadReducerPartitionEndResponse {
   int32 status = 1;
   string errorMsg = 2;
 }
+
+enum PbMetaRequestType {
+  Unknown = 0;
+
+  UnRegisterShuffle = 12;
+  RequestSlots = 13;
+
+  //deprecated
+  ReleaseSlots = 14;
+
+  AppHeartbeat = 15;
+  AppLost = 16;
+  WorkerLost = 17;
+  WorkerHeartbeat = 18;
+  RegisterWorker = 19;
+  ReportWorkerUnavailable = 20;
+  UpdatePartitionSize = 21;
+  WorkerRemove = 22;
+  RemoveWorkersUnavailableInfo = 23;
+  WorkerExclude = 24;
+  WorkerEvent = 25;
+  ApplicationMeta = 26;
+  ReportWorkerDecommission = 27;
+  BatchUnRegisterShuffle = 28;
+
+  ReviseLostShuffles = 29;
+}
+
+message PbMetaRequest {
+  PbMetaRequestType cmdType = 1; // Type of the command
+
+  optional string requestId = 2;

Review Comment:
   In protobuf 3, all fields are optional by default, so you don't need to add 
this statement.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to