-
Notifications
You must be signed in to change notification settings - Fork 392
[CELEBORN-1984] Merge ResourceRequest to transportMessageProtobuf #3231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@FMX plz help review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this PR needs more content. How about using resource requests from the moved transport message protobuf and adding some tests to verify that there is nothing unexpected?
Got it. I will add some unit tests to verify it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protobuf relies on the index of fields instead of the field names and structure names, which means that you can safely rename structure names.
@@ -454,6 +454,14 @@ message PbApplicationLostResponse { | |||
int32 status = 1; | |||
} | |||
|
|||
message HeartbeatInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protobuf structures don't need to be defined before being used. All structures in the transport message have a common prefix "Pb". So I think this structure can be placed with all structures ported from the resources proto.
@@ -906,3 +915,102 @@ message PbPushMergedDataSplitPartitionInfo { | |||
message PbChunkOffsets { | |||
repeated int64 chunkOffset = 1; | |||
} | |||
|
|||
enum Type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its name shall be PbMetaRequestType.
ReviseLostShuffles = 29; | ||
} | ||
|
||
message ResourceRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure name can follow the Pb prefix to avoid misunderstanding in the Java or Scala code base.
optional PbReviseLostShuffles reviseLostShufflesRequest = 102; | ||
} | ||
|
||
message RequestSlotsRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name.
map<string, PbSlotInfo> workerAllocations = 3; | ||
} | ||
|
||
message AppHeartbeatRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name.
HeartbeatInfo heartbeatInfo = 7; | ||
} | ||
|
||
message WorkerExcludeRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name.
repeated WorkerAddress workersToRemove = 2; | ||
} | ||
|
||
message WorkerAddress { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name.
int32 internalPort = 6; | ||
} | ||
|
||
enum Status { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be PbMetaRequestStatus.
INTERNAL_ERROR= 2; | ||
} | ||
|
||
message ResourceResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be PbMetaRequestResponse.
@@ -91,6 +92,44 @@ public void testRunCommand() { | |||
Assert.assertTrue(response.getSuccess()); | |||
} | |||
|
|||
@Test | |||
public void testRunCommandByTransportMessage() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to test the mixed protobuf message requests.
5590ef0
to
0dffcf6
Compare
What changes were proposed in this pull request?
as title
Why are the changes needed?
Merge Resource.proto into TransportMessages.proto as per the below design
https://cwiki.apache.org/confluence/display/CELEBORN/CIP-16+Merge+transport+proto+and+resource+proto+files
Does this PR introduce any user-facing change?
How was this patch tested?