amahussein commented on a change in pull request #2501:
URL: https://github.com/apache/hadoop/pull/2501#discussion_r533502898



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileChecksum.java
##########
@@ -220,7 +217,7 @@ public void testStripedAndReplicatedFileChecksum() throws 
Exception {
     FileChecksum replicatedFileChecksum = getFileChecksum(replicatedFile,
         10, false);
 
-    if (expectComparableStripedAndReplicatedFiles()) {
+    if (expectComparableStripedAndReplicatedFiles) {

Review comment:
       We could keep the methods which returns the `isCompositeCRC` flag. This 
will reduce the diff and make the implementation flexible and maintainable for 
future changes.

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileChecksum.java
##########
@@ -77,6 +81,31 @@
   private String stripedFile2 = ecDir + "/stripedFileChecksum2";
   private String replicatedFile = "/replicatedFileChecksum";
 
+  private String checksumCombineMode;
+  private boolean expectComparableStripedAndReplicatedFiles;
+  private boolean expectComparableDifferentBlockSizeReplicatedFiles;

Review comment:
       Do we need three boolean fields? It seems that the three booleans have 
the same value.
   Maybe we should simplify the implementation by replacing the three fields by 
a single field (i.e., `isCompositeCRC`)




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

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