rdblue commented on a change in pull request #3813:
URL: https://github.com/apache/iceberg/pull/3813#discussion_r789822658



##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java
##########
@@ -360,4 +416,28 @@ protected void finalize() throws Throwable {
       LOG.warn("Unclosed output stream created by:\n\t{}", trace);
     }
   }
+
+  private static class FileAndDigest {
+    private final File file;
+    private byte[] digest;
+    private boolean isDigestSet = false;
+
+    FileAndDigest(File file) {
+      this.file = file;
+    }
+
+    File file() {
+      return file;
+    }
+
+    void setDigest(byte[] digest) {

Review comment:
       In that case, I think it is a reason to go back to storing the digest. I 
didn't realize that the digest was getting updated after creating this. Seems 
like there should be a cleaner way where we update the digest and create an 
immutable object when the file is closed.




-- 
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]

Reply via email to