Skip to content

[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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zhaohehuhu
Copy link
Contributor

@zhaohehuhu zhaohehuhu commented Apr 25, 2025

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?

@zhaohehuhu
Copy link
Contributor Author

@FMX plz help review

@FMX FMX changed the title Merge Resource.proto into TransportMessages.proto [CELEBORN-1984] Merge Resource.proto into TransportMessages.proto Apr 27, 2025
@FMX FMX changed the title [CELEBORN-1984] Merge Resource.proto into TransportMessages.proto [CELEBORN-1984] Merge ResourceRequest to transportMessageProtobuf Apr 27, 2025
Copy link
Contributor

@FMX FMX left a 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?

@zhaohehuhu
Copy link
Contributor Author

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.

Copy link
Contributor

@FMX FMX left a 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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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() {
Copy link
Contributor

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.

@SteNicholas SteNicholas force-pushed the main branch 2 times, most recently from 5590ef0 to 0dffcf6 Compare May 26, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants