anoopsjohn 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_r329435377
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketProtoUtils.java
 ##########
 @@ -41,12 +42,13 @@ private BucketProtoUtils() {
 
   static BucketCacheProtos.BucketCacheEntry toPB(BucketCache cache) {
     return BucketCacheProtos.BucketCacheEntry.newBuilder()
-        .setCacheCapacity(cache.getMaxSize())
-        .setIoClass(cache.ioEngine.getClass().getName())
-        .setMapClass(cache.backingMap.getClass().getName())
-        .putAllDeserializers(CacheableDeserializerIdManager.save())
-        .setBackingMap(BucketProtoUtils.toPB(cache.backingMap))
-        .build();
+      .setCacheCapacity(cache.getMaxSize())
+      .setIoClass(cache.ioEngine.getClass().getName())
+      .setMapClass(cache.backingMap.getClass().getName())
+      .putAllDeserializers(CacheableDeserializerIdManager.save())
+      .setBackingMap(BucketProtoUtils.toPB(cache.backingMap))
+      .setChecksum(ByteString.copyFrom(((PersistentIOEngine) cache.ioEngine).
+        calculateChecksum(cache.getAlgorithm()))).build();
 
 Review comment:
   Ok used here. Fine.  It could be have been just package protected only not 
public?

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