Skip to content

Commit 138fc2a

Browse files
authored
Merge pull request apache#29 from passaro/HADOOP-18073-v2/changelog3
Address comments
2 parents 9436ea4 + 1474af7 commit 138fc2a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/aws_sdk_v2_changelog.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,13 @@ in ` multipartUploadEncryptionParameters`.
193193

194194
### GetObject
195195

196-
* Previously, `S3AInputStream` had to keep a reference to the `S3Object` while holding the wrapped
197-
`S3ObjectInputStream`. When upgraded to SDK v2, it can simply wrap new
196+
* Previously, GetObject returned a `S3Object` response which exposed its content in a
197+
`S3ObjectInputStream` through the `getObjectContent()` method. In SDK v2, the response is
198+
directly a `ResponseInputStream<GetObjectResponse>` with the content, while the
199+
`GetObjectResponse` instance can be retrieved by calling `response()` on it.
200+
* The above change simplifies managing the lifetime of the response input stream. In v1,
201+
`S3AInputStream` had to keep a reference to the `S3Object` while holding the wrapped
202+
`S3ObjectInputStream`. When upgraded to SDK v2, it can simply wrap the new
198203
`ResponseInputStream<GetObjectResponse>`, which handles lifetime correctly. Same applies
199204
to `SDKStreamDrainer`. Furthermore, the map in `S3ARemoteObject` associating input streams and
200205
`S3Object` instances is no longer needed.
@@ -228,10 +233,12 @@ In order to adapt the new API in S3A, three new classes have been introduced in
228233
future returned by the select call and wraps the original publisher. This class provides
229234
a `toRecordsInputStream()` method which returns an input stream containing the results,
230235
reproducing the behaviour of the old `SelectRecordsInputStream`.
231-
* `BlockingEnumeration`: an adapter which consumes elements received from a publisher and
236+
* `BlockingEnumeration`: an adapter which lazily requests new elements from the publisher and
232237
exposes them through an `Enumeration` interface. Used in
233238
`SelectEventStreamPublisher.toRecordsInputStream()` to adapt the event publisher into
234239
an enumeration of input streams, eventually passed to a `SequenceInputStream`.
240+
Note that the "lazy" behaviour means that new elements are requested only on `read()` calls on
241+
the input stream.
235242

236243

237244

0 commit comments

Comments
 (0)