[
https://issues.apache.org/jira/browse/HADOOP-16906?focusedWorklogId=550569&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-550569
]
ASF GitHub Bot logged work on HADOOP-16906:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/21 05:06
Start Date: 10/Feb/21 05:06
Worklog Time Spent: 10m
Work Description: mehakmeet commented on a change in pull request #2684:
URL: https://github.com/apache/hadoop/pull/2684#discussion_r573451240
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3ABlockOutputStream.java
##########
@@ -420,15 +427,95 @@ public void close() throws IOException {
writeOperationHelper.writeFailed(ioe);
throw ioe;
} finally {
- cleanupWithLogger(LOG, block, blockFactory);
- LOG.debug("Statistics: {}", statistics);
- cleanupWithLogger(LOG, statistics);
- clearActiveBlock();
+ cleanupOnClose();
}
// Note end of write. This does not change the state of the remote FS.
writeOperationHelper.writeSuccessful(bytes);
}
+ /**
+ * Final operations in close/abort of stream.
+ * Shuts down block factory, closes any active block,
+ * and pushes out statistics.
+ */
+ private void cleanupOnClose() {
+ cleanupWithLogger(LOG, getActiveBlock(), blockFactory);
+ LOG.debug("Statistics: {}", statistics);
+ cleanupWithLogger(LOG, statistics);
+ clearActiveBlock();
+ }
+
+ /**
+ * Abort any active uploads, enter closed state.
+ * @return
Review comment:
missing Javadoc after ```@return```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 550569)
Time Spent: 4h 50m (was: 4h 40m)
> Add some Abortable.abort() interface for streams etc which can be terminated
> ----------------------------------------------------------------------------
>
> Key: HADOOP-16906
> URL: https://issues.apache.org/jira/browse/HADOOP-16906
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs, fs/azure, fs/s3
> Affects Versions: 3.3.0
> Reporter: Steve Loughran
> Assignee: Jungtaek Lim
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
> Some IO we want to be able to abort rather than close cleanly, especially if
> the inner stream is an HTTP connection which itself supports some abort()
> method. For example: uploads to an object where we want to cancel the upload
> without close() making an incomplete write visible.
> Proposed: Add a generic interface which things like streams can implement
> {code}
> AbortableIO {
> public void abortIO() throws IOE;
> }
> {code}
> +do for s3a output stream. I wouldn't do this a passthrough on
> FSDataOutputStream because we need to consider what expectations callers have
> of an operation being "aborted"
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]