You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "lifulong (JIRA)" <ji...@apache.org> on 2019/07/25 11:43:00 UTC

[jira] [Commented] (HADOOP-16462) distcp should throw exception other than -999 error code while the exception is not classify, for us to know the real reason it failed

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

lifulong commented on HADOOP-16462:
-----------------------------------

i have interest in submit one patch for this issue, how can i do it?

> distcp should throw exception other than -999 error code while the exception is not classify, for us to know the real reason it failed 
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-16462
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16462
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools/distcp
>    Affects Versions: 3.1.1
>         Environment: {code:java}
> // code placeholder
> @Override
> 	public int run(String[] argv) {
> 	if (argv.length < 1) {
> 	OptionsParser.usage();
> 	return DistCpConstants.INVALID_ARGUMENT;
> 	}
> 	
> 	try {
> 	context = new DistCpContext(OptionsParser.parse(argv));
> 	checkSplitLargeFile();
> 	setTargetPathExists();
> 	LOG.info("Input Options: " + context);
> 	} catch (Throwable e) {
> 	LOG.error("Invalid arguments: ", e);
> 	System.err.println("Invalid arguments: " + e.getMessage());
> 	OptionsParser.usage();
> 	return DistCpConstants.INVALID_ARGUMENT;
> 	}
> 	
> 	try {
> 	execute();
> 	} catch (InvalidInputException e) {
> 	LOG.error("Invalid input: ", e);
> 	return DistCpConstants.INVALID_ARGUMENT;
> 	} catch (DuplicateFileException e) {
> 	LOG.error("Duplicate files in input path: ", e);
> 	return DistCpConstants.DUPLICATE_INPUT;
> 	} catch (AclsNotSupportedException e) {
> 	LOG.error("ACLs not supported on at least one file system: ", e);
> 	return DistCpConstants.ACLS_NOT_SUPPORTED;
> 	} catch (XAttrsNotSupportedException e) {
> 	LOG.error("XAttrs not supported on at least one file system: ", e);
> 	return DistCpConstants.XATTRS_NOT_SUPPORTED;
> 	} catch (Exception e) {
> 	LOG.error("Exception encountered ", e);
> 	return DistCpConstants.UNKNOWN_ERROR;
> 	}
> 	return DistCpConstants.SUCCESS;
> 	}
> {code}
>  
> distcp run method should throw exception other than -999 error code while the exception is not classify, for us to know the real reason it failed 
>            Reporter: lifulong
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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