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

Nathan commented on HBASE-14442:
--------------------------------

Hi [~ndimiduk], I just thought  I cloud build  a scan with the same ^stopRow^ 
and ^startRow^, as the *TableMapReduceUtil* doesn't provide any interface for 
^Get^ or ^GetList^, then the ^Scan^ API  provides a  constructor ^Scan(Get 
get)^, a method  ^isGetScan()^, also I find some description  in the sources 
{quote}
    /**
   * Create a Scan operation for the range of rows specified.
   * @param startRow row to start scanner at or after (inclusive)
   * @param stopRow row to stop scanner before (exclusive)
   */
  public Scan(byte [] startRow, byte [] stopRow) {{
    this.startRow = startRow;
    this.stopRow = stopRow;
    //if the startRow and stopRow both are empty, it is not a Get
   *this.getScan = isStartRowAndEqualsStopRow();*
  }}
{quote}
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html#Scan(Get
 get)
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html#isGetScan

Thanks, maybe appending a ^0^ to the ^stopRow^ can solve my problem.

> MultiTableInputFormatBase.getSplits dosenot build split for a scan whose 
> startRow=stopRow=(startRow of a region)
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-14442
>                 URL: https://issues.apache.org/jira/browse/HBASE-14442
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>    Affects Versions: 1.1.2
>            Reporter: Nathan
>            Assignee: Nathan
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> I created a Scan whose startRow and stopRow are the same with a region's 
> startRow, then I found no map was built. 
> The following is the source code of this condtion:
> (startRow.length == 0 || keys.getSecond()[i].length == 0 ||
>                     Bytes.compareTo(startRow, keys.getSecond()[i]) < 0) &&
>                     (stopRow.length == 0 || Bytes.compareTo(stopRow,
>                             keys.getFirst()[i]) > 0)
> I think  a "=" should be added.



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

Reply via email to