You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "LN (JIRA)" <ji...@apache.org> on 2008/06/14 10:13:45 UTC
[jira] Created: (HBASE-686) memcache.getScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
memcache.getScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
---------------------------------------------------------------------------------------------------------
Key: HBASE-686
URL: https://issues.apache.org/jira/browse/HBASE-686
Project: Hadoop HBase
Issue Type: Bug
Affects Versions: 0.1.2
Reporter: LN
HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "LN (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
LN reopened HBASE-686:
----------------------
i can't understand why this issue resolved as CR in 9 hours(before i wake up:-). i HAVE post my testcase when opening this issue, with clearly piont out it is part of TestHMemcache.java, which is the 0.1.2 test source about memcache.
and, the mistake in the source should be wrong iteration control, as i commented in the issue description.
junit result here:
Testsuite: org.apache.hadoop.hbase.TestHMemcache
Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 0.22 sec
Testcase: testSnapshotting took 0.16 sec
Testcase: testGetFull took 0.01 sec
Testcase: testGetNextRow took 0.01 sec
Testcase: testGetClosest took 0 sec
Testcase: testScanner_686 took 0.01 sec
FAILED
Row name
junit.framework.AssertionFailedError: Row name
at org.apache.hadoop.hbase.TestHMemcache.testScanner_686(TestHMemcache.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Testcase: testScanner took 0.01 sec
Testcase: testGetRowKeyAtOrBefore took 0.02 sec
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) memcache.getScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "LN (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605048#action_12605048 ]
LN commented on HBASE-686:
--------------------------
a testcase for this issue, i add this to TestHMemcache.java for reproduce and validating my patch.
/**
* Test memcache scanner scanning cached rows, see HBASE-686
* @throws IOException
*/
public void testScanner_686() throws IOException
{
addRows(this.hmemcache);
long timestamp = System.currentTimeMillis();
Text[] cols = new Text[COLUMNS_COUNT * ROW_COUNT];
for (int i = 0; i < ROW_COUNT; i++)
{
for (int ii = 0; ii < COLUMNS_COUNT; ii++)
{
cols[(ii + (i * COLUMNS_COUNT))] = getColumnName(i, ii);
}
}
//starting from each row, validate results should contain the starting row
for (int startRowId = 0; startRowId < ROW_COUNT; startRowId++)
{
HInternalScannerInterface scanner =
this.hmemcache.getScanner(timestamp, cols
, new Text(getRowName(startRowId)));
HStoreKey key = new HStoreKey();
TreeMap<Text, byte[]> results = new TreeMap<Text, byte[]>();
for (int i = 0; scanner.next(key, results); i++)
{
int rowId = startRowId + i;
assertTrue("Row name",
key.toString().startsWith(getRowName(rowId).toString()));
assertEquals("Count of columns", COLUMNS_COUNT,
results.size());
TreeMap<Text, byte[]> row = new TreeMap<Text, byte[]>();
for (Map.Entry<Text, byte[]> e : results.entrySet())
{
row.put(e.getKey(), e.getValue());
}
isExpectedRow(rowId, row);
// Clear out set. Otherwise row results accumulate.
results.clear();
}
}
}
> memcache.getScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> ---------------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman resolved HBASE-686.
---------------------------------
Resolution: Cannot Reproduce
This issue cannot be replicated on either the 0.1 branch or trunk. If there are explicit test cases attached which can reproduce the issue, please re-open with both the versions affected and please attach a test case that demonstrates that the test case fails for that release.
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE_686.java, HBASE_686.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (HBASE-686) MemcacheScanner didn't
return the first row(if it exists), cause HScannerInterface's output
incorrect
Posted by "Antoni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605415#action_12605415 ]
acure edited comment on HBASE-686 at 6/16/08 2:28 PM:
-------------------------------------------------------
My test case :
you have to create table 'aaa' with a column family 'xxx'
HTable htable = new HTable("aaa");
BatchUpdate batch = new BatchUpdate("123456".getBytes());
batch.put("xxx", "some value".getBytes());
htable.commit(batch);
byte[][] cols = new byte[][]{ "xxx".getBytes() };
RowResult row = htable.getRow("123456".getBytes(), cols, new Date().getTime());
System.out.println("there is a row = " + row.get("xxx".getBytes()).toString());
cols = new byte[][]{ "xxx:".getBytes() };
Scanner scanner = htable.getScanner(cols);
if (scanner.iterator().hasNext()) {
System.out.println(" GOOD !!!! - scanner returns some rows ");
} else {
System.out.println(" WRONG !!!! - scanner didn't found any rows");
}
was (Author: acure):
yes - of course, i will post it as soon as possible.
Thanks - Acure
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HBASE-686:
--------------------------------
Attachment: HBASE_686.java
This is a updated version of the test to work with trunk. Again, it passes with no issues.
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE_686.java, HBASE_686.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman reassigned HBASE-686:
-----------------------------------
Assignee: Jim Kellerman
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Antoni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoni updated HBASE-686:
-------------------------
Attachment: scanner-test-for.ver.0.2.0.dev.jar.jar
it's test case for ver 0.2.0 dev from trunk. - sources inside the jar package
this is class with main method which do :
1) creates table - if it doesn't exist
2) create BatchUpdate with a "rowKey" and commit into a table
3) make - getRow with "rowKey" - and shows on console data in this row
4) make - getScanner on whole table and shows all rows - and counts how many rows scanner returns
it returns :
table : testTable exists.
data inserted
-------------------------------------
getRow :
isEmpty = false
row key = 0000
col val = testvalue
-------------------------------------
getScanner :
scanner find : 0 rows in this table.
done.
what does it mean ?
getRow can gets data by rowKey - this data exists in table, but the scanner doesn't see this row - and return 0 rows.
Antoni
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman resolved HBASE-686.
---------------------------------
Resolution: Fixed
Committed to both 0.1 branch and trunk.
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2, 0.2.0
> Reporter: LN
> Assignee: Jim Kellerman
> Fix For: 0.1.3, 0.2.0
>
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605663#action_12605663 ]
Jim Kellerman commented on HBASE-686:
-------------------------------------
Mea culpa on closing this issue too early.
The patch and test case provided do indeed demonstrate and fix the problem. All other regression tests passed as well with the patch applied. Committed to 0.1 branch. Thanks for the contribution LN!
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Fix For: 0.1.3
>
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HBASE-686:
--------------------------------
Fix Version/s: 0.1.3
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Fix For: 0.1.3
>
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605418#action_12605418 ]
Jim Kellerman commented on HBASE-686:
-------------------------------------
This patch is listed as affecting hbase-0.1.2, but the APIs you are using only exist in trunk (0.2.0) is this issue for 0.1.2 or for 0.2.0?
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "LN (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
LN updated HBASE-686:
---------------------
Attachment: HBASE-686.patch
TestHMemcache.java
here is a modified memcache test cases(0.1.2 release) and my patch, i have add a new case 'testScanner_686'. i also have a small ant task definition to run this case seprately if u need.
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HBASE-686:
--------------------------------
Attachment: HBASE_686.java
>From the comments in the issue, this is the best test case I could come up with. It passes tests on hbase-0.1 branch
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
> Attachments: HBASE_686.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605411#action_12605411 ]
Jim Kellerman commented on HBASE-686:
-------------------------------------
LN,
Could you please post your testcase and patch as attachments to this Jira. Jira has mangled your input to the extent that it is difficult to make a working test program or patch out of either of your posts.
Thanks.
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Krzysiek Szlapinski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krzysiek Szlapinski updated HBASE-686:
--------------------------------------
Affects Version/s: (was: 0.1.2)
0.2.0
It also affects 0.2 from trunk as test case provided by Antonii (in scanner-test-for.ver.0.2.0.dev.jar) shows
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.2.0
> Reporter: LN
> Assignee: Jim Kellerman
> Fix For: 0.1.3
>
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) memcache.getScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "LN (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605049#action_12605049 ]
LN commented on HBASE-686:
--------------------------
my patch, due to my local source changed for HBASE-684, the line number is incorrect i think.
Index: src/java/org/apache/hadoop/hbase/HStore.java
===================================================================
--- src/java/org/apache/hadoop/hbase/HStore.java Sat Jun 14 15:46:26 CST 2008
+++ src/java/org/apache/hadoop/hbase/HStore.java Sat Jun 14 15:46:26 CST 2008
@@ -631,8 +631,7 @@
if (results.size() > 0) {
results.clear();
}
- while (results.size() <= 0 &&
- (this.currentRow = getNextRow(this.currentRow)) != null) {
+ while (results.size() <= 0 && this.currentRow != null) {
if (deletes.size() > 0) {
deletes.clear();
}
@@ -661,6 +660,7 @@
}
results.put(column, c);
}
+ this.currentRow = getNextRow(this.currentRow);
}
return results.size() > 0;
}
> memcache.getScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> ---------------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-686) MemcacheScanner didn't return the
first row(if it exists), cause HScannerInterface's output incorrect
Posted by "Antoni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605415#action_12605415 ]
Antoni commented on HBASE-686:
------------------------------
yes - of course, i will post it as soon as possible.
Thanks - Acure
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
> Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HBASE-686:
--------------------------------
Fix Version/s: 0.2.0
Affects Version/s: 0.1.2
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2, 0.2.0
> Reporter: LN
> Assignee: Jim Kellerman
> Fix For: 0.1.3, 0.2.0
>
> Attachments: HBASE-686.patch, HBASE_686.java, HBASE_686.java, scanner-test-for.ver.0.2.0.dev.jar.jar, TestHMemcache.java
>
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-686) MemcacheScanner didn't return the first
row(if it exists), cause HScannerInterface's output incorrect
Posted by "LN (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
LN updated HBASE-686:
---------------------
Summary: MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect (was: memcache.getScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect)
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-686
> URL: https://issues.apache.org/jira/browse/HBASE-686
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.1.2
> Reporter: LN
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner. in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow = getNextRow(this.currentRow) before fetch result.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.