[
https://issues.apache.org/jira/browse/HADOOP-13600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702172#comment-15702172
]
ASF GitHub Bot commented on HADOOP-13600:
-----------------------------------------
Github user steveloughran commented on a diff in the pull request:
https://github.com/apache/hadoop/pull/157#discussion_r89797606
--- Diff:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
---
@@ -2288,4 +2316,35 @@ public String toString() {
}
}
+ /**
+ * A {@link ProgressListener} for renames. When the transfer completes,
the listener will delete the source key and
+ * update any relevant statistics.
+ */
+ private class RenameProgressListener implements ProgressListener {
+
+ private final S3AFileStatus srcStatus;
+
+ private RenameProgressListener(S3AFileStatus srcStatus) {
+ this.srcStatus = srcStatus;
+ }
+
+ @Override
+ public void progressChanged(ProgressEvent progressEvent) {
+ switch (progressEvent.getEventType()) {
+ case TRANSFER_PART_COMPLETED_EVENT:
+ incrementWriteOperations();
+ break;
+ case TRANSFER_COMPLETED_EVENT:
+ try {
+ innerDelete(srcStatus, false);
--- End diff --
if we add some threads for low priority delete/create calls, then this can
be done in the background. It'd also change how failures are handed: delete
won't fail; no need to catch IOEs or AmazonClientExceptions. However, I'd pool
the delete operations to avoid throttling problems
> S3a rename() to copy files in a directory in parallel
> -----------------------------------------------------
>
> Key: HADOOP-13600
> URL: https://issues.apache.org/jira/browse/HADOOP-13600
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 2.7.3
> Reporter: Steve Loughran
> Assignee: Steve Loughran
>
> Currently a directory rename does a one-by-one copy, making the request
> O(files * data). If the copy operations were launched in parallel, the
> duration of the copy may be reducable to the duration of the longest copy.
> For a directory with many files, this will be significant
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]