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_r317545409
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/CompositeRefCnt.java
 ##########
 @@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.nio;
+
+import java.util.Optional;
+import org.apache.yetus.audience.InterfaceAudience;
+import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+import org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted;
+
+/**
+ * The CompositeRefCnt is mainly used by exclusive memory HFileBlock, it has a 
innerRefCnt
+ * to share with BucketEntry, in order to summarize the number of RPC 
requests. So when
+ * BucketCache#freeEntireBuckets is called, will not violate the LRU policy.
+ * <p>
+ * And it has its own refCnt & Recycler, Once the cells shipped to client, 
then both the
+ * Cacheable#refCnt & BucketEntry#refCnt will be decreased. when Cacheable's 
refCnt decrease
 
 Review comment:
   This means when say 2 read RPCs access a block from File based BC, that 
entry can NOT get evicted unless both these RPCs are over? 

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