[
https://issues.apache.org/jira/browse/HBASE-30587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
mazhengxuan updated HBASE-30587:
--------------------------------
Description:
{{hbaseRDDAsRows}} stores cell values in a map keyed only by qualifier. When a
scan returns more than one cell for the same qualifier, the last cell visited
wins.
To reproduce, create families {{a}} and {{{}b{}}}, with {{a}} configured to
keep at least two versions. Write these three cells to one row:
a:q timestamp 1000 A-old
a:q timestamp 2000 A-new
b:q timestamp 2000 B
* Scan only {{a:q}} with {{readVersions(2)}} and request {{{}Seq("q"){}}}. The
helper returns {{{}"A-old"{}}}.
* Scan both families with the default one version and request
{{{}Seq("q"){}}}. The helper returns {{{}"B"{}}}, with no indication that
{{a:q}} also matched.
*Expected:* Since the helper returns one value per requested column, I’d expect
it to use the latest visible version. A bare qualifier that matches two
families should be reported as ambiguous so the caller can narrow the scan.
I suggest tracking cells by family and qualifier and selecting the latest
visible version explicitly. Bare qualifiers can keep their current behavior
when the match is unambiguous.
was:
{{hbaseRDDAsRows}} stores cell values in a map keyed only by qualifier. When a
scan returns more than one cell for the same qualifier, the last cell visited
wins.
To reproduce, create families {{a}} and {{{}b{}}}, with {{a}} configured to
keep at least two versions. Write these three cells to one row:
{{a:q timestamp 1000 A-old
a:q timestamp 2000 A-new
b:q timestamp 2000 B}}
* Scan only {{a:q}} with {{readVersions(2)}} and request {{{}Seq("q"){}}}. The
helper returns {{{}"A-old"{}}}.
* Scan both families with the default one version and request
{{{}Seq("q"){}}}. The helper returns {{{}"B"{}}}, with no indication that
{{a:q}} also matched.
*Expected:* Since the helper returns one value per requested column, I’d expect
it to use the latest visible version. A bare qualifier that matches two
families should be reported as ambiguous so the caller can narrow the scan.
I suggest tracking cells by family and qualifier and selecting the latest
visible version explicitly. Bare qualifiers can keep their current behavior
when the match is unambiguous.
> Avoid silently overwriting values from different families or versions in
> hbaseRDDAsRows
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-30587
> URL: https://issues.apache.org/jira/browse/HBASE-30587
> Project: HBase
> Issue Type: Sub-task
> Components: hbase-connectors
> Reporter: mazhengxuan
> Assignee: mazhengxuan
> Priority: Major
>
> {{hbaseRDDAsRows}} stores cell values in a map keyed only by qualifier. When
> a scan returns more than one cell for the same qualifier, the last cell
> visited wins.
> To reproduce, create families {{a}} and {{{}b{}}}, with {{a}} configured to
> keep at least two versions. Write these three cells to one row:
> a:q timestamp 1000 A-old
> a:q timestamp 2000 A-new
> b:q timestamp 2000 B
> * Scan only {{a:q}} with {{readVersions(2)}} and request {{{}Seq("q"){}}}.
> The helper returns {{{}"A-old"{}}}.
> * Scan both families with the default one version and request
> {{{}Seq("q"){}}}. The helper returns {{{}"B"{}}}, with no indication that
> {{a:q}} also matched.
> *Expected:* Since the helper returns one value per requested column, I’d
> expect it to use the latest visible version. A bare qualifier that matches
> two families should be reported as ambiguous so the caller can narrow the
> scan.
> I suggest tracking cells by family and qualifier and selecting the latest
> visible version explicitly. Bare qualifiers can keep their current behavior
> when the match is unambiguous.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)