[
https://issues.apache.org/jira/browse/HBASE-12827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270541#comment-14270541
]
Hadoop QA commented on HBASE-12827:
-----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12691037/ClientSmallScanner.java.patch
against master branch at commit 4bfd35aabc83b007871fe9a8537cd5ac9cd84500.
ATTACHMENT ID: 12691037
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:red}-1 tests included{color}. The patch doesn't appear to include
any new or modified tests.
Please justify why no new tests are needed for this
patch.
Also please list what manual steps were performed to
verify this patch.
{color:red}-1 patch{color}. The patch command could not apply the patch.
Console output:
https://builds.apache.org/job/PreCommit-HBASE-Build/12380//console
This message is automatically generated.
> set rowOffsetPerColumnFamily on ClientSmallScanner if lastResult is not null.
> -----------------------------------------------------------------------------
>
> Key: HBASE-12827
> URL: https://issues.apache.org/jira/browse/HBASE-12827
> Project: HBase
> Issue Type: Bug
> Components: Client, hbase, Scanners
> Reporter: Toshimasa NASU
> Attachments: ClientSmallScanner.java.patch
>
>
> When you use the ClientSmallScanner, same Result has been acquired. And will
> be infinite loop.
> Cause to occur if you iterations beyond the (batch size * caching size) of
> Scan.
> Solution I think would be to correctly set the rowOffsetPerColumnFamily.
> I can be resolved by the following patch work.
> https://github.com/toshimasa-nasu/hbase/commit/2c35914624d3494c79114926d35fc886c9a235ec
> {code}
> // When fetching results from server, skip the first result if it has the
> same
> // row with this one
> private byte[] skipRowOfFirstResult = null;
> + private boolean alreadyGetRowOfFirstResult = false;
> + private int nextRowOffsetPerColumnFamily = 0;
>
> /**
> * Create a new ClientSmallScanner for the specified table. An HConnection
> @@ -142,10 +144,19 @@ private boolean nextScanner(int nbRows, final boolean
> done,
> LOG.debug("Finished with region " + this.currentRegion);
> }
> } else if (this.lastResult != null) {
> + if (alreadyGetRowOfFirstResult) {
> + nextRowOffsetPerColumnFamily += (this.scan.getBatch() *
> this.caching);
> + } else {
> + nextRowOffsetPerColumnFamily = (this.scan.getBatch() * (this.caching
> - 1));
> + }
> + this.scan.setRowOffsetPerColumnFamily(nextRowOffsetPerColumnFamily);
> + alreadyGetRowOfFirstResult = true;
> localStartKey = this.lastResult.getRow();
> skipRowOfFirstResult = this.lastResult.getRow();
> cacheNum++;
> } else {
> + alreadyGetRowOfFirstResult = false;
> + nextRowOffsetPerColumnFamily = 0;
> localStartKey = this.scan.getStartRow();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)