[
https://issues.apache.org/jira/browse/YARN-4957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15289950#comment-15289950
]
Sean Po commented on YARN-4957:
-------------------------------
Are the classes "@Stable"? the methods are marked "@Unstable"... I am asking as
I am not sure how we should use stable/unstable at the class vs method level.
> Stable and Unstable refers to the Stability of the interface. If we expect
> the interface to change, then it should be annotated Unstable - otherwise,
> annotate it Stable.
Why YARNClient.createReservation() in stead of
YARNClient.createNewReservationId()?
> YarnClient.createReservation because I wanted this API to mirror the
> application API, for consistency. In YarnClient, the method used to create an
> application ID is YarnClient.createApplication.
The submitReservation is idempotent if we submit exactly the same
ReservationDefinition, but will reject if I try to reuse the reservationId with
same Id but a different ReservationDefinition
> That's exactly it. I have updated the error message in the next patch.
In the "ReservationSubmissionResponse" should we retain the ReservationId? I
think might make the implementation on the client easier at times (if multiple
reservations are submitted asynchronsouly or something like that, it helps
retain the info of "who got accepted"). For now invocations are synch, but we
might want to change it later. Thoughts?
> I tend to agree with you, but I think it is better that the Reservation and
> Application APIs are consistent with one another. Currently in
> SubmitApplicationResponse, no ApplicationId is returned to the client.
You have copy and pasted code in TestYarnClient and TestClientRMService,
consider (if possible for packaging etc..) to put this in a shared testbase
class.
> I agree that it a shared test base will be good, but it is broader than this
> JIRA. Perhaps we can create another JIRA for test refactoring.
What do "list" return if I have obtained a ReservationId, but never used it to
submit a reservation?
> List will not return the new ReservationId.
Why in the tests do you use a mock "generateReservationId(int)" instead of
using the createReservation API?
> This is a mistake - will update this in the next patch.
> Add getNewReservation in ApplicationClientProtocol
> --------------------------------------------------
>
> Key: YARN-4957
> URL: https://issues.apache.org/jira/browse/YARN-4957
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: applications, client, resourcemanager
> Affects Versions: 2.8.0
> Reporter: Subru Krishnan
> Assignee: Sean Po
> Labels: api-breaking
> Attachments: YARN-4957.v0.patch, YARN-4957.v1.patch,
> YARN-4957.v2.patch, YARN-4957.v3.patch, YARN-4957.v4.patch,
> YARN-4957.v5.1.patch, YARN-4957.v5.2.patch, YARN-4957.v5.patch
>
>
> Currently submitReservation returns a ReservationId if sucessful. This JIRA
> propose adding a getNewReservation in ApplicationClientProtocol for the
> following reasons:
> * Prevent zombie reservations in the face of client and/or network failures
> post submitReservation
> * Align reservation submission with application submission
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]