[
https://issues.apache.org/jira/browse/HADOOP-8146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223988#comment-13223988
]
Uma Maheswara Rao G commented on HADOOP-8146:
---------------------------------------------
Hi Daryn,
It make sense to handle interrupt exceptions as you mentioned it is creating
problem with recursive operations.
I reviewed your patch, few comments.
1) Instead of hardcoding return codes, why can't we create some enum with
exitcodes for more readability?
something like this
{code}
enum ExitCodes {
SUCCESS(0), ERROR(1), INTERRUPT(130);
private int exitCode;
private ExitCodes(int exitCode) {
this.exitCode = exitCode;
}
public int getValue() {
return this.exitCode;
}
}
{code}
2) Could you please add a test with recursive operations by extending some
existing command class and put your counter for testing and register that
command. what do you say?
> FsShell commands cannot be interrupted
> --------------------------------------
>
> Key: HADOOP-8146
> URL: https://issues.apache.org/jira/browse/HADOOP-8146
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0, 0.24.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-8146.patch
>
>
> Control-c is apparently generating {{InterruptedIOExceptions}}. The path
> processing loop traps {{IOException}}, displays the error, and moves to the
> next path. This means that recursive operations cannot be aborted.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira