openinx commented on a change in pull request #467: HBASE-22802 Avoid temp 
ByteBuffer allocation in FileIOEngine#read
URL: https://github.com/apache/hbase/pull/467#discussion_r312765494
 
 

 ##########
 File path: hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java
 ##########
 @@ -475,6 +486,32 @@ public static int channelRead(ReadableByteChannel 
channel, ByteBuffer buf) throw
     return (nBytes > 0) ? nBytes : ret;
   }
 
+  public static int fileRead(FileChannel channel, ByteBuffer buf, long offset)
 
 Review comment:
   Looks like we could make some abstraction between the existed 
channelRead(...)  and the newly introduced fileRead (...) ?  Similar with the 
ByteBufferArray#read & ByteBufferArray#write..  Please take a look.

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