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

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

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

    https://github.com/apache/nifi/pull/2256#discussion_r150375195
  
    --- Diff: 
nifi-nar-bundles/nifi-hbase-bundle/nifi-hbase-processors/src/main/java/org/apache/nifi/hbase/PutHBaseRecord.java
 ---
    @@ -127,6 +127,18 @@
                 .defaultValue("1000")
                 .build();
     
    +    protected static final AllowableValue NULL_FIELD_EMPTY = new 
AllowableValue("empty-string", "Empty String", "Use an empty string");
    +    protected static final AllowableValue NULL_FIELD_SKIP  = new 
AllowableValue("skip-field", "Skip Field", "Skip the field (don't process it at 
all).");
    --- End diff --
    
    If a record only has 'Row Identifier Field', I got the following error with 
'Skip Field' strategy. This is another edge case, but do we want to treat such 
records as no-op, so that other records in the same batch operation can be put 
unaffected?
    
    ```
    2017-11-11 14:09:46,868 ERROR [Timer-Driven Process Thread-2] 
org.apache.nifi.hbase.PutHBaseRecord 
PutHBaseRecord[id=9237f831-4db5-30d0-95e6-9402aa75bac0] Failed to put records 
to HBase.: java.lang.IllegalArgumentException: No columns to insert
    java.lang.IllegalArgumentException: No columns to insert
            at 
org.apache.hadoop.hbase.client.HTable.validatePut(HTable.java:1515)
            at 
org.apache.hadoop.hbase.client.BufferedMutatorImpl.validatePut(BufferedMutatorImpl.java:147)
            at 
org.apache.hadoop.hbase.client.BufferedMutatorImpl.doMutate(BufferedMutatorImpl.java:134)
            at 
org.apache.hadoop.hbase.client.BufferedMutatorImpl.mutate(BufferedMutatorImpl.java:105)
            at org.apache.hadoop.hbase.client.HTable.put(HTable.java:1050)
            at 
org.apache.nifi.hbase.HBase_1_1_2_ClientService.put(HBase_1_1_2_ClientService.java:315)
    ```


> PutHBaseRecord fails on null record field values
> ------------------------------------------------
>
>                 Key: NIFI-4578
>                 URL: https://issues.apache.org/jira/browse/NIFI-4578
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>
> A NullPointerException is thrown when a nullable field has a null value. A 
> strategy for handling this needs to be added.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to