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 "Benjamin Teke (Jira)" <ji...@apache.org> on 2020/07/30 17:05:00 UTC

[jira] [Created] (YARN-10379) Refactor ContainerExecutor exit code Exception handling

Benjamin Teke created YARN-10379:
------------------------------------

             Summary: Refactor ContainerExecutor exit code Exception handling
                 Key: YARN-10379
                 URL: https://issues.apache.org/jira/browse/YARN-10379
             Project: Hadoop YARN
          Issue Type: Improvement
          Components: yarn
            Reporter: Benjamin Teke
            Assignee: Benjamin Teke


**Currently every time a shell command is executed and returns with a non-zero exitcode an exception gets thrown. But along the call tree this exception gets catched, after some info/warn logging and other processing steps rethrown, possibly packaged to another exception. For example:
 * from PrivilegedOperationExecutor.executePrivilegedOperation - ExitCodeException catch (as IOException), PrivilegedOperationException thrown
 * then in LinuxContainerExecutor.startLocalizer - PrivilegedOperationException catch, exitCode collection, logging, IOException rethrown
 * then in ResourceLocalizationService.run - generic Exception catch, but there is a TODO for separate ExitCodeException handling, however that information is only present here in an error message string

This flow could be simplified and unified in the different executors. For example use one specific exception till the last possible step, catch it only where it is necessary and keep the exitcode as it could be used later in the process. This change could help with maintainability and readability.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org