[
https://issues.apache.org/jira/browse/HBASE-28728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
chaijunjie updated HBASE-28728:
-------------------------------
Component/s: mapreduce
> 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
>
> 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)