Skip to content
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

(CDAP-7420) Program lifecycle impersonation #6931

Merged

Conversation

chtyim
Copy link
Contributor

@chtyim chtyim commented Oct 11, 2016

Refactor the ProgramRuntimeService and wrap the TwillController to minimize places that need to be aware of impersonation

} catch (Exception e) {
return null;
}
}

@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it actually ever return null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the logic, it's possible. And the caller also checks for it, hence I add the annotation to be clear.

YarnApplicationReport report = processController.getReport();
String host = report.getHost();
int port = report.getRpcPort();
if (host == null || host.equals("N/A") || port == -1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should LOG#warn in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@anwar6953
Copy link
Contributor

@anwar6953
Copy link
Contributor

LGTM; tested on cluster. Squashing commits.

Refactor the ProgramRuntimeService and wrap the TwillController to minimize places that need to be aware of impersonation
@anwar6953 anwar6953 force-pushed the feature/CDAP-7420-program-lifecycle-impersonation branch from f6908ee to b7ba023 Compare October 12, 2016 04:25
@anwar6953
Copy link
Contributor

Build green; merging

@anwar6953 anwar6953 merged commit 6421098 into release/3.5 Oct 12, 2016
@anwar6953 anwar6953 deleted the feature/CDAP-7420-program-lifecycle-impersonation branch October 12, 2016 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants