[ 
https://issues.apache.org/jira/browse/YARN-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039734#comment-18039734
 ] 

ASF GitHub Bot commented on YARN-9532:
--------------------------------------

github-actions[bot] commented on PR #3709:
URL: https://github.com/apache/hadoop/pull/3709#issuecomment-3560755970

   We're closing this stale PR because it has been open for 100 days with no 
activity. This isn't a judgement on the merit of the PR in any way. It's just a 
way of keeping the PR queue manageable.
   If you feel like this was a mistake, or you would like to continue working 
on it, please feel free to re-open it and ask for a committer to remove the 
stale tag and review again.
   Thanks all for your contribution.




> SLSRunner.run() throws a YarnException when it fails to create the output 
> directory
> -----------------------------------------------------------------------------------
>
>                 Key: YARN-9532
>                 URL: https://issues.apache.org/jira/browse/YARN-9532
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Haicheng Chen
>            Assignee: Minni Mittal
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Dear YARN developers, we are developing a tool to detect exception-related 
> bugs in Java. Our prototype has spotted the following {{throw}} statement 
> whose exception class and error message indicate different error conditions.
>  
> Version: Hadoop-3.1.2
> File: 
> HADOOP-ROOT/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
> Line: 894
> {code:java}
> if (!outputFile.exists() && !outputFile.mkdirs()) {
>   System.err.println("ERROR: Cannot create output directory "
>       + outputFile.getAbsolutePath());
>   throw new YarnException("Cannot create output directory");
> }{code}
>  
> The exception is triggered when {{run()}} fails to create the output 
> directory (as indicated by the {{if}} condition and the error message). 
> However, throwing a {{YarnException}} is too general and makes accurate 
> exception handling more difficult. Since the error is related to I/O, 
> throwing an {{IOException}}, or wrapping an {{IOException}} could be better.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to