You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Hsieh (JIRA)" <ji...@apache.org> on 2011/09/11 23:36:09 UTC
[jira] [Created] (HBASE-4371) When scanning .META., STARTROW with
only table name ignores table.
When scanning .META., STARTROW with only table name ignores table.
-------------------------------------------------------------------
Key: HBASE-4371
URL: https://issues.apache.org/jira/browse/HBASE-4371
Project: HBase
Issue Type: Bug
Reporter: Jonathan Hsieh
When writing unit tests for HBASE-4325, I noticed this:
create 'table0', 'f1','f2'
create 'table1', 'f1','f2'
create 'table2', 'f1','f2'
scan '.META.', { STARTROW=> 'table2' }
Which outputs table1 which is < table2.
hbase(main):007:0> scan '.META.', { STARTROW => 'table2' }
ROW COLUMN+CELL
table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:regioninfo, timestamp=1315776873202, value=REGION => {NAME => 'table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39.', TableName => 'table0', STARTKEY => '', END
KEY => '', ENCODED => ddc11620ad6d62eb6840853ecca46f39,}
table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:server, timestamp=1315776873233, value=grimlock:44226
table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:serverstartcode, timestamp=1315776873233, value=1315776026457
table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:regioninfo, timestamp=1315776052829, value=REGION => {NAME => 'table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5.', TableName => 'table1', STARTKEY => '', END
KEY => '', ENCODED => dfbfdd038b1e42d38eff46e8282a15e5,}
table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:server, timestamp=1315776052871, value=grimlock:44226
table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:serverstartcode, timestamp=1315776052871, value=1315776026457
table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:regioninfo, timestamp=1315776057207, value=REGION => {NAME => 'table2,,1315776057157.5c6df57acb426b02660315e97bff80ff.', TableName => 'table2', STARTKEY => '', END
KEY => '', ENCODED => 5c6df57acb426b02660315e97bff80ff,}
table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:server, timestamp=1315776057232, value=grimlock:44226
table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:serverstartcode, timestamp=1315776057232, value=1315776026457
3 row(s) in 0.0370 seconds
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4371) When scanning .META., STARTROW
with only table name ignores table.
Posted by "Jonathan Hsieh (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102361#comment-13102361 ]
Jonathan Hsieh commented on HBASE-4371:
---------------------------------------
Repost to show formatted code.
{code}
public void testMetaComparatorTableOnlyOk() {
MetaComparator c = new KeyValue.MetaComparator();
long now = System.currentTimeMillis();
// A user can enter arbitrary values from shell when scanning meta.
KeyValue a = new KeyValue(Bytes.toBytes("table1"), now);
KeyValue b = new KeyValue(Bytes.toBytes("table2"), now);
// This seems wrong.
assertTrue(c.compare(a, b) == 0);
}
{code}
> When scanning .META., STARTROW with only table name ignores table.
> -------------------------------------------------------------------
>
> Key: HBASE-4371
> URL: https://issues.apache.org/jira/browse/HBASE-4371
> Project: HBase
> Issue Type: Bug
> Reporter: Jonathan Hsieh
>
> When writing unit tests for HBASE-4325, I noticed this:
> create 'table0', 'f1','f2'
> create 'table1', 'f1','f2'
> create 'table2', 'f1','f2'
> scan '.META.', { STARTROW=> 'table2' }
> Which outputs table1 which is < table2.
> hbase(main):007:0> scan '.META.', { STARTROW => 'table2' }
> ROW COLUMN+CELL
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:regioninfo, timestamp=1315776873202, value=REGION => {NAME => 'table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39.', TableName => 'table0', STARTKEY => '', END
> KEY => '', ENCODED => ddc11620ad6d62eb6840853ecca46f39,}
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:server, timestamp=1315776873233, value=grimlock:44226
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:serverstartcode, timestamp=1315776873233, value=1315776026457
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:regioninfo, timestamp=1315776052829, value=REGION => {NAME => 'table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5.', TableName => 'table1', STARTKEY => '', END
> KEY => '', ENCODED => dfbfdd038b1e42d38eff46e8282a15e5,}
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:server, timestamp=1315776052871, value=grimlock:44226
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:serverstartcode, timestamp=1315776052871, value=1315776026457
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:regioninfo, timestamp=1315776057207, value=REGION => {NAME => 'table2,,1315776057157.5c6df57acb426b02660315e97bff80ff.', TableName => 'table2', STARTKEY => '', END
> KEY => '', ENCODED => 5c6df57acb426b02660315e97bff80ff,}
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:server, timestamp=1315776057232, value=grimlock:44226
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:serverstartcode, timestamp=1315776057232, value=1315776026457
> 3 row(s) in 0.0370 seconds
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4371) When scanning .META., STARTROW
with only table name ignores table.
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103037#comment-13103037 ]
stack commented on HBASE-4371:
------------------------------
Yeah, that looks wrong. Probably something to do w/ lack of a ',' on whats passed into the comparator.
> When scanning .META., STARTROW with only table name ignores table.
> -------------------------------------------------------------------
>
> Key: HBASE-4371
> URL: https://issues.apache.org/jira/browse/HBASE-4371
> Project: HBase
> Issue Type: Bug
> Reporter: Jonathan Hsieh
>
> When writing unit tests for HBASE-4325, I noticed this:
> create 'table0', 'f1','f2'
> create 'table1', 'f1','f2'
> create 'table2', 'f1','f2'
> scan '.META.', { STARTROW=> 'table2' }
> Which outputs table1 which is < table2.
> hbase(main):007:0> scan '.META.', { STARTROW => 'table2' }
> ROW COLUMN+CELL
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:regioninfo, timestamp=1315776873202, value=REGION => {NAME => 'table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39.', TableName => 'table0', STARTKEY => '', END
> KEY => '', ENCODED => ddc11620ad6d62eb6840853ecca46f39,}
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:server, timestamp=1315776873233, value=grimlock:44226
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:serverstartcode, timestamp=1315776873233, value=1315776026457
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:regioninfo, timestamp=1315776052829, value=REGION => {NAME => 'table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5.', TableName => 'table1', STARTKEY => '', END
> KEY => '', ENCODED => dfbfdd038b1e42d38eff46e8282a15e5,}
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:server, timestamp=1315776052871, value=grimlock:44226
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:serverstartcode, timestamp=1315776052871, value=1315776026457
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:regioninfo, timestamp=1315776057207, value=REGION => {NAME => 'table2,,1315776057157.5c6df57acb426b02660315e97bff80ff.', TableName => 'table2', STARTKEY => '', END
> KEY => '', ENCODED => 5c6df57acb426b02660315e97bff80ff,}
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:server, timestamp=1315776057232, value=grimlock:44226
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:serverstartcode, timestamp=1315776057232, value=1315776026457
> 3 row(s) in 0.0370 seconds
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4371) When scanning .META., STARTROW
with only table name ignores table.
Posted by "Jonathan Hsieh (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102360#comment-13102360 ]
Jonathan Hsieh commented on HBASE-4371:
---------------------------------------
I think something isn't correct in KeyValue.MetaComparator. Here's a test case that passes that seems incorrect. Why are these keys equal?
public void testMetaComparatorTableOnlyOk() {
MetaComparator c = new KeyValue.MetaComparator();
long now = System.currentTimeMillis();
// A users can enter arbitrary values from shell when scanning meta.
KeyValue a = new KeyValue(Bytes.toBytes("table1"), now);
KeyValue b = new KeyValue(Bytes.toBytes("table2"), now);
// This is seems wrong.
assertTrue(c.compare(a, b) == 0);
}
> When scanning .META., STARTROW with only table name ignores table.
> -------------------------------------------------------------------
>
> Key: HBASE-4371
> URL: https://issues.apache.org/jira/browse/HBASE-4371
> Project: HBase
> Issue Type: Bug
> Reporter: Jonathan Hsieh
>
> When writing unit tests for HBASE-4325, I noticed this:
> create 'table0', 'f1','f2'
> create 'table1', 'f1','f2'
> create 'table2', 'f1','f2'
> scan '.META.', { STARTROW=> 'table2' }
> Which outputs table1 which is < table2.
> hbase(main):007:0> scan '.META.', { STARTROW => 'table2' }
> ROW COLUMN+CELL
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:regioninfo, timestamp=1315776873202, value=REGION => {NAME => 'table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39.', TableName => 'table0', STARTKEY => '', END
> KEY => '', ENCODED => ddc11620ad6d62eb6840853ecca46f39,}
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:server, timestamp=1315776873233, value=grimlock:44226
> table0,,1315776873140.ddc11620ad6d62eb6840853ecca46f39. column=info:serverstartcode, timestamp=1315776873233, value=1315776026457
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:regioninfo, timestamp=1315776052829, value=REGION => {NAME => 'table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5.', TableName => 'table1', STARTKEY => '', END
> KEY => '', ENCODED => dfbfdd038b1e42d38eff46e8282a15e5,}
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:server, timestamp=1315776052871, value=grimlock:44226
> table1,,1315776052776.dfbfdd038b1e42d38eff46e8282a15e5. column=info:serverstartcode, timestamp=1315776052871, value=1315776026457
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:regioninfo, timestamp=1315776057207, value=REGION => {NAME => 'table2,,1315776057157.5c6df57acb426b02660315e97bff80ff.', TableName => 'table2', STARTKEY => '', END
> KEY => '', ENCODED => 5c6df57acb426b02660315e97bff80ff,}
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:server, timestamp=1315776057232, value=grimlock:44226
> table2,,1315776057157.5c6df57acb426b02660315e97bff80ff. column=info:serverstartcode, timestamp=1315776057232, value=1315776026457
> 3 row(s) in 0.0370 seconds
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira