hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10854) Multiple Row/VisibilityLabels visible while in the memstore
Date Thu, 03 Apr 2014 07:07:18 GMT

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

Andrew Purtell commented on HBASE-10854:
----------------------------------------

Patch seems reasonable to me. Please try out the below scenarios with the patch applied. The
shell commands aren't real, just illustrations.

Table 't1' has MAX_VERSIONS=10 

{noformat}
hbase> put 't1', 'row', 'f1:q', 'v1all'
hbase> put 't1', 'row', 'f1:q', 'v1aOrB', {VISIBILITY=>'A|B'}
hbase> put 't1', 'row', 'f1:q', 'v1aAndB', {VISIBILITY=>'A&B'}
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 1, AUTHORIZATIONS => 'A' }
-> [ 'v1aOrB' ]
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 10, AUTHORIZATIONS => 'A' }
-> [ 'v1aOrB', 'v1all' ]
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 1, AUTHORIZATIONS => 'B' }
-> [ 'v1aOrB' ]
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 10, AUTHORIZATIONS => 'B' }
-> [ 'v1aOrB', 'v1all' ]
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 1, AUTHORIZATIONS => ['A', 'B'] }
->  [ 'v1aAndB' ]
{noformat}

{noformat}
scan 't1', 'row', 'f1:q', { MAX_VERSIONS => 10, AUTHORIZATIONS => ['A', 'B'] }
-> [ 'v1aAndB', 'v1aOrB', 'v1all' ]
{noformat}

Table 't2' has MAX_VERSIONS=1

{noformat}
hbase> put 't2', 'row', 'f1:q', 'v1all'
hbase> put 't2', 'row', 'f1:q', 'v1aOrB', {VISIBILITY=>'A|B'}
hbase> put 't2', 'row', 'f1:q', 'v1aAndB', {VISIBILITY=>'A&B'}
{noformat}

{noformat}
scan 't2', 'row', 'f1:q', { AUTHORIZATIONS => 'A' }
-> []
{noformat}

{noformat}
scan 't2', 'row', 'f1:q', { AUTHORIZATIONS => 'B' }
->  []
{noformat}

{noformat}
scan 't2', 'row', 'f1:q', { AUTHORIZATIONS => ['A', 'B'] }
-> [ 'v1aAndB' ]
{noformat}

Yes? Then I am +1

Everyone else find the behavior illustrated by the above shell commands reasonable?

> Multiple Row/VisibilityLabels visible while in the memstore
> -----------------------------------------------------------
>
>                 Key: HBASE-10854
>                 URL: https://issues.apache.org/jira/browse/HBASE-10854
>             Project: HBase
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 0.98.0
>            Reporter: Matteo Bertozzi
>            Assignee: Anoop Sam John
>             Fix For: 0.99.0, 0.98.2
>
>         Attachments: HBASE-10854.patch
>
>
> If we update the row multiple times with different visibility labels
> we are able to get the "old version" of the row until is flushed
> {code}
> $ sudo -u hbase hbase shell
> hbase> add_labels 'A'
> hbase> add_labels 'B'
> hbase> create 'tb', 'f1'
> hbase> put 'tb', 'row', 'f1:q', 'v1', {VISIBILITY=>'A'}
> hbase> put 'tb', 'row', 'f1:q', 'v1all'
> hbase> put 'tb', 'row', 'f1:q', 'v1aOrB', {VISIBILITY=>'A|B'}
> hbase> put 'tb', 'row', 'f1:q', 'v1aAndB', {VISIBILITY=>'A&B'}
> hbase> scan 'tb'
> row column=f1:q, timestamp=1395948168154, value=v1aAndB
> 1 row
> $ sudo -u testuser hbase shell
> hbase> scan 'tb'
> row column=f1:q, timestamp=1395948168102, value=v1all
> 1 row
> {code}
> When we flush the memstore we get a single row (the last one inserted)
> so the testuser get 0 rows now.
> {code}
> $ sudo -u hbase hbase shell
> hbase> flush 'tb'
> hbase> scan 'tb'
> row column=f1:q, timestamp=1395948168154, value=v1aAndB
> 1 row
> $ sudo -u testuser hbase shell
> hbase> scan 'tb'
> 0 row
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message