Reidddddd commented on a change in pull request #626: HBASE-23017 Verify the 
file integrity in persistent IOEngine
URL: https://github.com/apache/hbase/pull/626#discussion_r333810056
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
 ##########
 @@ -1131,6 +1142,13 @@ private void verifyCapacityAndClasses(long 
capacitySize, String ioclass, String
   }
 
   private void parsePB(BucketCacheProtos.BucketCacheEntry proto) throws 
IOException {
+    if (proto.hasChecksum()) {
+      ((PersistentIOEngine) 
ioEngine).verifyFileIntegrity(proto.getChecksum().toByteArray(),
+        algorithm);
+    } else {
+      // if has not checksum, it means the persistence file is old format
+      LOG.info("Persistence file is old format, it does not support verifying 
file integrity!");
 
 Review comment:
   Persistent? Adjective instead of noun?

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


With regards,
Apache Git Services

Reply via email to