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

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

Github user mans2singh commented on the issue:

    https://github.com/apache/nifi/pull/2101
  
    @mattyb149 @MikeThomsen 
    
    If I use `NON_EMPTY_VALIDATOR` - I get the validation exception. I am 
including the exception, property definition and unit test snippets below.  
Please let me know if I am missing anything.
    
    Thanks.
    
    Here is the unit test validation exception with `NON_EMPTY_VALIDATOR`:
    
    `
    java.lang.AssertionError: Processor has 1 validation failures:
    'influxdb-username' validated against '' is invalid because 
influxdb-username cannot be empty
    `
    
    Here is how I am defining the property
    
    ```
        public static final PropertyDescriptor USERNAME = new 
PropertyDescriptor.Builder()
                .name("influxdb-username")
                .displayName("Username")
                .required(false)
                .description("Username for accessing InfluxDB")
                .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
                .build();
    ```
    and here is the unit test:
    
    ```
        @Test
        public void testEmptyUsername() {
            runner.setProperty(PutInfluxDB.USERNAME,"");
            runner.assertValid();
        }
    ```


> Implement put processor for InfluxDB
> ------------------------------------
>
>                 Key: NIFI-4289
>                 URL: https://issues.apache.org/jira/browse/NIFI-4289
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>    Affects Versions: 1.3.0
>         Environment: All
>            Reporter: Mans Singh
>            Assignee: Mans Singh
>            Priority: Minor
>              Labels: insert, measurements,, put, timeseries
>
> Support inserting time series measurements into InfluxDB.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to