You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2009/09/17 00:55:57 UTC

[jira] Commented: (HBASE-1829) Make use of start/stop row in TableInputFormat

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

stack commented on HBASE-1829:
------------------------------

Lars, tell us more about this patch... what it does.  It looks like a nice change in that if you pass a start/stop row to a Scan, only the regions that contain those start/stop rows will have splits made for them.

It looks too like you are cleaning up some weird crap; i.e.:

{code}
-    int realNumSplits = startKeys.length;
-    InputSplit[] splits = new InputSplit[realNumSplits];
-    int middle = startKeys.length / realNumSplits;
{code}


Is this right?

{code}
+      if (kvc.compare(startRow, keys.getSecond()[i]) <= 0 &&
+          kvc.compare(stopRow, keys.getFirst()[i]) >= 0) { 
{code}

Regions do not include their end-key (exclusive).

Its hard to test this but I gave it a go.  Seems like it hasn't broken anything (smile).

> Make use of start/stop row in TableInputFormat
> ----------------------------------------------
>
>                 Key: HBASE-1829
>                 URL: https://issues.apache.org/jira/browse/HBASE-1829
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: mapred
>    Affects Versions: 0.20.0
>            Reporter: Lars George
>            Assignee: Lars George
>            Priority: Minor
>             Fix For: 0.20.1
>
>         Attachments: HBASE-1829.patch
>
>
> Since we can now specify a start and stop row with the Scan that is handed to the TIF we can reduce the splits to the regions that contain these rows. That allows to test large MR jobs on a single region for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.