[ 
https://issues.apache.org/jira/browse/HBASE-28728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HBASE-28728:
-----------------------------------
    Labels: pull-request-available  (was: )

> No data available when scan cross-region and setReversed(true)  in Spark on 
> HBase sc.newAPIHadoopRDD
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-28728
>                 URL: https://issues.apache.org/jira/browse/HBASE-28728
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>    Affects Versions: 2.2.3, 2.4.14
>            Reporter: Li Zhexi
>            Assignee: Li Zhexi
>            Priority: Major
>              Labels: pull-request-available
>
> Using below scala code to scan data in Spark on HBase:
>     val scan = new Scan()
>     scan.withStartRow(Bytes.toBytes(startKey))
>     scan.withStopRow(Bytes.toBytes(stopKey))
>     if (reversed) {
>       scan.setReversed(true)
>     }
>     val conf = ConnectionFactory.createConnection.getConfiguration
>     conf.set(TableInputFormat.INPUT_TABLE, tableName)
>     conf.set(TableInputFormat.SCAN, 
> TableMapReduceUtil.convertScanToString(scan))
>    val rdd = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat], 
> classOf[ImmutableBytesWritable], classOf[Result])
>  
> 1.When scan cross-region  without reversed=true, the scan can be performed 
> normally and the result can be obtained.
> 2.When scan do not cross-region but with reversed=true, the scan can be 
> performed normally and the result can be obtained.
> 3.When scan cross-region  with reversed=true,  the result is empty.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to