You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/06/29 07:05:17 UTC
[GitHub] [ratis] SzyWilliam commented on a diff in pull request #661: RATIS-1597. Compute MD5 during snapshot streaming
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org