-
Notifications
You must be signed in to change notification settings - Fork 48
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
Code cleanup #34
Code cleanup #34
Conversation
dc52803
to
aebb93e
Compare
06868cb
to
e8f4f13
Compare
@kevin-bates Any other thoughts here? |
87e9a4e
to
4f5654a
Compare
@lresende @kevin-bates I've addressed mentioned things + updated definition of RM to use list of any amount of endpoints for "failover out of the box". |
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.
@dimon222 - thank you for doing this. Its quite a change, but a good one!
I had a few comments and suggestions - primarily wrt to encapsulation and some renaming.
@kevin-bates I applied suggested corrections. Let me know, so I can apply rebase with |
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.
Dmitry - this is an outstanding PR - thank you!
The only comment I have is regarding the deferred raise due to a lack of endpoint. I think I'd prefer to have the raise occur at the point in the code in which the issue needs to be addressed - during construction. But if there are reasons to defer until first use - I'm okay with how it is.
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.
LGTM Dmitry - thank you!
6ad6ca2
to
11937da
Compare
@kevin-bates alright, thanks. I've rebased with |
11937da
to
9b7b47e
Compare
Incorporated hotfix from #37 |
Any plan on this? |
I am good with any direction/feedback @kevin-bates gives towards merging this, otherwise, I have some hard deadlines this week and should be able to get back to this next week. |
Thanks for the ping @dimon222 (and @lresende). I think my biggest concern is that this PR breaks compatibility with existing clients. Enterprise Gateway 2.x caps yarn-api-client to < 0.4, so I think we're good there. However, EG 1.x uses yarn-api-client >= 0.3.3, so users installing or upgrading will break w/o explicit pre-install or downgrade of yarn-api-client. Here's a possible plan:
Any comments, concerns? cc: @dimon222, @IMAM9AIS, @lresende, @toidi, or anyone else watching this repo |
@kevin-bates sounds good, however the decision on #8 (comment) would be useful incase we decide to introduce more breaking changes. Basically - to what extend we plan to support compliance with Hadoop, and do we need to backport/support old apis. Right now we literally have a mix of new and old apis (not good) |
it's ok to introduce backward-incompatible changes usually, apps have pinned version of requirements. hadoop yarn client is not an exception here or I got something wrong? |
Yeah, I agree with a major version bump. Since we have yet to release a major (1.0) version at all, I wasn't sure if this should be that "thing", but perhaps it should. I'm not familiar with the REST API and its version history. @dimon222 - could you please elaborate on what parts of this repo are using different versions of the api? I would hope that the If we wanted to support "legacy" versions, which given (glacial) speed at which organizations move - perhaps we should, then we should come up with a 'contract' for how many back-releases we'd support. If only two, then perhaps a 'legacy' indicator in each constructor is appropriate (to the referenced comment) - or we actually use the version indicator of the URL (if its even applicable). |
Ok. @toidi @dimon222 @lresende - How about this?
Applications that use the former api will need to pin < 1.0, if they haven't already (EG has pinned). I'd be happy to work on these tomorrow (get 1 and 2 done, prepare for 3 - assuming 2 is successful). |
@dimon222 - thanks for the detailed response - these are good points.
Could you elaborate on which endpoints have "unstable/experimental" stage? Regarding compatibility, I think we just need to be sure we follow the REST API docs and, right now, with the exception of the Timeline Service, there is just one version of the REST API - Nearly all of the links you provide are to requests that are not implemented. I don't know the original history behind this project but I think we should treat additional requests on an as needed basis. The project I work on (Enterprise Gateway), requires very few methods from this project, but should we discover others are required, we would certainly contribute their implementations. If there are requests that you need, then by all means, let's be sure and get them in. The issue with adding requests that aren't necessarily needed is that they increase the surface area for test and support and, in the case of the ALPHA requests, are subject to change. Here's what I see as next steps...
Comments, thoughts? |
@kevin-bates I'm good with plan tho. |
Thanks for the quick response. Cool - I was thinking it was the YARN ALPHAs you were referring to, but wanted to make sure it wasn't anything of ours. Great. I'll produce |
Closed in favor of #43 |
To address #33, #19 and remove now unnecessary kerberos variables. Any kind of auth (HTTPKerberosAuth, HTTPSPNEGOAuth, basic auth, etc) can be directly passed to auth in constructor of necessary app context. Another good thing is now we get session instead of atomic calls. That would eliminate unnecessary additional handshakes for kerberos.
In this sense example with typical HTTPKerberosAuth:
Same/similar logic for any requests supported module for auth. GSSAPI is one of the most flexible.