[
https://issues.apache.org/jira/browse/NIFI-4637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16390194#comment-16390194
]
ASF GitHub Bot commented on NIFI-4637:
--------------------------------------
Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2518#discussion_r172976209
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/src/main/java/org/apache/nifi/hbase/HBase_1_1_2_ClientService.java
---
@@ -349,18 +399,54 @@ public boolean checkAndPut(final String tableName,
final byte[] rowId, final byt
@Override
public void delete(final String tableName, final byte[] rowId) throws
IOException {
+ delete(tableName, rowId, null);
+ }
+
+ @Override
+ public void delete(String tableName, byte[] rowId, String
visibilityLabel) throws IOException {
try (final Table table =
connection.getTable(TableName.valueOf(tableName))) {
Delete delete = new Delete(rowId);
+ if (visibilityLabel != null &&
!visibilityLabel.trim().equals("")) {
+ delete.setCellVisibility(new
CellVisibility(visibilityLabel));
+ }
table.delete(delete);
}
}
@Override
public void delete(String tableName, List<byte[]> rowIds) throws
IOException {
+ delete(tableName, rowIds);
+ }
+
+ @Override
+ public void deleteCells(String tableName, List<DeleteRequest> deletes)
throws IOException {
+ List<Delete> deleteRequests = new ArrayList<>();
+ for (int index = 0; index < deletes.size(); index++) {
+ DeleteRequest req = deletes.get(index);
+ Delete delete = new Delete(req.getRowId())
+ .addColumn(req.getColumnFamily(),
req.getColumnQualifier());
+ if (req.getVisibilityLabel() != null &&
!req.getVisibilityLabel().trim().equals("")) {
--- End diff --
````StringUtils.isBlank(str)````
> 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)