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

Zheng Hu commented on HBASE-21750:
----------------------------------

The failed ut is indeed a problem,  let me fix this. 
{code}
java.lang.IllegalArgumentException: Some redundant bytes in KeyValue's buffer, 
startOffset=33, endOffset=36, 
KeyValueBytesHex=\x00\x00\x00\x17\x00\x00\x00\x00\x00\x03row\x03famqual1\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x04\x00\x00\x00\x00\x00,
 offset=0, length=36

        at 
org.apache.hadoop.hbase.KeyValueUtil.checkKeyValueBytes(KeyValueUtil.java:635)
        at org.apache.hadoop.hbase.KeyValue.<init>(KeyValue.java:344)
        at 
org.apache.hadoop.hbase.KeyValueUtil.copyToNewKeyValue(KeyValueUtil.java:94)
        at 
org.apache.hadoop.hbase.KeyValueUtil.ensureKeyValue(KeyValueUtil.java:478)
        at 
org.apache.hadoop.hbase.filter.TestFilterList.testTransformMPO(TestFilterList.java:582)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.lang.Thread.run(Thread.java:745)
{code}

> Most of KeyValueUtil#length can be replaced by cell#getSerializedSize for 
> better performance because the latter one has been optimized
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-21750
>                 URL: https://issues.apache.org/jira/browse/HBASE-21750
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0
>
>         Attachments: HBASE-21750.v1.patch, HBASE-21750.v1.patch
>
>
> After HBASE-21657, Most subclass of Cell has a cached serialized size (Except 
> those cells with tags), so I think most of the KeyValueUtil#length can be 
> replaced by cell#getSerializedSize. Such as: 
> - KeyValueUtil.length in StoreFlusher#performFlush;
> - KeyValueUtil.length in Compactor#performCompaction ; 
> and so on..
> Will prepare a patch for this.



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

Reply via email to