[ https://issues.apache.org/jira/browse/HADOOP-15281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16742359#comment-16742359 ]
Steve Loughran commented on HADOOP-15281: ----------------------------------------- I think I'd prefer it as an option (painful as it is to pass down), rather than something trying be clever with the schema of the dest FS. * supports many other object stores where rename may be mimicked expensively (even the Azure ones can be slow sometimes) * easy to test on the local FS * lets people who bind "s3://" to the S3A implementation to use this (its done as a way to move off EMR) * avoids having some special S3A-only secret hidden in distcp Sorry, I know this is harder work, but its for the best > Distcp to add no-rename copy option > ----------------------------------- > > Key: HADOOP-15281 > URL: https://issues.apache.org/jira/browse/HADOOP-15281 > Project: Hadoop Common > Issue Type: Improvement > Components: tools/distcp > Affects Versions: 3.0.0 > Reporter: Steve Loughran > Priority: Major > > Currently Distcp uploads a file by two strategies > # append parts > # copy to temp then rename > option 2 executes the following sequence in {{promoteTmpToTarget}} > {code} > if ((fs.exists(target) && !fs.delete(target, false)) > || (!fs.exists(target.getParent()) && !fs.mkdirs(target.getParent())) > || !fs.rename(tmpTarget, target)) { > throw new IOException("Failed to promote tmp-file:" + tmpTarget > + " to: " + target); > } > {code} > For any object store, that's a lot of HTTP requests; for S3A you are looking > at 12+ requests and an O(data) copy call. > This is not a good upload strategy for any store which manifests its output > atomically at the end of the write(). > Proposed: add a switch to write direct to the dest path. either a conf option > or a CLI option -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org