jhungund commented on code in PR #6183:
URL: https://github.com/apache/hbase/pull/6183#discussion_r1736157849


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java:
##########
@@ -1511,6 +1629,71 @@ private void parsePB(BucketCacheProtos.BucketCacheEntry 
proto) throws IOExceptio
     verifyCapacityAndClasses(proto.getCacheCapacity(), proto.getIoClass(), 
proto.getMapClass());
   }
 
+  private void persistChunkedBackingMap(FileOutputStream fos) throws 
IOException {
+    fos.write(PB_MAGIC_V2);
+    int backingMapSize = backingMap.size();
+    long numChunks = backingMap.size() / persistenceChunkSize;
+    if (backingMap.size() % persistenceChunkSize != 0) {
+      numChunks += 1;
+    }
+
+    LOG.debug("persistToFile: before persisting backing map size: {}, "
+        + "fullycachedFiles size: {}, chunkSize: {}, numberofChunks: {}",
+      backingMap.size(), fullyCachedFiles.size(), persistenceChunkSize, 
numChunks);
+
+    fos.write(convertToBytes(persistenceChunkSize));
+    fos.write(convertToBytes(numChunks));
+
+    int blockCount = 0;
+    int chunkCount = 0;
+
+    BucketCacheProtos.BackingMap.Builder builder = 
BucketCacheProtos.BackingMap.newBuilder();

Review Comment:
   ack!



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

Reply via email to