[ 
https://issues.apache.org/jira/browse/HBASE-21917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770925#comment-16770925
 ] 

Zheng Hu commented on HBASE-21917:
----------------------------------

Oh, our default bytesPerChecksum is 16KB.  while there's no ByteBuffer 
update(..) inteface for java.util.zip.Checksum, which means we still need to 
allocate an 16KB on-heap byte[] to validate the checksum.  FYI [~stack], 
[~anoop.hbase], [~ram_krish]
{code}
  public static int getBytesPerChecksum(Configuration conf) {
    return conf.getInt(HConstants.BYTES_PER_CHECKSUM,
                       HFile.DEFAULT_BYTES_PER_CHECKSUM);
  }
{code}

> Make the HFileBlock#validateChecksum can accept ByteBuff as an input.
> ---------------------------------------------------------------------
>
>                 Key: HBASE-21917
>                 URL: https://issues.apache.org/jira/browse/HBASE-21917
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>            Priority: Major
>
> I've tried to make a patch for HBASE-21879, most of work seems to be fine, 
> but the trouble is: 
> HFileBlock#validateChecksum can only accept ByteBuffer as its input, while 
> after the HBASE-21916, we will use an ourself-defined ByteBuff (which can be 
> SingleByteBuff or MultiByteBuff). 
> Now, need to create our own ByteBuff checksum validation method, should not 
> be so hard but an separate issue will be more clearer.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to