You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/01/08 17:59:40 UTC

[jira] [Updated] (YARN-679) add an entry point that can start any Yarn service

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

Steve Loughran updated YARN-679:
--------------------------------
    Attachment: YARN-679-005.patch

Patch 005. In sync with trunk, use of org.apache.commons.cli complete with all tests passing.

This patch may not seem directly relevant to people, but it is based on the stable launcher code of Slider, and is designed to achieve one thing: provide a robust launcher for any YARN service. That is, if you are a YARN service, this can run you. If you add the right interface, you get the CLI that came in, and a simple exec() method. If not: no special CLI args, but your config is all set up from the -D key=val and --conf configuration file settings.

The launcher has lots of error handling, and anything with an exit code (any {{ExitUtils}} exception or any other exception that implements {{ExitCodeProvider}}, has the exception turned into the exit code of the app. This means a service can return specific failure codes simply by throwing the appropriate exception. Oh, and there's a standard set of exit codes. Based on the slider experience, these approximate the HTTP error codes, so "41" == "401" == unauth; "50" == "500" == service exception. It may seem pointless, but it actually avoids you having to learn some new random exit codes. 

This patch has been around for a while; it's ready to go in. Can someone review it?

> 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.4.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, 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 interrrupt.
> Provide one that takes any classname, and a list of config files/options



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)