You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by JPercivall <gi...@git.apache.org> on 2018/03/15 00:42:04 UTC

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

GitHub user JPercivall opened a pull request:

    https://github.com/apache/nifi/pull/2547

    NIFI-4977 Adding expression language support to the Sender properties…

    … of PutSyslog
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [X] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [X] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [X] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [X] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [X] Have you written or updated unit tests to verify your changes?
    - [X] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [X] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [X] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [X] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [X] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JPercivall/nifi NIFI-4977_Exposing_EL_in_PutSyslog

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2547.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2547
    
----
commit e9b731529a243ec439760a758cb0c809f7f8cd93
Author: Joe Percivall <jp...@...>
Date:   2018-03-15T00:39:04Z

    NIFI-4977 Adding expression language support to the Sender properties of PutSyslog

----


---

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2547#discussion_r177145747
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractSyslogProcessor.java ---
    @@ -29,34 +29,28 @@
         public static final AllowableValue TCP_VALUE = new AllowableValue("TCP", "TCP");
         public static final AllowableValue UDP_VALUE = new AllowableValue("UDP", "UDP");
     
    -    public static final PropertyDescriptor PROTOCOL = new PropertyDescriptor
    +    public static final PropertyDescriptor PROTOCOL_PROP = new PropertyDescriptor
                 .Builder().name("Protocol")
                 .description("The protocol for Syslog communication.")
                 .required(true)
                 .allowableValues(TCP_VALUE, UDP_VALUE)
    --- End diff --
    
    Yup, you're right will adjust


---

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2547#discussion_r177119368
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractSyslogProcessor.java ---
    @@ -29,34 +29,28 @@
         public static final AllowableValue TCP_VALUE = new AllowableValue("TCP", "TCP");
         public static final AllowableValue UDP_VALUE = new AllowableValue("UDP", "UDP");
     
    -    public static final PropertyDescriptor PROTOCOL = new PropertyDescriptor
    +    public static final PropertyDescriptor PROTOCOL_PROP = new PropertyDescriptor
                 .Builder().name("Protocol")
                 .description("The protocol for Syslog communication.")
                 .required(true)
                 .allowableValues(TCP_VALUE, UDP_VALUE)
    --- End diff --
    
    Since protocol uses allowable values, there isn't a way for a user to enter expression language


---

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/2547


---

[GitHub] nifi issue #2547: NIFI-4977 Adding expression language support to the Sender...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/2547
  
    Awesome, thanks @bbende. I appreciate the review


---

[GitHub] nifi issue #2547: NIFI-4977 Adding expression language support to the Sender...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/2547
  
    Thanks, looks good, will merge


---

[GitHub] nifi issue #2547: NIFI-4977 Adding expression language support to the Sender...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on the issue:

    https://github.com/apache/nifi/pull/2547
  
    @bbende I've added the changes and rebased to master


---

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2547#discussion_r177146046
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractSyslogProcessor.java ---
    @@ -29,34 +29,28 @@
         public static final AllowableValue TCP_VALUE = new AllowableValue("TCP", "TCP");
         public static final AllowableValue UDP_VALUE = new AllowableValue("UDP", "UDP");
     
    -    public static final PropertyDescriptor PROTOCOL = new PropertyDescriptor
    +    public static final PropertyDescriptor PROTOCOL_PROP = new PropertyDescriptor
                 .Builder().name("Protocol")
                 .description("The protocol for Syslog communication.")
                 .required(true)
                 .allowableValues(TCP_VALUE, UDP_VALUE)
                 .defaultValue(UDP_VALUE.getValue())
                 .build();
    -    public static final PropertyDescriptor PORT = new PropertyDescriptor
    +    public static final PropertyDescriptor.Builder PORT_PROP_BUILDER = new PropertyDescriptor
    --- End diff --
    
    Yeah, the reason was just that I was shying away from modifying the ListenSyslog processor as well but that's probably a better way to go. Will fix


---

[GitHub] nifi pull request #2547: NIFI-4977 Adding expression language support to the...

Posted by bbende <gi...@git.apache.org>.
Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2547#discussion_r177121695
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractSyslogProcessor.java ---
    @@ -29,34 +29,28 @@
         public static final AllowableValue TCP_VALUE = new AllowableValue("TCP", "TCP");
         public static final AllowableValue UDP_VALUE = new AllowableValue("UDP", "UDP");
     
    -    public static final PropertyDescriptor PROTOCOL = new PropertyDescriptor
    +    public static final PropertyDescriptor PROTOCOL_PROP = new PropertyDescriptor
                 .Builder().name("Protocol")
                 .description("The protocol for Syslog communication.")
                 .required(true)
                 .allowableValues(TCP_VALUE, UDP_VALUE)
                 .defaultValue(UDP_VALUE.getValue())
                 .build();
    -    public static final PropertyDescriptor PORT = new PropertyDescriptor
    +    public static final PropertyDescriptor.Builder PORT_PROP_BUILDER = new PropertyDescriptor
    --- End diff --
    
    Any reason not to just update the property descriptors directly in AbstractSyslogProcessor?
    
    Assuming we don't support EL for protocol, and given the timeout property isn't used by ListenSyslog, we'd only have to modify two additional lines in ListenSyslog where it evaluates the port and charset.


---