New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-16906. Abortable #2684
HADOOP-16906. Abortable #2684
Conversation
c80e45b
to
6daa199
Compare
test run against s3 london; known failures... buffer underfill and a recent s3 change breaking ITestAssumeRole. Both unrelated
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The additional commit looks pretty great. Probably need to fix checkstyle/whitespace complains if they're not false alarms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks really good now. Thanks @steveloughran
Ready to go in once Yetus gives +1.
Strictly then: | ||
|
||
> if `Abortable.abort()` does not raise `UnsupportedOperationException` | ||
> then returns, then it guarantees that the write SHALL NOT become visible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then -> and ?
Thanks @mukund-thakur Had some thoughts over the w/e
The s3a stream abort() does do retries right now, and I think that's probably a mistake for something which is only cleanup and is usually invoked when things are starting to go wrong (e.g. data post/complete). Saying "no retries here", means that we can have a fast abort() rather than a 60-120 second spin before the failure is caught and swallowed. I'll change the relevant bits of s3a abort to Makes sense? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, bar small nit and whitespace/checkstyles fix.
|
||
/** | ||
* Abort any active uploads, enter closed state. | ||
* @return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing Javadoc after @return
8cb92e3
to
af303a1
Compare
…ble output stream to be terminated No meaningful tests have been added, as I have no idea where I can add it, and how s3a has been tested with integration test manner. (Tests in TestS3ABlockOutputStream only check simple things with mocking everything, so can't do some write/upload test with it.)
* markdown spec (really needs outputstream.md in, but...) * stats collected on invocations of abort and multpart uploads -counters and durations * stats of streams propagated to filesystem in abort() * tests use stats to verify what happens * test to verify that aborted stream doesn't delete/overwrite an existing file * tests verify hasCapability("abortable") Change-Id: I104a8e6ca6d16aa9706c411ffae871409ea9ec22 HADOOP-16906. Abortable * Added a result which is used in testing. * added hasPathSupport() in S3A FS, changed capability name to suit * clarified what happens on a closed stream. * declared that cleanup (as opposed to the actual cancel) MUST BE non-retrying, so abort() doesn't spin for a long time in the presence of network failures. * modified S3A BlockOutputStream to not retry. there or in the cleanup in close() Change-Id: I82b8991c99faef8f5ff7d11c3648ac73d6540f85
Change-Id: Iced57b7402649d77cb6dfc243e6fcc80f6448a23
af303a1
to
b5c8163
Compare
💔 -1 overall
This message was automatically generated. |
final bits of style.... |
Change-Id: I258e06b0b9ee4fce15162b57eb7ce4ea7012e485
💔 -1 overall
This message was automatically generated. |
test run failures are all container OOM. As the last run was only to verify style &c -checks which pass, ignoring that and going with success of previous runs |
Change-Id: I78b62ab746ace501f260b9e933004d454b4cbbf3
🎊 +1 overall
This message was automatically generated. |
Finally! Thanks again everyone! |
Adds an Abortable.abort() interface for streams to enable output streams to be terminated; this is implemented by the S3A connector's output stream. It allows for commit protocols to be implemented which commit/abort work by writing to the final destination and using the abort() call to cancel any write which is not intended to be committed. Consult the specification document for information about the interface and its use. Contributed by Jungtaek Lim and Steve Loughran. Change-Id: I7fcc25e9dd8c10ce6c29f383529f3a2642a201ae
Adds an Abortable.abort() interface for streams to enable output streams to be terminated; this is implemented by the S3A connector's output stream. It allows for commit protocols to be implemented which commit/abort work by writing to the final destination and using the abort() call to cancel any write which is not intended to be committed. Consult the specification document for information about the interface and its use. Contributed by Jungtaek Lim and Steve Loughran. Change-Id: Ifcc5a13b07376ebebcc21c7b21f4aed4a84214ac
This is #2667 with an extra commit; my changes
-counters and durations
Testing in progress.