anoopsjohn commented on a change in pull request #479: HBASE-22802 Avoid temp
ByteBuffer allocation in FileIOEngine#read
URL: https://github.com/apache/hbase/pull/479#discussion_r317542843
##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java
##########
@@ -78,6 +79,23 @@ public boolean release() {
return refCnt.release();
}
+ public RefCnt getRefCnt() {
+ return this.refCnt;
+ }
+
+ /**
+ * BucketEntry use this to share refCnt with ByteBuff, so make the method
public here,
+ * the upstream should not use this public method in other place, or the
previous recycler
+ * will be lost.
+ */
+ public void shareRefCnt(RefCnt refCnt, boolean replace) {
Review comment:
In case of File based BC, now we make it to read the cached data into the
pooled BBs. Every read RPC will acquire own BBs and read into. There is
ideally no sharing of BBs across the readers happen at all.. But seems here we
try share the ref count of the BC (File based here) with the RPCs. Little
strange to digest.
----------------------------------------------------------------
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