hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Sharma <anoop.sha...@esgyn.com>
Subject delete of cells with visibility expressions
Date Thu, 29 Oct 2015 21:56:31 GMT
hi

  running into an issue related to visibility expressions and delete.

Example run from hbase shell is listed below.

Will appreciate any help on this issue.

thanks.



In the example below, user running queries has ‘MANAGER’ authorization.



*First example:*

  add a column with visib expr ‘MANAGER’

  delete it by passing in visibility of ‘MANAGER’

  This works and scan doesn’t return anything.



*Second example:*

  add a column with visib expr ‘MANAGER’

  delete it by not passing in any visibility.

  This doesn’t delete the column.

  Scan doesn’t return the row but RAW scan shows the column

  marked as deleteColumn.



  Now if delete is done again with visibility of ‘MANAGER’,

  it still doesn’t delete it and scan returns the original column.







*Example 1:*

hbase(main):096:0> create 'HBT1', 'cf'



hbase(main):098:0* *put 'HBT1', 'John', 'cf:a', 'CA',
{VISIBILITY=>'MANAGER'}*



hbase(main):099:0> *scan 'HBT1'*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446154722055,
value=CA

1 row(s) in 0.0030 seconds



hbase(main):100:0> *delete 'HBT1', 'John', 'cf:a', {VISIBILITY=>'MANAGER'}*

0 row(s) in 0.0030 seconds



hbase(main):101:0> *scan 'HBT1'*

ROW
COLUMN+CELL

0 row(s) in 0.0030 seconds





*Example 2:*

hbase(main):010:0* *put 'HBT1', 'John', 'cf:a', 'CA',
{VISIBILITY=>'MANAGER'}*

0 row(s) in 0.0040 seconds



hbase(main):011:0> *scan 'HBT1'*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446155346473,
value=CA

1 row(s) in 0.0060 seconds



hbase(main):012:0> *delete 'HBT1', 'John', 'cf:a'*

0 row(s) in 0.0090 seconds



hbase(main):013:0> *scan 'HBT1'*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446155346473,
value=CA

1 row(s) in 0.0050 seconds



hbase(main):014:0> *scan 'HBT1', {RAW => true}*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446155346519,
type=DeleteColumn

1 row(s) in 0.0060 seconds



hbase(main):015:0> *delete 'HBT1', 'John', 'cf:a', {VISIBILITY=>'MANAGER'}*

0 row(s) in 0.0030 seconds



hbase(main):016:0> *scan 'HBT1'*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446155346473,
value=CA

1 row(s) in 0.0040 seconds



hbase(main):017:0> *scan 'HBT1', {RAW => true}*

ROW
COLUMN+CELL

 John                 column=cf:a, timestamp=1446155346601,
type=DeleteColumn

1 row(s) in 0.0060 seconds

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message