MENG DING commented on YARN-3866:

bq. DecreasedContainer.java/IncreasedContainer.java - how about reusing the 
Container.java object?

I wanted to add that currently there is already a 
{{ContainerResourceDecreaseProto}} and {{ContainerResourceDecreaseProto}} field 
in the {{AllocateResponseProto}}, and the initial patch merely renames the 
fields to {{DecreasedContainerProto}} and {{IncreasedContainerProto}}. If we 
reuse the {{ContainerProto}}, we will be modifying the field type in an 
incompatible way, e.g.:

@@ -84,8 +85,8 @@ message AllocateResponseProto {
   optional int32 num_cluster_nodes = 7;
   optional PreemptionMessageProto preempt = 8;
   repeated NMTokenProto nm_tokens = 9;
-  repeated ContainerResourceIncreaseProto increased_containers = 10;
-  repeated ContainerResourceDecreaseProto decreased_containers = 11;
+  repeated ContainerProto increased_containers = 10;
+  repeated ContainerProto decreased_containers = 11;
   optional hadoop.common.TokenProto am_rm_token = 12;

But I think this should not be a problem as these fields are always set to null 
in released versions, so there should be no compatibility issue in practice.

Just want to bring this up and confirm with everyone that this is OK should we 
all agree to reuse the Container object.

> AM-RM protocol changes to support container resizing
> ----------------------------------------------------
>                 Key: YARN-3866
>                 URL: https://issues.apache.org/jira/browse/YARN-3866
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api
>            Reporter: MENG DING
>            Assignee: MENG DING
>         Attachments: YARN-3866.1.patch, YARN-3866.2.patch
> YARN-1447 and YARN-1448 are outdated. 
> This ticket deals with AM-RM Protocol changes to support container resize 
> according to the latest design in YARN-1197.
> 1) Add increase/decrease requests in AllocateRequest
> 2) Get approved increase/decrease requests from RM in AllocateResponse
> 3) Add relevant test cases

This message was sent by Atlassian JIRA

Reply via email to