[
https://issues.apache.org/jira/browse/YARN-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436945#comment-15436945
]
Daniel Templeton commented on YARN-679:
---------------------------------------
[~steve_l], I'll take a better look when I get a chance. I just took a quick
look and found these two items:
{code}
private ServiceStateException(int exitCode,
String message,
Throwable cause) {
super(message, cause);
this.exitCode = (cause instanceof ExitCodeProvider)?
(((ExitCodeProvider) cause).getExitCode())
: exitCode;
}
{code}
I think this is backwards. If I'm giving you an exit code, I expect you to use
it. We should only default to the cause's code when we aren't given one.
{code}
@Override
public Configuration bindArgs(Configuration config, List<String> args) throws
Exception {
if (LOG.isDebugEnabled()) {
LOG.debug("Service {} passed in {} arguments:", getName(), args.size());
for (String arg : args) {
LOG.debug(arg);
}
}
return config;
}
{code}
Rather than logging each arg bare and independent, it would be better to either
build them into a string and attach it to the main log line, or at the very
least log each one with a header or some kind. Just having args spit out with
a time stamp and DEBUG in front of them could be confusing.
I didn't make it very far into the code, so I wouldn't go posting another patch
just yet. I'll try to finish the review in the near future.
> add an entry point that can start any Yarn service
> --------------------------------------------------
>
> Key: YARN-679
> URL: https://issues.apache.org/jira/browse/YARN-679
> Project: Hadoop YARN
> Issue Type: New Feature
> Components: api
> Affects Versions: 2.8.0
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Attachments: YARN-679-001.patch, YARN-679-002.patch,
> YARN-679-002.patch, YARN-679-003.patch, YARN-679-004.patch,
> YARN-679-005.patch, YARN-679-006.patch, YARN-679-007.patch,
> YARN-679-008.patch, YARN-679-009.patch, YARN-679-010.patch,
> YARN-679-011.patch, org.apache.hadoop.servic...mon 3.0.0-SNAPSHOT API).pdf
>
> Time Spent: 72h
> Remaining Estimate: 0h
>
> There's no need to write separate .main classes for every Yarn service, given
> that the startup mechanism should be identical: create, init, start, wait for
> stopped -with an interrupt handler to trigger a clean shutdown on a control-c
> interrupt.
> Provide one that takes any classname, and a list of config files/options
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]