rdblue commented on a change in pull request #3813:
URL: https://github.com/apache/iceberg/pull/3813#discussion_r789132412
##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java
##########
@@ -178,7 +208,13 @@ private void newStream() throws IOException {
createStagingDirectoryIfNotExists();
currentStagingFile = File.createTempFile("s3fileio-", ".tmp",
stagingDirectory);
currentStagingFile.deleteOnExit();
- stagingFiles.add(currentStagingFile);
+ try {
+ currentPartMessageDigest = isEtagCheckEnabled ?
MessageDigest.getInstance(digestAlgorithm) : null;
+ } catch (NoSuchAlgorithmException e) {
+ throw new IOException(e);
Review comment:
We don't want to change the signature, but we also don't want to throw
some exception just because it was convenient. The best thing to do is to wrap
in RuntimeException, which avoids throwing a misleading exception class.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]