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_r292750565
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
 ##########
 @@ -763,7 +738,7 @@ public long heapSize() {
   /**
    * @return true to indicate the block is allocated from JVM heap, otherwise 
from off-heap.
    */
-  boolean isOnHeap() {
+  public boolean isOnHeap() {
     return buf.hasArray();
 
 Review comment:
   >Think about this again, lots of UT use the HFileBlock with heap buf , if 
just return false here, I guess those UT will be failure.... so plan to keep 
this.
   >
   Then why cant you just do the reverse way?  HFileBlock will be on heap one. 
So the UTs also dont need any change.  We will have an extension to it. Name it 
like SharedMemHFileBlock or OffheapHFileBlock (I prefer the former).  This will 
look a bit strange here where the HFileBlock as such is not telling whether it 
is on heap or off heap and we have a On heap specific extended class again!  

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