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

ASF GitHub Bot commented on NIFI-4637:
--------------------------------------

Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2518#discussion_r184277876
  
    --- Diff: 
nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors/src/main/java/org/apache/nifi/hbase/PutHBaseRecord.java
 ---
    @@ -368,9 +412,18 @@ protected PutFlowFile createPut(ProcessContext 
context, Record record, RecordSch
                     timestamp = null;
                 }
     
    +            RecordField visField = null;
    +            Map visSettings = null;
    +            if (recordPath != null) {
    +                final RecordPathResult result = 
recordPath.evaluate(record);
    +                FieldValue fv = 
result.getSelectedFields().findFirst().get();
    +                visField = fv.getField();
    +                visSettings = (Map)fv.getValue();
    +            }
    +
                 List<PutColumn> columns = new ArrayList<>();
                 for (String name : schema.getFieldNames()) {
    -                if (name.equals(rowFieldName) || 
name.equals(timestampFieldName)) {
    +                if (name.equals(rowFieldName) || 
name.equals(timestampFieldName) || (visField != null && 
name.equals(visField.getFieldName()))) {
    --- End diff --
    
    Good stuff, I'd expect PutHBaseJson has the same capability.


> 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)

Reply via email to