hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14099) StoreFile.passesKeyRangeFilter need not create Cells from the Scan's start and stop Row
Date Tue, 23 Feb 2016 05:36:18 GMT

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

Appy commented on HBASE-14099:
------------------------------

I was doing some testing when I hit a weird issue, seems related to this, so re-opening it
(apologies in advance if it's not).  Here's the stack trace
{noformat}
java.io.IOException: java.lang.UnsupportedOperationException: Cell is not of type org.apache.hadoop.hbase.SettableSequenceId

	at org.apache.hadoop.hbase.CellUtil.setSequenceId(CellUtil.java:923)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.setCurrentCell(StoreFileScanner.java:231)
	at org.apache.hadoop.hbase.regionserver.StoreFileScanner.requestSeek(StoreFileScanner.java:389)
	at org.apache.hadoop.hbase.regionserver.StoreScanner.seekScanners(StoreScanner.java:348)
	at org.apache.hadoop.hbase.regionserver.StoreScanner.<init>(StoreScanner.java:212)
	at org.apache.hadoop.hbase.regionserver.HStore.createScanner(HStore.java:1873)
	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:1863)
	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.<init>(HRegion.java:5487)
	at org.apache.hadoop.hbase.regionserver.HRegion.instantiateRegionScanner(HRegion.java:2577)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2563)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2544)
	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2534)
	at org.apache.hadoop.hbase.regionserver.HRegion.get(HRegion.java:6659)
	at org.apache.hadoop.hbase.regionserver.HRegion.get(HRegion.java:6624)
	at org.apache.hadoop.hbase.regionserver.TestWithSingleHRegion.test(TestWithSingleHRegion.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
{noformat}

I think it's because of using changing from KeyValue to a different sub-class of {{Cell}}l
which doesn't implement {{SettableSequenceId}}
{noformat}
-    this.startKey = KeyValueUtil.createFirstDeleteFamilyOnRow(scan.getStartRow(),
+    this.startKey = CellUtil.createFirstDeleteFamilyCellOnRow(scan.getStartRow(),
{noformat}

To replicate it, download the attached hfiles somewhere, copy the TestWithSingleHRegion class
to regionserver tests, change the ROOT_DIR appropriately and run it.

> StoreFile.passesKeyRangeFilter need not create Cells from the Scan's start and stop Row
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-14099
>                 URL: https://issues.apache.org/jira/browse/HBASE-14099
>             Project: HBase
>          Issue Type: Improvement
>          Components: Performance, Scanners
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14099.patch, HBASE-14099_1.patch, HBASE-14099_2.patch, HBASE-14099_3.patch,
HBASE-14099_4.patch, storefile.png
>
>
> During profiling saw that the code here in passesKeyRangeFilter in Storefile
> {code}
>   KeyValue smallestScanKeyValue = scan.isReversed() ? KeyValueUtil
>           .createFirstOnRow(scan.getStopRow()) : KeyValueUtil.createFirstOnRow(scan
>           .getStartRow());
>       KeyValue largestScanKeyValue = scan.isReversed() ? KeyValueUtil
>           .createLastOnRow(scan.getStartRow()) : KeyValueUtil.createLastOnRow(scan
>           .getStopRow());
> {code}
> This row need not be copied now considering that we have CellComparator.compareRows(Cell,
byte[]). 
> We have already refactored the firstKeyKv and lastKeyKV as part of other JIRAs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message