ajothomas commented on code in PR #1712:
URL: https://github.com/apache/samza/pull/1712#discussion_r1801830975
##########
samza-core/src/main/java/org/apache/samza/storage/blobstore/util/BlobStoreUtil.java:
##########
@@ -182,13 +182,13 @@ public CompletableFuture<SnapshotIndex>
getSnapshotIndex(String blobId, Metadata
return FutureUtil.executeAsyncWithRetries(opName, () -> {
ByteArrayOutputStream indexBlobStream = new ByteArrayOutputStream(); //
no need to close ByteArrayOutputStream
return blobStoreManager.get(blobId, indexBlobStream, metadata,
getDeleted).toCompletableFuture()
- .thenApplyAsync(f ->
snapshotIndexSerde.fromBytes(indexBlobStream.toByteArray()), executor)
- .handle((snapshotIndex, ex) -> {
- if (ex != null) {
+ .thenApplyAsync(f -> {
+ try {
+ return
snapshotIndexSerde.fromBytes(indexBlobStream.toByteArray());
+ } catch (Exception ex) {
Review Comment:
Fixed this. Only the exception message needed fixing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]