sahilTakiar opened a new pull request #690: HADOOP-14747: S3AInputStream to implement CanUnbuffer URL: https://github.com/apache/hadoop/pull/690 [HADOOP-14747](https://issues.apache.org/jira/browse/HADOOP-14747): S3AInputStream to implement CanUnbuffer Change Summary: * Added a contract specification for `CanUnbuffer` to `fsdatainputstream.md` * Unlike most other interfaces the logic for `FSDataInputStream#unbuffer` is a bit different since it delegates to `StreamCapabilitiesPolicy#unbuffer` * The one odd thing I noticed while writing up the contract specification is that the current implementation of `unbuffer` allows callers to invoke `unbuffer` on a closed file without issue; I'm not sure if that was by design or not so for now the specification allows for it and dictates that calling `unbuffer` after `close` is a no-op, but let me know if we think the behavior should be changed * `AbstractContractUnbufferTest` contains the contract tests and I added implementations for HDFS and S3; I don't see contract tests for `CryptoInputStream` so I left it alone * I added S3 specific tests: both unit tests (using mocks) and itests * The actual implementation of `unbuffer` in `S3AInputStream` just calls `closeStream` Testing: * Ran all unit tests and S3 itests against US East (N. Virginia) using `mvn verify` * All tests passed, `ITestS3AContractDistCp` failed once but worked when I retried it * I didn't run the scale tests, or several of the other tests that require additional configuration; let me know if I should run them
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
