[ 
https://issues.apache.org/jira/browse/YARN-6593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantinos Karanasos updated YARN-6593:
-----------------------------------------
    Attachment: YARN-6593.002.patch

Adding new version of the patch.

I added new methods to all classes to make the creation of constraints simpler. 
Please give it a look. Whenever we had too many fields, I introduced a Builder 
inner class. In the rest, I just added new static methods for building 
constraints.
Also, I did not coalesce the simple and compound constraints, I feel it will 
make the proto too complicated, and will allow users to create objects that 
don't make sense. I had an offline chat with [~chris.douglas] and [~curino], 
and they were not supportive of unifying the protos (it will allow a compound 
constraint to be child of a simple constraint). Further, subclassing the 
classes without having support of the protobufs will also lead to complications.
The only downside of this approach I can see, is that we will have the 
intermediate {{PlacementConstraint}} objects when creating very complex 
CompoundConstraints. I think with the new methods I added, it will be easy to 
write such constraints. If we want to further simplify the creation, we could 
also bring the object creation methods from the Simple and Compound Constraints 
to the PlacementConstraint, but not sure it's worth doing yet. We can add those 
methods later if there is indeed need for them in practice. Let me know what 
you think.

I also introduced a {{PlacementDelayConf}} object that includes all fields 
related to the DELAYED_OR configuration. 

I did not add yet the tests in the {{TestPBRecordImpl}} -- will do so when we 
finalize the rest.

> [API] Introduce Placement Constraint object
> -------------------------------------------
>
>                 Key: YARN-6593
>                 URL: https://issues.apache.org/jira/browse/YARN-6593
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Konstantinos Karanasos
>            Assignee: Konstantinos Karanasos
>         Attachments: YARN-6593.001.patch, YARN-6593.002.patch
>
>
> This JIRA introduces an object for defining placement constraints.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to