anoopsjohn commented on a change in pull request #268: HBASE-22491 Separate the 
heap HFileBlock and offheap HFileBlock because the heap block won't need refCnt 
and save into prevBlocks list before shipping
URL: https://github.com/apache/hbase/pull/268#discussion_r293199674
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
 ##########
 @@ -761,10 +736,16 @@ public long heapSize() {
   }
 
   /**
-   * @return true to indicate the block is allocated from JVM heap, otherwise 
from off-heap.
+   * Will be override by {@link SharedMemHFileBlock} or {@link 
ExclusiveMemHFileBlock}. Return true
+   * by default.
    */
-  boolean isOnHeap() {
-    return buf.hasArray();
+  public boolean isSharedMem() {
 
 Review comment:
   Still we create HFileBlock only in tests? If not we could have left this API 
abstract only and even HFileBlock.  That would have been best. May be in a 
follow up we can do that. Just renaming will be enough. In this jira keep it 
this way only. Fine.

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