[
https://issues.apache.org/jira/browse/NIFI-4637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16452939#comment-16452939
]
ASF GitHub Bot commented on NIFI-4637:
--------------------------------------
Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/2518
@MikeThomsen Thanks for the quick update, I will continue reviewing.
@bbende Thanks for the info. What I was wondering about is why HBase
requires a 'Visibility Label Expression' instead of a comma separated
visibility label list for delete operations.
In order to understand the theme more, I installed and played with
Accumulo, too. It turned out Accumulo and HBase both require 'Visibility Label
Expression' for delete.
@joshelser Would you please educate me why delete operation uses expression
instead of a comma separated labels as scan does? E.g. to delete a cell having
`(apple&carrot)|broccoli|spinach`, I had to specify exactly the same
expression. I expected executing a delete request by a user having all of
authorizations would delete the cell, or the logical expression would match if
`spinach` was specified. But it didn't behave like that, a matching expression
was needed.
Following results are what I got executing delete operations based on the
[Accumulo example](https://accumulo.apache.org/1.7/examples/visibility):
```
# Insert test data
username@instance vistest> insert row f1 q1 v1 -l A
username@instance vistest> insert row f2 q2 v2 -l A&B
username@instance vistest> insert row f3 q3 v3 -l
(apple&carrot)|broccoli|spinach
# It seems users authorizations are not used for delete, and need to be
specified explicitly
username@instance vistest> delete row f1 q1
username@instance vistest> scan
row f1:q1 [A] v1
row f2:q2 [A&B] v2
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
username@instance vistest> delete row f1 q1 -l A
username@instance vistest> scan
row f2:q2 [A&B] v2
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
# Specifying wrong label does not return error
username@instance vistest> delete row f3 q3 -l spina
username@instance vistest> scan
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
# The visibility label expression should match exactly
username@instance vistest> delete row f3 q3 -l spinach
username@instance vistest> scan
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
username@instance vistest> delete row f3 q3 -l spinach|broccoli
username@instance vistest> scan
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
username@instance vistest> delete row f3 q3 -l
spinach|broccoli|(apple&carrot)
username@instance vistest> scan
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
username@instance vistest> delete row f3 q3 -l (apple&carrot)|broccoli
username@instance vistest> scan
row f3:q3 [(apple&carrot)|broccoli|spinach] v3
username@instance vistest> delete row f3 q3 -l
(apple&carrot)|broccoli|spinach
username@instance vistest> scan
# There are no rows
username@instance vistest>
```
> Add support for HBase visibility labels to HBase processors and controller
> services
> -----------------------------------------------------------------------------------
>
> Key: NIFI-4637
> URL: https://issues.apache.org/jira/browse/NIFI-4637
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Mike Thomsen
> Assignee: Mike Thomsen
> Priority: Major
>
> HBase supports visibility labels, but you can't use them from NiFi because
> there is no way to set them. The existing processors and services should be
> upgraded to handle this capability.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)