SzyWilliam commented on code in PR #661:
URL: https://github.com/apache/ratis/pull/661#discussion_r909270048
##########
ratis-server/src/main/java/org/apache/ratis/server/storage/FileChunkReader.java:
##########
@@ -25,14 +26,19 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.file.Path;
+import java.security.DigestInputStream;
+import java.security.MessageDigest;
import java.util.Optional;
/** Read {@link FileChunkProto}s from a file. */
public class FileChunkReader implements Closeable {
private final FileInfo info;
private final Path relativePath;
- private final FileInputStream in;
+ private final InputStream in;
+ private final boolean computeDigest;
Review Comment:
done
##########
ratis-server/src/main/java/org/apache/ratis/server/storage/FileChunkReader.java:
##########
@@ -25,14 +26,19 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.file.Path;
+import java.security.DigestInputStream;
+import java.security.MessageDigest;
import java.util.Optional;
/** Read {@link FileChunkProto}s from a file. */
public class FileChunkReader implements Closeable {
private final FileInfo info;
private final Path relativePath;
- private final FileInputStream in;
+ private final InputStream in;
+ private final boolean computeDigest;
+ private MessageDigest digester;
Review Comment:
done
--
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]