[jira] [Resolved] (NIFI-5169) Upgrade to JsonPath 2.4.0
[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joseph Witt resolved NIFI-5169. --- Resolution: Fixed > Upgrade to JsonPath 2.4.0 > - > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task >Affects Versions: 1.6.0 >Reporter: Dennis Dahlmann >Assignee: Mike Thomsen >Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5169) Upgrade to JsonPath 2.4.0
[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488054#comment-16488054 ] ASF subversion and git services commented on NIFI-5169: --- Commit 716587d09f97cb01d685b79c010534af9aea1985 in nifi's branch refs/heads/master from [~mike.thomsen] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=716587d ] NIFI-5169 This closes #2705. Upgrade to JSONPath 2.4 NIFI-5169 Added explicit checking for empty strings in JsonPath expression property. Signed-off-by: joewitt> Upgrade to JsonPath 2.4.0 > - > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task >Affects Versions: 1.6.0 >Reporter: Dennis Dahlmann >Assignee: Mike Thomsen >Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5169) Upgrade to JsonPath 2.4.0
[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488057#comment-16488057 ] ASF GitHub Bot commented on NIFI-5169: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2705 > Upgrade to JsonPath 2.4.0 > - > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task >Affects Versions: 1.6.0 >Reporter: Dennis Dahlmann >Assignee: Mike Thomsen >Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5169) Upgrade to JsonPath 2.4.0
[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488055#comment-16488055 ] ASF subversion and git services commented on NIFI-5169: --- Commit 716587d09f97cb01d685b79c010534af9aea1985 in nifi's branch refs/heads/master from [~mike.thomsen] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=716587d ] NIFI-5169 This closes #2705. Upgrade to JSONPath 2.4 NIFI-5169 Added explicit checking for empty strings in JsonPath expression property. Signed-off-by: joewitt> Upgrade to JsonPath 2.4.0 > - > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task >Affects Versions: 1.6.0 >Reporter: Dennis Dahlmann >Assignee: Mike Thomsen >Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5169) Upgrade to JsonPath 2.4.0
[ https://issues.apache.org/jira/browse/NIFI-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488056#comment-16488056 ] ASF GitHub Bot commented on NIFI-5169: -- Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/2705 +1 merged to master > Upgrade to JsonPath 2.4.0 > - > > Key: NIFI-5169 > URL: https://issues.apache.org/jira/browse/NIFI-5169 > Project: Apache NiFi > Issue Type: Task >Affects Versions: 1.6.0 >Reporter: Dennis Dahlmann >Assignee: Mike Thomsen >Priority: Major > Labels: JSON > Fix For: 1.7.0 > > > A newer version (2.4.0) of JsonPath is availabel at > [github|[https://github.com/json-path/JsonPath].] > With this version a currently existing bug is fixed, take this JSON > {"Epoch timestamp [s]":"1486373924","temperature [C]":"20"} > and try to get the value of "Epoch timestamp [s]" with $.['Epoch timestamp > [s]'] this will result in an empty result with version 2.0.0 which is > currently, but with version 2.4.0 you get the right value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2705: NIFI-5169 Upgrade to JSONPath 2.4
Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2705 ---
[GitHub] nifi issue #2705: NIFI-5169 Upgrade to JSONPath 2.4
Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/2705 +1 merged to master ---
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488009#comment-16488009 ] ASF GitHub Bot commented on NIFI-1705: -- Github user joetrite commented on the issue: https://github.com/apache/nifi/pull/2711 @bdesert it looks like the regex support was added to AttributesToJSON after copied the code. I'll add regex support to this processor and check if anything else has changed. > AttributesToCSV > --- > > Key: NIFI-1705 > URL: https://issues.apache.org/jira/browse/NIFI-1705 > Project: Apache NiFi > Issue Type: Sub-task > Components: Extensions >Reporter: Randy Gelhausen >Priority: Major > > Create a new processor which converts a Flowfile's attributes into CSV > content. > Should support the same configuration options as the AttributesToJSON > processor -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user joetrite commented on the issue: https://github.com/apache/nifi/pull/2711 @bdesert it looks like the regex support was added to AttributesToJSON after copied the code. I'll add regex support to this processor and check if anything else has changed. ---
[jira] [Resolved] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Bende resolved NIFI-4987. --- Resolution: Fixed Fix Version/s: 1.7.0 > Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > Fix For: 1.7.0 > > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487900#comment-16487900 ] ASF subversion and git services commented on NIFI-4987: --- Commit 06d45c3a6ea30c5dc51d5f320d423dafc10271f8 in nifi's branch refs/heads/master from [~sivaprasanna] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=06d45c3 ] NIFI-4987: Added TTL to RedisDistributedMapCacheClientService NIFI-4987: PR Review Fixes - Reverted getAndPutIfAbsent and added TTL setting with a different approach NIFI-4987: PR Review Fixes - Added TTL to putIfAbsent() This closes #2726. Signed-off-by: Bryan Bende> Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487904#comment-16487904 ] ASF GitHub Bot commented on NIFI-4987: -- Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 Looks good, merged, thanks! > Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487903#comment-16487903 ] ASF GitHub Bot commented on NIFI-4987: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2726 > Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487898#comment-16487898 ] ASF subversion and git services commented on NIFI-4987: --- Commit 06d45c3a6ea30c5dc51d5f320d423dafc10271f8 in nifi's branch refs/heads/master from [~sivaprasanna] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=06d45c3 ] NIFI-4987: Added TTL to RedisDistributedMapCacheClientService NIFI-4987: PR Review Fixes - Reverted getAndPutIfAbsent and added TTL setting with a different approach NIFI-4987: PR Review Fixes - Added TTL to putIfAbsent() This closes #2726. Signed-off-by: Bryan Bende> Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4987) Support TTL in Redis
[ https://issues.apache.org/jira/browse/NIFI-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487899#comment-16487899 ] ASF subversion and git services commented on NIFI-4987: --- Commit 06d45c3a6ea30c5dc51d5f320d423dafc10271f8 in nifi's branch refs/heads/master from [~sivaprasanna] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=06d45c3 ] NIFI-4987: Added TTL to RedisDistributedMapCacheClientService NIFI-4987: PR Review Fixes - Reverted getAndPutIfAbsent and added TTL setting with a different approach NIFI-4987: PR Review Fixes - Added TTL to putIfAbsent() This closes #2726. Signed-off-by: Bryan Bende> Support TTL in Redis > > > Key: NIFI-4987 > URL: https://issues.apache.org/jira/browse/NIFI-4987 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Brian Ghigiarelli >Assignee: Sivaprasanna Sethuraman >Priority: Minor > > To properly integrate the NiFi with Redis, it would be nice to support > setting TTLs for keys, whether a global TTL is used for the particular Redis > database, or a configurable TTL is used for each key. At the moment, the > PutDistributedMapCache processor that uses the > RedisDistributedMapCacheClientService and calls to the > RedisConnectionPoolService does not pass in any TTL / EXPIRE parameter, so > Redis will cache the value potentially forever unless Redis itself clears the > key based on its configured maxmemory eviction strategy. > On > [SO|https://stackoverflow.com/questions/49321005/setting-ttl-on-redis-with-apache-nifi-putdistributedmapcache/49324205#49324205], > [~bbende] suggested either a PutRedis processor or a modification to the > RedisDistributedMapCacheClientService. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 Looks good, merged, thanks! ---
[GitHub] nifi pull request #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheCli...
Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2726 ---
[GitHub] nifi pull request #2736: NIFI-5223 Allow the usage of expression language fo...
GitHub user JohannesDaniel opened a pull request: https://github.com/apache/nifi/pull/2736 NIFI-5223 Allow the usage of expression language for properties of Re⦠â¦cordSetWriters 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] 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)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] 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/JohannesDaniel/nifi NIFI-5223 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2736.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 #2736 commit 62db98f86ed397e95c4f92eb45435c39aa932ec0 Author: JohannesDanielDate: 2018-05-22T19:54:48Z NIFI-5223 Allow the usage of expression language for properties of RecordSetWriters ---
[jira] [Commented] (NIFI-5223) Allow the usage of expression language for properties of RecordSetWriters
[ https://issues.apache.org/jira/browse/NIFI-5223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487853#comment-16487853 ] ASF GitHub Bot commented on NIFI-5223: -- GitHub user JohannesDaniel opened a pull request: https://github.com/apache/nifi/pull/2736 NIFI-5223 Allow the usage of expression language for properties of Re… …cordSetWriters 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] 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)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] 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/JohannesDaniel/nifi NIFI-5223 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2736.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 #2736 commit 62db98f86ed397e95c4f92eb45435c39aa932ec0 Author: JohannesDanielDate: 2018-05-22T19:54:48Z NIFI-5223 Allow the usage of expression language for properties of RecordSetWriters > Allow the usage of expression language for properties of RecordSetWriters > - > > Key: NIFI-5223 > URL: https://issues.apache.org/jira/browse/NIFI-5223 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Johannes Peter >Assignee: Johannes Peter >Priority: Major > > To allow the usage of expression language for properties of RecordSetWriters, > the method createWriter of the interface RecordSetWriterFactory has to be > enhanced by a parameter to provide a map containing variables of a FlowFile. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (NIFI-5225) Leak in RingBufferEventRepository for frequently updated flows
[ https://issues.apache.org/jira/browse/NIFI-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Payne updated NIFI-5225: - Resolution: Fixed Fix Version/s: 1.7.0 Status: Resolved (was: Patch Available) > Leak in RingBufferEventRepository for frequently updated flows > -- > > Key: NIFI-5225 > URL: https://issues.apache.org/jira/browse/NIFI-5225 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Environment: HDF-3.1.0.0 >Reporter: Frederik Petersen >Priority: Major > Labels: performance > Fix For: 1.7.0 > > > We use NiFi's API to change a part of our flow quite frequently. Over the > past weeks we have noticed that the performance of web requests degrades over > time and had a very hard time to find out why. > Today I took a closer look. When using visualvm to sample cpu it already > stood out that the longer the cluster was running, the more time was spent in > 'SecondPrecisionEventContainer.generateReport()' during web requests. This > method is already relied on a lot right after starting the cluster (for big > flows and process groups). But the time spent in it increases (in our setup) > the longer the cluster runs. This increases latency of almost every web > request. Our flow reconfiguration script (calling many NiFi API endpoints) > went from 2 minutes to 20 minutes run time in a few days. > Looking at the source code I couldn't quite figure out why the run time > should increase over time, because the ring buffers always stay the same size > (301 entries|5 minutes). > When sampling memory I noticed quite a lot of EventSum instances, more than > there should have been. So I took a heap dump and ran a MemoryAnalyzer tool. > The "Leak Suspects" overview gave me the final hint to what was wrong. > It reported: > One instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by > "" occupies 5,649,926,328 (55.74%) bytes. The instance > is referenced by > org.apache.nifi.controller.repository.metrics.RingBufferEventRepository @ > 0x7f86c50cda40 , loaded by "org.apache.nifi.nar.NarClassLoader @ > 0x7f86a000". The memory is accumulated in one instance of > "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by " loader>". > The issue is: > When we remove processors, connections, process groups from the flow, their > data is not removed from the ConcurrentHashMap in RingBufferEventRepository. > There is a 'purgeTransferEvents' but it only calls an empty 'purgeEvents' > method on all 'SecondPrecisionEventContainer's in the map. > This means that the map grows without bounds and every time > 'reportTransferEvents' is called it iterates over all (meaning more and more > over time) entries of the map. This increases latency of every web request > and also a huge amount of memory occupied. > A rough idea to fix this: > Remove the entry for each removed component (processor, process group, > connection, ?...) using their onRemoved Methods in the FlowController > This should stop the map from growing infinitely for any flow where removals > of any components happens frequently. Especially when automated. > Since this is quite urgent for us, I'll try to work on a fix for this and > provide a pull request if successful. > Since no-one noticed this before, I guess we are not the typical user of > NiFi, as we thought it was possible to heavily reconfigure flows using the > API, but with this performance issue, it's not. > Please let me know if I can provide any more helpful detail for this problem. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5225) Leak in RingBufferEventRepository for frequently updated flows
[ https://issues.apache.org/jira/browse/NIFI-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487733#comment-16487733 ] ASF GitHub Bot commented on NIFI-5225: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2732 > Leak in RingBufferEventRepository for frequently updated flows > -- > > Key: NIFI-5225 > URL: https://issues.apache.org/jira/browse/NIFI-5225 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Environment: HDF-3.1.0.0 >Reporter: Frederik Petersen >Priority: Major > Labels: performance > Fix For: 1.7.0 > > > We use NiFi's API to change a part of our flow quite frequently. Over the > past weeks we have noticed that the performance of web requests degrades over > time and had a very hard time to find out why. > Today I took a closer look. When using visualvm to sample cpu it already > stood out that the longer the cluster was running, the more time was spent in > 'SecondPrecisionEventContainer.generateReport()' during web requests. This > method is already relied on a lot right after starting the cluster (for big > flows and process groups). But the time spent in it increases (in our setup) > the longer the cluster runs. This increases latency of almost every web > request. Our flow reconfiguration script (calling many NiFi API endpoints) > went from 2 minutes to 20 minutes run time in a few days. > Looking at the source code I couldn't quite figure out why the run time > should increase over time, because the ring buffers always stay the same size > (301 entries|5 minutes). > When sampling memory I noticed quite a lot of EventSum instances, more than > there should have been. So I took a heap dump and ran a MemoryAnalyzer tool. > The "Leak Suspects" overview gave me the final hint to what was wrong. > It reported: > One instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by > "" occupies 5,649,926,328 (55.74%) bytes. The instance > is referenced by > org.apache.nifi.controller.repository.metrics.RingBufferEventRepository @ > 0x7f86c50cda40 , loaded by "org.apache.nifi.nar.NarClassLoader @ > 0x7f86a000". The memory is accumulated in one instance of > "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by " loader>". > The issue is: > When we remove processors, connections, process groups from the flow, their > data is not removed from the ConcurrentHashMap in RingBufferEventRepository. > There is a 'purgeTransferEvents' but it only calls an empty 'purgeEvents' > method on all 'SecondPrecisionEventContainer's in the map. > This means that the map grows without bounds and every time > 'reportTransferEvents' is called it iterates over all (meaning more and more > over time) entries of the map. This increases latency of every web request > and also a huge amount of memory occupied. > A rough idea to fix this: > Remove the entry for each removed component (processor, process group, > connection, ?...) using their onRemoved Methods in the FlowController > This should stop the map from growing infinitely for any flow where removals > of any components happens frequently. Especially when automated. > Since this is quite urgent for us, I'll try to work on a fix for this and > provide a pull request if successful. > Since no-one noticed this before, I guess we are not the typical user of > NiFi, as we thought it was possible to heavily reconfigure flows using the > API, but with this performance issue, it's not. > Please let me know if I can provide any more helpful detail for this problem. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5225) Leak in RingBufferEventRepository for frequently updated flows
[ https://issues.apache.org/jira/browse/NIFI-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487732#comment-16487732 ] ASF GitHub Bot commented on NIFI-5225: -- Github user markap14 commented on the issue: https://github.com/apache/nifi/pull/2732 @FrederikP all looks good here. I have merged the changes to master. Thanks for the fix! > Leak in RingBufferEventRepository for frequently updated flows > -- > > Key: NIFI-5225 > URL: https://issues.apache.org/jira/browse/NIFI-5225 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Environment: HDF-3.1.0.0 >Reporter: Frederik Petersen >Priority: Major > Labels: performance > Fix For: 1.7.0 > > > We use NiFi's API to change a part of our flow quite frequently. Over the > past weeks we have noticed that the performance of web requests degrades over > time and had a very hard time to find out why. > Today I took a closer look. When using visualvm to sample cpu it already > stood out that the longer the cluster was running, the more time was spent in > 'SecondPrecisionEventContainer.generateReport()' during web requests. This > method is already relied on a lot right after starting the cluster (for big > flows and process groups). But the time spent in it increases (in our setup) > the longer the cluster runs. This increases latency of almost every web > request. Our flow reconfiguration script (calling many NiFi API endpoints) > went from 2 minutes to 20 minutes run time in a few days. > Looking at the source code I couldn't quite figure out why the run time > should increase over time, because the ring buffers always stay the same size > (301 entries|5 minutes). > When sampling memory I noticed quite a lot of EventSum instances, more than > there should have been. So I took a heap dump and ran a MemoryAnalyzer tool. > The "Leak Suspects" overview gave me the final hint to what was wrong. > It reported: > One instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by > "" occupies 5,649,926,328 (55.74%) bytes. The instance > is referenced by > org.apache.nifi.controller.repository.metrics.RingBufferEventRepository @ > 0x7f86c50cda40 , loaded by "org.apache.nifi.nar.NarClassLoader @ > 0x7f86a000". The memory is accumulated in one instance of > "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by " loader>". > The issue is: > When we remove processors, connections, process groups from the flow, their > data is not removed from the ConcurrentHashMap in RingBufferEventRepository. > There is a 'purgeTransferEvents' but it only calls an empty 'purgeEvents' > method on all 'SecondPrecisionEventContainer's in the map. > This means that the map grows without bounds and every time > 'reportTransferEvents' is called it iterates over all (meaning more and more > over time) entries of the map. This increases latency of every web request > and also a huge amount of memory occupied. > A rough idea to fix this: > Remove the entry for each removed component (processor, process group, > connection, ?...) using their onRemoved Methods in the FlowController > This should stop the map from growing infinitely for any flow where removals > of any components happens frequently. Especially when automated. > Since this is quite urgent for us, I'll try to work on a fix for this and > provide a pull request if successful. > Since no-one noticed this before, I guess we are not the typical user of > NiFi, as we thought it was possible to heavily reconfigure flows using the > API, but with this performance issue, it's not. > Please let me know if I can provide any more helpful detail for this problem. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2732: NIFI-5225: Purge event data from event repository w...
Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2732 ---
[jira] [Commented] (NIFI-5225) Leak in RingBufferEventRepository for frequently updated flows
[ https://issues.apache.org/jira/browse/NIFI-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487730#comment-16487730 ] ASF subversion and git services commented on NIFI-5225: --- Commit d75ba167cd93042c3f747f4aacb507617694bc0c in nifi's branch refs/heads/master from [~FrederikP] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=d75ba16 ] NIFI-5225: Purge event data from event repository when Connectable is removed This closes #2732. Signed-off-by: Mark Payne> Leak in RingBufferEventRepository for frequently updated flows > -- > > Key: NIFI-5225 > URL: https://issues.apache.org/jira/browse/NIFI-5225 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Environment: HDF-3.1.0.0 >Reporter: Frederik Petersen >Priority: Major > Labels: performance > > We use NiFi's API to change a part of our flow quite frequently. Over the > past weeks we have noticed that the performance of web requests degrades over > time and had a very hard time to find out why. > Today I took a closer look. When using visualvm to sample cpu it already > stood out that the longer the cluster was running, the more time was spent in > 'SecondPrecisionEventContainer.generateReport()' during web requests. This > method is already relied on a lot right after starting the cluster (for big > flows and process groups). But the time spent in it increases (in our setup) > the longer the cluster runs. This increases latency of almost every web > request. Our flow reconfiguration script (calling many NiFi API endpoints) > went from 2 minutes to 20 minutes run time in a few days. > Looking at the source code I couldn't quite figure out why the run time > should increase over time, because the ring buffers always stay the same size > (301 entries|5 minutes). > When sampling memory I noticed quite a lot of EventSum instances, more than > there should have been. So I took a heap dump and ran a MemoryAnalyzer tool. > The "Leak Suspects" overview gave me the final hint to what was wrong. > It reported: > One instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by > "" occupies 5,649,926,328 (55.74%) bytes. The instance > is referenced by > org.apache.nifi.controller.repository.metrics.RingBufferEventRepository @ > 0x7f86c50cda40 , loaded by "org.apache.nifi.nar.NarClassLoader @ > 0x7f86a000". The memory is accumulated in one instance of > "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by " loader>". > The issue is: > When we remove processors, connections, process groups from the flow, their > data is not removed from the ConcurrentHashMap in RingBufferEventRepository. > There is a 'purgeTransferEvents' but it only calls an empty 'purgeEvents' > method on all 'SecondPrecisionEventContainer's in the map. > This means that the map grows without bounds and every time > 'reportTransferEvents' is called it iterates over all (meaning more and more > over time) entries of the map. This increases latency of every web request > and also a huge amount of memory occupied. > A rough idea to fix this: > Remove the entry for each removed component (processor, process group, > connection, ?...) using their onRemoved Methods in the FlowController > This should stop the map from growing infinitely for any flow where removals > of any components happens frequently. Especially when automated. > Since this is quite urgent for us, I'll try to work on a fix for this and > provide a pull request if successful. > Since no-one noticed this before, I guess we are not the typical user of > NiFi, as we thought it was possible to heavily reconfigure flows using the > API, but with this performance issue, it's not. > Please let me know if I can provide any more helpful detail for this problem. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2732: NIFI-5225: Purge event data from event repository when Con...
Github user markap14 commented on the issue: https://github.com/apache/nifi/pull/2732 @FrederikP all looks good here. I have merged the changes to master. Thanks for the fix! ---
[GitHub] nifi-minifi-cpp issue #336: MINIFICPP-498 Test newer compiler (gcc >= 6) (an...
Github user achristianson commented on the issue: https://github.com/apache/nifi-minifi-cpp/pull/336 Travis fail seems to be unrelated (segfault in C2 components). ---
[jira] [Commented] (NIFI-5225) Leak in RingBufferEventRepository for frequently updated flows
[ https://issues.apache.org/jira/browse/NIFI-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487688#comment-16487688 ] Mark Payne commented on NIFI-5225: -- [~FrederikP] I think you're right - there is certainly room to improve how we do the whole generateReport() stuff. I was noticing some of this stuff the other day as well when working on NIFI-5112/NIFI-950. There are quite a few inefficiencies. EventSumValue, for instance, is holding 15 AtomicLong/AtomicIntegers and a ConcurrentHashMap that get updated with each session commit and then have to be read each time we call generateReport() - for each component. That would probably be significantly more efficient to just use non-thread-safe member variables and synchronize the methods. Atomics are fast when you only need to update 1-2 of them but when you get to that many, it'll slow you down a good bit. But I think this is just due to the way that the system as evolved. We could also avoid calculating these for components we don't care about, as you mentioned, as well. With the results that I found during my profiling, this wasn't much of an issue. However, I also was mostly focusing on small flows, not flows with 1,000+ processors. That said, I think we should probably finish up the outstanding issues around NIFI-950, etc. and see where that leaves us. We can then certainly iterate to improve further if necessary. > Leak in RingBufferEventRepository for frequently updated flows > -- > > Key: NIFI-5225 > URL: https://issues.apache.org/jira/browse/NIFI-5225 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Environment: HDF-3.1.0.0 >Reporter: Frederik Petersen >Priority: Major > Labels: performance > > We use NiFi's API to change a part of our flow quite frequently. Over the > past weeks we have noticed that the performance of web requests degrades over > time and had a very hard time to find out why. > Today I took a closer look. When using visualvm to sample cpu it already > stood out that the longer the cluster was running, the more time was spent in > 'SecondPrecisionEventContainer.generateReport()' during web requests. This > method is already relied on a lot right after starting the cluster (for big > flows and process groups). But the time spent in it increases (in our setup) > the longer the cluster runs. This increases latency of almost every web > request. Our flow reconfiguration script (calling many NiFi API endpoints) > went from 2 minutes to 20 minutes run time in a few days. > Looking at the source code I couldn't quite figure out why the run time > should increase over time, because the ring buffers always stay the same size > (301 entries|5 minutes). > When sampling memory I noticed quite a lot of EventSum instances, more than > there should have been. So I took a heap dump and ran a MemoryAnalyzer tool. > The "Leak Suspects" overview gave me the final hint to what was wrong. > It reported: > One instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by > "" occupies 5,649,926,328 (55.74%) bytes. The instance > is referenced by > org.apache.nifi.controller.repository.metrics.RingBufferEventRepository @ > 0x7f86c50cda40 , loaded by "org.apache.nifi.nar.NarClassLoader @ > 0x7f86a000". The memory is accumulated in one instance of > "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by " loader>". > The issue is: > When we remove processors, connections, process groups from the flow, their > data is not removed from the ConcurrentHashMap in RingBufferEventRepository. > There is a 'purgeTransferEvents' but it only calls an empty 'purgeEvents' > method on all 'SecondPrecisionEventContainer's in the map. > This means that the map grows without bounds and every time > 'reportTransferEvents' is called it iterates over all (meaning more and more > over time) entries of the map. This increases latency of every web request > and also a huge amount of memory occupied. > A rough idea to fix this: > Remove the entry for each removed component (processor, process group, > connection, ?...) using their onRemoved Methods in the FlowController > This should stop the map from growing infinitely for any flow where removals > of any components happens frequently. Especially when automated. > Since this is quite urgent for us, I'll try to work on a fix for this and > provide a pull request if successful. > Since no-one noticed this before, I guess we are not the typical user of > NiFi, as we thought it was possible to heavily reconfigure flows using the > API, but with this performance issue, it's not. > Please let me know if I can provide any more helpful detail for this problem. > -- This message was sent by Atlassian JIRA
[jira] [Commented] (MINIFICPP-498) Add travis builds targeting newer compilers (>= gcc 6)
[ https://issues.apache.org/jira/browse/MINIFICPP-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487690#comment-16487690 ] ASF GitHub Bot commented on MINIFICPP-498: -- Github user achristianson commented on the issue: https://github.com/apache/nifi-minifi-cpp/pull/336 Travis fail seems to be unrelated (segfault in C2 components). > Add travis builds targeting newer compilers (>= gcc 6) > -- > > Key: MINIFICPP-498 > URL: https://issues.apache.org/jira/browse/MINIFICPP-498 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > > Some minificpp features are only available for newer compilers (lua/sol2, > regex, date manipulation), and we should cover these in CI via updating > travis.yml. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (NIFI-5229) Implement a DBCPConnectionPool that dynamically selects a connection pool
[ https://issues.apache.org/jira/browse/NIFI-5229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Bende updated NIFI-5229: -- Status: Patch Available (was: Open) > Implement a DBCPConnectionPool that dynamically selects a connection pool > - > > Key: NIFI-5229 > URL: https://issues.apache.org/jira/browse/NIFI-5229 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Bryan Bende >Priority: Major > > In NIFI-5121 we modified the DBCPConnectionPool interface to allow passing a > map of attributes (https://issues.apache.org/jira/browse/NIFI-5121). > We should implement a DBCPConnectionPool that lets you register multiple > other connection pools via dynamic properties, and then selects one based on > looking for an incoming attribute. > For example, lets say you create two regular connection pools A and B, then > in the new connection pool you would register: > a = pool1 > b = pool2 > and then the new connection pool will look in the attribute map for an > attribute like "database.id" and select the pool with the given id. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5229) Implement a DBCPConnectionPool that dynamically selects a connection pool
[ https://issues.apache.org/jira/browse/NIFI-5229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487605#comment-16487605 ] ASF GitHub Bot commented on NIFI-5229: -- GitHub user bbende opened a pull request: https://github.com/apache/nifi/pull/2735 NIFI-5229 Adding a DBCPService implementation that can lookup other D… …BCPServices dynamically at runtime 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] 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)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] 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/bbende/nifi NIFI-5229 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2735.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 #2735 commit 6bfb90019cb1404c63c4859e24586136e3c47534 Author: Bryan BendeDate: 2018-05-23T15:21:12Z NIFI-5229 Adding a DBCPService implementation that can lookup other DBCPServices dynamically at runtime > Implement a DBCPConnectionPool that dynamically selects a connection pool > - > > Key: NIFI-5229 > URL: https://issues.apache.org/jira/browse/NIFI-5229 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Bryan Bende >Priority: Major > > In NIFI-5121 we modified the DBCPConnectionPool interface to allow passing a > map of attributes (https://issues.apache.org/jira/browse/NIFI-5121). > We should implement a DBCPConnectionPool that lets you register multiple > other connection pools via dynamic properties, and then selects one based on > looking for an incoming attribute. > For example, lets say you create two regular connection pools A and B, then > in the new connection pool you would register: > a = pool1 > b = pool2 > and then the new connection pool will look in the attribute map for an > attribute like "database.id" and select the pool with the given id. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2735: NIFI-5229 Adding a DBCPService implementation that ...
GitHub user bbende opened a pull request: https://github.com/apache/nifi/pull/2735 NIFI-5229 Adding a DBCPService implementation that can lookup other D⦠â¦BCPServices dynamically at runtime 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: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] 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)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] 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/bbende/nifi NIFI-5229 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2735.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 #2735 commit 6bfb90019cb1404c63c4859e24586136e3c47534 Author: Bryan BendeDate: 2018-05-23T15:21:12Z NIFI-5229 Adding a DBCPService implementation that can lookup other DBCPServices dynamically at runtime ---
[jira] [Commented] (NIFI-4907) Provenance authorization refactoring
[ https://issues.apache.org/jira/browse/NIFI-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487599#comment-16487599 ] ASF GitHub Bot commented on NIFI-4907: -- Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/2703 Will review... > Provenance authorization refactoring > > > Key: NIFI-4907 > URL: https://issues.apache.org/jira/browse/NIFI-4907 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.5.0 >Reporter: Mark Bean >Assignee: Mark Bean >Priority: Major > > Currently, the 'view the data' component policy is too tightly coupled with > Provenance queries. The 'query provenance' policy should be the only policy > required for viewing Provenance query results. Both 'view the component' and > 'view the data' policies should be used to refine the appropriate visibility > of event details - but not the event itself. > 1) Component Visibility > The authorization of Provenance events is inconsistent with the behavior of > the graph. For example, if a user does not have 'view the component' policy, > the graph shows this component as a "black box" (no details such as name, > UUID, etc.) However, when querying Provenance, this component will show up > including the Component Type and the Component Name. This is in effect a > violation of the policy. These component details should be obscured in the > Provenance event displayed if user does not have the appropriate 'view the > component' policy. > 2) Data Visibility > For a Provenance query, all events should be visible as long as the user > performing the query belongs to the 'query provenance' global policy. As > mentioned above, some information about the component may be obscured > depending on 'view the component' policy, but the event itself should be > visible. Additionally, details of the event (clicking the View Details "i" > icon) should only be accessible if the user belongs to the 'view the data' > policy for the affected component. If the user is not in the appropriate > 'view the data' policy, a popup warning should be displayed indicating the > reason details are not visible with more specific detail than the current > "Contact the system administrator". > 3) Lineage Graphs > As with the Provenance table view recommendation above, the lineage graph > should display all events. Currently, if the lineage graph includes an event > belonging to a component which the user does not have 'view the data', it is > shown on the graph as "UNKNOWN". As with Data Visibility mentioned above, the > graph should indicate the event type as long as the user is in the 'view the > component'. Subsequent "View Details" on the event should only be visible if > the user is in the 'view the data' policy. > In summary, for Provenance query results and lineage graphs, all events > should be shown. Component Name and Component Type information should be > conditionally visible depending on the corresponding component policy 'view > the component' policy. Event details including Provenance event type and > FlowFile information should be conditionally available depending on the > corresponding component policy 'view the data'. Inability to display event > details should provide feedback to the user indicating the reason. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2703: NIFI-4907: add 'view provenance' component policy
Github user mcgilman commented on the issue: https://github.com/apache/nifi/pull/2703 Will review... ---
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487547#comment-16487547 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190301498 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487544#comment-16487544 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190298869 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487548#comment-16487548 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190303622 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487542#comment-16487542 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190297210 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487543#comment-16487543 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190297408 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487546#comment-16487546 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190305079 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487550#comment-16487550 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190300030 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487549#comment-16487549 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190296970 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190298869 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487545#comment-16487545 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190301930 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487541#comment-16487541 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190296854 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") --- End diff -- In case a destination is 'content', CSVAttributes won't be written at all (neither null nor empty string). We could mention that in description. > AttributesToCSV > --- > > Key: NIFI-1705 > URL: https://issues.apache.org/jira/browse/NIFI-1705 > Project: Apache NiFi > Issue Type: Sub-task > Components: Extensions >Reporter: Randy Gelhausen >Priority: Major > > Create a new processor which converts a Flowfile's attributes into CSV > content. > Should support the same configuration options as the AttributesToJSON > processor -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190301498 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190301930 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190305079 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190297210 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190296854 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") --- End diff -- In case a destination is 'content', CSVAttributes won't be written at all (neither null nor empty string). We could mention that in description. ---
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190303622 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190300030 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190297408 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[jira] [Commented] (NIFI-5222) With validation being performed asynchronously, updating a processor causes validation to occur 3 times instead of once
[ https://issues.apache.org/jira/browse/NIFI-5222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487537#comment-16487537 ] Mark Payne commented on NIFI-5222: -- [~joewitt] I have pushed another commit that I think will address all of your issues. The approach here I believe is correct, but there were a few places where I still was not properly waiting until the end to perform validation. As a result, we were causing a lot of background tasks for validation to occur. Specifically, when you copy & paste components (or instantiated templates) we were still causing a lot of validation. > With validation being performed asynchronously, updating a processor causes > validation to occur 3 times instead of once > --- > > Key: NIFI-5222 > URL: https://issues.apache.org/jira/browse/NIFI-5222 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.7.0 >Reporter: Mark Payne >Assignee: Mark Payne >Priority: Major > Fix For: 1.7.0 > > > With the merge of NIFI-950, we now have processors, controller services, and > reporting tasks being validated asynchronously. Each time that properties, > annotation data, or auto-terminated relationships are set, a task is kicked > off in the background to perform validation. Additionally, if any connections > are added/removed, it kicks off the task. > Right now, though, if a user clicks to configure a processor and then clicks > Apply, what happens on the back end is that we call setProperties(), > setAnnotationData(), and setAutoTerminatedRelationships() in the request. As > a result, we kick off validation 3 times. Instead, we should avoid kicking > off that background task until we've completed all updates to the > processor/controller service/reporting task. Then trigger validation only > once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190296970 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[jira] [Assigned] (MINIFICPP-507) Configure Appveyor to exit successfully
[ https://issues.apache.org/jira/browse/MINIFICPP-507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Christianson reassigned MINIFICPP-507: - Assignee: Andrew Christianson > Configure Appveyor to exit successfully > --- > > Key: MINIFICPP-507 > URL: https://issues.apache.org/jira/browse/MINIFICPP-507 > Project: NiFi MiNiFi C++ > Issue Type: Task >Reporter: Aldrin Piri >Assignee: Andrew Christianson >Priority: Major > > For the time being until we are reliant on Windows infra, we should configure > Appveyor to exit immediately and successfully. Configuration info available > at https://www.appveyor.com/docs/build-configuration/. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi-minifi-cpp pull request #338: Minificpp 508
GitHub user achristianson opened a pull request: https://github.com/apache/nifi-minifi-cpp/pull/338 Minificpp 508 Thank you for submitting a contribution to Apache NiFi - MiNiFi C++. 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 MINIFI- where 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] 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? - [x] If applicable, have you updated the NOTICE file? ### 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/achristianson/nifi-minifi-cpp MINIFICPP-508 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi-minifi-cpp/pull/338.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 #338 commit e743a210005eb6f8b6526fae58c281feda5449c9 Author: Andrew I. ChristiansonDate: 2018-05-22T14:42:50Z MINIFICPP-498 Test newer compiler (gcc >= 6) (and also test build of Docker image) in travis commit c79f9c4fcb493dd279e1e43678f026b86d0c2585 Author: Andrew I. Christianson Date: 2018-05-23T15:37:22Z MINIFICPP-508 Added EL support to Template property of ApplyTemplate ---
[jira] [Updated] (MINIFICPP-420) Add max size to repository metrics
[ https://issues.apache.org/jira/browse/MINIFICPP-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] marco polo updated MINIFICPP-420: - Fix Version/s: (was: 0.5.0) > Add max size to repository metrics > -- > > Key: MINIFICPP-420 > URL: https://issues.apache.org/jira/browse/MINIFICPP-420 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: marco polo >Priority: Major > > C2 repository metrics should include the maximum size of the repository > (prov/flow/content). The maximum size is a configuration option that can vary > by agent or agent type. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5073) JMSConnectionFactory doesn't resolve 'variables' properly
[ https://issues.apache.org/jira/browse/NIFI-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487485#comment-16487485 ] ASF GitHub Bot commented on NIFI-5073: -- Github user zenfenan commented on a diff in the pull request: https://github.com/apache/nifi/pull/2653#discussion_r190296123 --- Diff: nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/cf/JMSConnectionFactoryProvider.java --- @@ -159,13 +159,15 @@ public void enable(ConfigurationContext context) throws InitializationException if (logger.isInfoEnabled()) { logger.info("Configuring " + this.getClass().getSimpleName() + " for '" + context.getProperty(CONNECTION_FACTORY_IMPL).evaluateAttributeExpressions().getValue() + "' to be connected to '" -+ BROKER_URI + "'"); ++ context.getProperty(BROKER_URI).evaluateAttributeExpressions().getValue() + "'"); } + // will load user provided libraries/resources on the classpath - Utils.addResourcesToClasspath(context.getProperty(CLIENT_LIB_DIR_PATH).evaluateAttributeExpressions().getValue()); +final String clientLibPath = context.getProperty(CLIENT_LIB_DIR_PATH).evaluateAttributeExpressions().getValue(); +ClassLoader customClassLoader = ClassLoaderUtils.getCustomClassLoader(clientLibPath, this.getClass().getClassLoader(), null); + Thread.currentThread().setContextClassLoader(customClassLoader); --- End diff -- @markap14 Appreciate if you could take a look at this. > JMSConnectionFactory doesn't resolve 'variables' properly > - > > Key: NIFI-5073 > URL: https://issues.apache.org/jira/browse/NIFI-5073 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.5.0, 1.6.0 >Reporter: Matthew Clarke >Assignee: Sivaprasanna Sethuraman >Priority: Major > Attachments: > 0001-NIFI-5073-JMSConnectionFactoryProvider-now-resolves-.patch > > > Create a new process Group. > Add "Variables" to the process group: > for example: > broker_uri=tcp://localhost:4141 > client_libs=/NiFi/custom-lib-dir/MQlib > con_factory=blah > Then while that process group is selected, create a controller service. > Create JMSConnectionFactory. > Configure this controller service to use EL for PG defined variables above: > ${con_factory}, ${con_factory}, and ${broker_uri} > The controller service will remain invalid because the EL statements are not > properly resolved to their set values. > Doing the exact same thing above using the external NiFi registry file works > as expected. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487488#comment-16487488 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on the issue: https://github.com/apache/nifi/pull/2711 @joetrite , while AttributesToJSON has regex support for attributes, new AttributesToCSV doesn't have it - is there a reason for not keeping consistency? > AttributesToCSV > --- > > Key: NIFI-1705 > URL: https://issues.apache.org/jira/browse/NIFI-1705 > Project: Apache NiFi > Issue Type: Sub-task > Components: Extensions >Reporter: Randy Gelhausen >Priority: Major > > Create a new processor which converts a Flowfile's attributes into CSV > content. > Should support the same configuration options as the AttributesToJSON > processor -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on the issue: https://github.com/apache/nifi/pull/2711 @joetrite , while AttributesToJSON has regex support for attributes, new AttributesToCSV doesn't have it - is there a reason for not keeping consistency? ---
[GitHub] nifi pull request #2653: NIFI-5073: JMSConnectionFactoryProvider now resolve...
Github user zenfenan commented on a diff in the pull request: https://github.com/apache/nifi/pull/2653#discussion_r190296123 --- Diff: nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/cf/JMSConnectionFactoryProvider.java --- @@ -159,13 +159,15 @@ public void enable(ConfigurationContext context) throws InitializationException if (logger.isInfoEnabled()) { logger.info("Configuring " + this.getClass().getSimpleName() + " for '" + context.getProperty(CONNECTION_FACTORY_IMPL).evaluateAttributeExpressions().getValue() + "' to be connected to '" -+ BROKER_URI + "'"); ++ context.getProperty(BROKER_URI).evaluateAttributeExpressions().getValue() + "'"); } + // will load user provided libraries/resources on the classpath - Utils.addResourcesToClasspath(context.getProperty(CLIENT_LIB_DIR_PATH).evaluateAttributeExpressions().getValue()); +final String clientLibPath = context.getProperty(CLIENT_LIB_DIR_PATH).evaluateAttributeExpressions().getValue(); +ClassLoader customClassLoader = ClassLoaderUtils.getCustomClassLoader(clientLibPath, this.getClass().getClassLoader(), null); + Thread.currentThread().setContextClassLoader(customClassLoader); --- End diff -- @markap14 Appreciate if you could take a look at this. ---
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487483#comment-16487483 ] ASF GitHub Bot commented on NIFI-1705: -- Github user bdesert commented on the issue: https://github.com/apache/nifi/pull/2711 @joetrite , I would like to mention it under the current PR - there was a discussion about having ["record-aware" output](https://github.com/apache/nifi/pull/1589#issuecomment-383639761). This will need to be addressed, but I believe is not part of this PR, as there are use cases when having schema will limit capabilities of this processor. I.e. when list of attributes is empty, it is expected to get all flow file attributes on output, but the list is unknown, so a schema cannot be pre-defined. @mattyb149 , as alternative, we can issue enhancement jira for AttributeToRecord to address schema-specific extracts. > AttributesToCSV > --- > > Key: NIFI-1705 > URL: https://issues.apache.org/jira/browse/NIFI-1705 > Project: Apache NiFi > Issue Type: Sub-task > Components: Extensions >Reporter: Randy Gelhausen >Priority: Major > > Create a new processor which converts a Flowfile's attributes into CSV > content. > Should support the same configuration options as the AttributesToJSON > processor -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi issue #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user bdesert commented on the issue: https://github.com/apache/nifi/pull/2711 @joetrite , I would like to mention it under the current PR - there was a discussion about having ["record-aware" output](https://github.com/apache/nifi/pull/1589#issuecomment-383639761). This will need to be addressed, but I believe is not part of this PR, as there are use cases when having schema will limit capabilities of this processor. I.e. when list of attributes is empty, it is expected to get all flow file attributes on output, but the list is unknown, so a schema cannot be pre-defined. @mattyb149 , as alternative, we can issue enhancement jira for AttributeToRecord to address schema-specific extracts. ---
[jira] [Created] (MINIFICPP-508) Support EL for ApplyTemplate Template property
Andrew Christianson created MINIFICPP-508: - Summary: Support EL for ApplyTemplate Template property Key: MINIFICPP-508 URL: https://issues.apache.org/jira/browse/MINIFICPP-508 Project: NiFi MiNiFi C++ Issue Type: Improvement Reporter: Andrew Christianson Assignee: Andrew Christianson Allow template file to be dynamically specified using EL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487463#comment-16487463 ] ASF GitHub Bot commented on NIFI-1705: -- Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190291470 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190291470 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487453#comment-16487453 ] ASF GitHub Bot commented on NIFI-1705: -- Github user joetrite commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190288780 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user joetrite commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190288780 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + --- End diff -- will do, thanks for the feedback. ---
[jira] [Commented] (NIFI-1705) AttributesToCSV
[ https://issues.apache.org/jira/browse/NIFI-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487442#comment-16487442 ] ASF GitHub Bot commented on NIFI-1705: -- Github user joetrite commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190286828 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an
[GitHub] nifi pull request #2711: NIFI-1705 - Adding AttributesToCSV processor
Github user joetrite commented on a diff in the pull request: https://github.com/apache/nifi/pull/2711#discussion_r190286828 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToCSV.java --- @@ -0,0 +1,272 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.processors.standard; + +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.behavior.EventDriven; +import org.apache.nifi.annotation.behavior.SideEffectFree; +import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.Tags; +import org.apache.nifi.annotation.lifecycle.OnScheduled; +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.expression.ExpressionLanguageScope; +import org.apache.nifi.flowfile.FlowFile; +import org.apache.nifi.flowfile.attributes.CoreAttributes; +import org.apache.nifi.processor.AbstractProcessor; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessorInitializationContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.processor.Relationship; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.Collections; +import java.util.stream.Collectors; + +@EventDriven +@SideEffectFree +@SupportsBatching +@Tags({"csv", "attributes", "flowfile"}) +@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED) +@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV " + +"can be written to either a newly generated attribute named 'CSVAttributes' or written to the FlowFile as content. " + +"If the attribute value contains a comma, newline or double quote, then the attribute value will be " + +"escaped with double quotes. Any double quote characters in the attribute value are escaped with " + +"another double quote. If the attribute value does not contain a comma, newline or double quote, then the " + +"attribute value is returned unchanged.") +@WritesAttribute(attribute = "CSVAttributes", description = "CSV representation of Attributes") +public class AttributesToCSV extends AbstractProcessor { + +private static final String OUTPUT_NEW_ATTRIBUTE = "flowfile-attribute"; +private static final String OUTPUT_OVERWRITE_CONTENT = "flowfile-content"; +private static final String OUTPUT_ATTRIBUTE_NAME = "CSVAttributes"; +private static final String OUTPUT_SEPARATOR = ","; +private static final String OUTPUT_MIME_TYPE = "text/csv"; + + +public static final PropertyDescriptor ATTRIBUTES_LIST = new PropertyDescriptor.Builder() +.name("attribute-list") +.displayName("Attribute List") +.description("Comma separated list of attributes to be included in the resulting CSV. If this value " + +"is left empty then all existing Attributes will be included. This list of attributes is " + +"case sensitive and does not support attribute names that contain commas. If an attribute specified in the list is not found it will be emitted " + +"to the resulting CSV with an empty string or null depending on the 'Null Value' property. " + +"If a core attribute is
[jira] [Commented] (NIFI-5230) InvokeScriptedProcessor can issue a NullPointerException in customValidate
[ https://issues.apache.org/jira/browse/NIFI-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487440#comment-16487440 ] ASF GitHub Bot commented on NIFI-5230: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190286397 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- @ottobackwards , regarding Set vs List. Validation Result supposed to be Collection, so technically - any of them can be used. But consistency should come with Set, as if you check super class AbstractConfigurableComponent, its customValidate returns: return Collections.emptySet(); So, I would say, we need to refactor ArrayList into Set, but then there will be more potential regression impact. I'd recommend to keep it as is for this PR/Jira, and have another ticket opened on cosmetic improvement to change ArrayList to to some Set implementation during initialization. I hope it makes sense. > InvokeScriptedProcessor can issue a NullPointerException in customValidate > -- > > Key: NIFI-5230 > URL: https://issues.apache.org/jira/browse/NIFI-5230 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.6.0 >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 1.7.0 > > > NIFI-4968 improved the behavior of InvokeScriptedProcessor when the script > has an error during parsing/interpretation/compilation, and an improvement > was made to not output the same validation errors over and over again until > manual action was taken. As part of that improvement though, a bug was > introduced where a NullPointerException can occur. > Proposed fix is not to set the validation results to null on "clear", but > rather to an empty Set (which the code is expecting) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2734: NIFI-5230: Fixed NPE in InvokeScriptedProcessor on ...
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190286397 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- @ottobackwards , regarding Set vs List. Validation Result supposed to be Collection, so technically - any of them can be used. But consistency should come with Set, as if you check super class AbstractConfigurableComponent, its customValidate returns: return Collections.emptySet(); So, I would say, we need to refactor ArrayList into Set, but then there will be more potential regression impact. I'd recommend to keep it as is for this PR/Jira, and have another ticket opened on cosmetic improvement to change ArrayList to to some Set implementation during initialization. I hope it makes sense. ---
[jira] [Created] (MINIFICPP-507) Configure Appveyor to exit successfully
Aldrin Piri created MINIFICPP-507: - Summary: Configure Appveyor to exit successfully Key: MINIFICPP-507 URL: https://issues.apache.org/jira/browse/MINIFICPP-507 Project: NiFi MiNiFi C++ Issue Type: Task Reporter: Aldrin Piri For the time being until we are reliant on Windows infra, we should configure Appveyor to exit immediately and successfully. Configuration info available at https://www.appveyor.com/docs/build-configuration/. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5230) InvokeScriptedProcessor can issue a NullPointerException in customValidate
[ https://issues.apache.org/jira/browse/NIFI-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487429#comment-16487429 ] ASF GitHub Bot commented on NIFI-5230: -- Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190284675 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- Ok, that makes sense. Thanks for the explanation. > InvokeScriptedProcessor can issue a NullPointerException in customValidate > -- > > Key: NIFI-5230 > URL: https://issues.apache.org/jira/browse/NIFI-5230 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.6.0 >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 1.7.0 > > > NIFI-4968 improved the behavior of InvokeScriptedProcessor when the script > has an error during parsing/interpretation/compilation, and an improvement > was made to not output the same validation errors over and over again until > manual action was taken. As part of that improvement though, a bug was > introduced where a NullPointerException can occur. > Proposed fix is not to set the validation results to null on "clear", but > rather to an empty Set (which the code is expecting) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2734: NIFI-5230: Fixed NPE in InvokeScriptedProcessor on ...
Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190284675 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- Ok, that makes sense. Thanks for the explanation. ---
[jira] [Commented] (NIFI-5230) InvokeScriptedProcessor can issue a NullPointerException in customValidate
[ https://issues.apache.org/jira/browse/NIFI-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487422#comment-16487422 ] ASF GitHub Bot commented on NIFI-5230: -- Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190283975 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- @ottobackwards , when a processor is invalid (customValidate returned validation errors), we keep all the validationResults. Method 'customValidate' just check if there are already errors - no need to validate again, just return whatever is stored. When any property is getting modified - these validation results may not be accurate anymore, so we have to reset them. Once reset (onPropertyModified), next call to customValidate will run full validation and set new errors if found. So at any point we don't drop validation results for no reason. Am I missing anything? > InvokeScriptedProcessor can issue a NullPointerException in customValidate > -- > > Key: NIFI-5230 > URL: https://issues.apache.org/jira/browse/NIFI-5230 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.6.0 >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 1.7.0 > > > NIFI-4968 improved the behavior of InvokeScriptedProcessor when the script > has an error during parsing/interpretation/compilation, and an improvement > was made to not output the same validation errors over and over again until > manual action was taken. As part of that improvement though, a bug was > introduced where a NullPointerException can occur. > Proposed fix is not to set the validation results to null on "clear", but > rather to an empty Set (which the code is expecting) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MINIFICPP-498) Add travis builds targeting newer compilers (>= gcc 6)
[ https://issues.apache.org/jira/browse/MINIFICPP-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16487420#comment-16487420 ] ASF GitHub Bot commented on MINIFICPP-498: -- Github user achristianson commented on the issue: https://github.com/apache/nifi-minifi-cpp/pull/336 Rebased. > Add travis builds targeting newer compilers (>= gcc 6) > -- > > Key: MINIFICPP-498 > URL: https://issues.apache.org/jira/browse/MINIFICPP-498 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > > Some minificpp features are only available for newer compilers (lua/sol2, > regex, date manipulation), and we should cover these in CI via updating > travis.yml. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-413) Implement contains() Expression Language function
[ https://issues.apache.org/jira/browse/MINIFICPP-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-413: -- Fix Version/s: 0.5.0 > Implement contains() Expression Language function > - > > Key: MINIFICPP-413 > URL: https://issues.apache.org/jira/browse/MINIFICPP-413 > Project: NiFi MiNiFi C++ > Issue Type: Sub-task >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Implement contains() Expression Language function -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-416) Support crop properties in TFConvertImageToTensor
[ https://issues.apache.org/jira/browse/MINIFICPP-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-416: -- Fix Version/s: 0.5.0 > Support crop properties in TFConvertImageToTensor > - > > Key: MINIFICPP-416 > URL: https://issues.apache.org/jira/browse/MINIFICPP-416 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > In order to allow for modifying input aspect ratio (e.g. 4:3) to match output > ratio (e.g. 1:1), support cropping of the input image via the following new > optional properties: > * Crop Offset X > * Crop Offset Y > * Crop Size X > * Crop Size Y -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-118) Dynamic Properties support for processors
[ https://issues.apache.org/jira/browse/MINIFICPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-118: -- Fix Version/s: 0.5.0 > Dynamic Properties support for processors > - > > Key: MINIFICPP-118 > URL: https://issues.apache.org/jira/browse/MINIFICPP-118 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Affects Versions: 0.1.0 >Reporter: Jeremy Dyer >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Currently any Property read from the config.yml file that is not explicitly > defined in the processor's implementation will be ignored by Processor.cpp > when reading the configurations. This prevents any dynamic property from > being defined in the config.yml and passed to the processor at runtime. > Certain processors rely heavily on the concept of dynamic properties that are > passed to them at runtime to handle things like setting dynamic properties > based on properties that are declared. All of these possibilities cannot be > handled upfront so there should be a mechanism, most likely in Processor.cpp, > that allows for a list of dynamicProperties that are parsed form the > config.yml file to be stored and accessed by the underlying processor > implementation at runtime and use them as the processor desires. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-443) Support GET requests in ListenHTTP and allow response body to be configured
[ https://issues.apache.org/jira/browse/MINIFICPP-443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-443: -- Fix Version/s: 0.5.0 > Support GET requests in ListenHTTP and allow response body to be configured > --- > > Key: MINIFICPP-443 > URL: https://issues.apache.org/jira/browse/MINIFICPP-443 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Currently GET requests are not supported with ListenHTTP. This limits > functionality for no real reason. ListenHTTP should support GET requests > where output FlowFiles have no content, but do have headers and query string > information available. > Additionally, the response body written by ListenHTTP is always empty. This > should be configurable --preferably dynamically by using incoming FlowFiles > with a type/purpose attribute. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-430) GetFile incorrectly reports 0 file size for non-regular files
[ https://issues.apache.org/jira/browse/MINIFICPP-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-430: -- Fix Version/s: 0.5.0 > GetFile incorrectly reports 0 file size for non-regular files > - > > Key: MINIFICPP-430 > URL: https://issues.apache.org/jira/browse/MINIFICPP-430 > Project: NiFi MiNiFi C++ > Issue Type: Bug >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > When retrieving a non-regular file (e.g. a FIFO file) using GetFile, size is > incorrectly reported as 0. When file size can not be reliably determined via > stat, size should be inferred based on bytes actually read. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-422) Preserve type information in Expression Language
[ https://issues.apache.org/jira/browse/MINIFICPP-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-422: -- Fix Version/s: 0.5.0 > Preserve type information in Expression Language > > > Key: MINIFICPP-422 > URL: https://issues.apache.org/jira/browse/MINIFICPP-422 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > In order to improve accuracy/compatibility with Apache NiFi, type information > should be preserved in EL operations. In particular, treatment of null and > boolean values should be typed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-433) Create PutSQL (lite) implementation
[ https://issues.apache.org/jira/browse/MINIFICPP-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-433: -- Fix Version/s: 0.5.0 > Create PutSQL (lite) implementation > --- > > Key: MINIFICPP-433 > URL: https://issues.apache.org/jira/browse/MINIFICPP-433 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > SQLite is a lightweight, embedded DB. Including SQLite in MiNiFi - C++ will > enable many flow configurations not possible before because it will allow > keeping lightweight, structured, query-able state on endpoint devices. > Embedded IoT use is recommended by the SQLite project: > "Embedded devices and the internet of things > Because an SQLite database requires no administration, it works well in > devices that must operate without expert human support. SQLite is a good fit > for use in cellphones, set-top boxes, televisions, game consoles, cameras, > watches, kitchen appliances, thermostats, automobiles, machine tools, > airplanes, remote sensors, drones, medical devices, and robots: the "internet > of things". > Client/server database engines are designed to live inside a > lovingly-attended datacenter at the core of the network. SQLite works there > too, but SQLite also thrives at the edge of the network, fending for itself > while providing fast and reliable data services to applications that would > otherwise have dodgy connectivity." > https://www.sqlite.org/whentouse.html -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-388) DockerBuild.sh missing controller/ and LibExample/ dirs
[ https://issues.apache.org/jira/browse/MINIFICPP-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-388: -- Fix Version/s: 0.5.0 > DockerBuild.sh missing controller/ and LibExample/ dirs > --- > > Key: MINIFICPP-388 > URL: https://issues.apache.org/jira/browse/MINIFICPP-388 > Project: NiFi MiNiFi C++ > Issue Type: Bug >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > The controller/ and LibExample/ dirs are not copied to docker/minificppsource > during make docker, leading to a swift build failure. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] nifi pull request #2734: NIFI-5230: Fixed NPE in InvokeScriptedProcessor on ...
Github user bdesert commented on a diff in the pull request: https://github.com/apache/nifi/pull/2734#discussion_r190283975 --- Diff: nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java --- @@ -237,7 +237,7 @@ public void setup() { @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { --- End diff -- @ottobackwards , when a processor is invalid (customValidate returned validation errors), we keep all the validationResults. Method 'customValidate' just check if there are already errors - no need to validate again, just return whatever is stored. When any property is getting modified - these validation results may not be accurate anymore, so we have to reset them. Once reset (onPropertyModified), next call to customValidate will run full validation and set new errors if found. So at any point we don't drop validation results for no reason. Am I missing anything? ---
[jira] [Updated] (MINIFICPP-446) Implement escape/unescape HTML3 EL functions
[ https://issues.apache.org/jira/browse/MINIFICPP-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-446: -- Fix Version/s: 0.5.0 > Implement escape/unescape HTML3 EL functions > > > Key: MINIFICPP-446 > URL: https://issues.apache.org/jira/browse/MINIFICPP-446 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > [Encode/Decode > Functions|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#encode] > * > [escapeHtml3|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escapehtml3] > * > [unescapeHtml3|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#unescapehtml3] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-455) Implement escape/unescape HTML4 EL functions
[ https://issues.apache.org/jira/browse/MINIFICPP-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-455: -- Fix Version/s: 0.5.0 > Implement escape/unescape HTML4 EL functions > > > Key: MINIFICPP-455 > URL: https://issues.apache.org/jira/browse/MINIFICPP-455 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > [Encode/Decode > Functions|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#encode] > * > [escapeHtml4|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escapehtml4] > * > [unescapeHtml4|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#unescapehtml4] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-428) Implement encode/decode JSON EL functions
[ https://issues.apache.org/jira/browse/MINIFICPP-428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-428: -- Fix Version/s: 0.5.0 > Implement encode/decode JSON EL functions > - > > Key: MINIFICPP-428 > URL: https://issues.apache.org/jira/browse/MINIFICPP-428 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Encode/decode JSON. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-402) Add docs for UpdateAttribute
[ https://issues.apache.org/jira/browse/MINIFICPP-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-402: -- Fix Version/s: 0.5.0 > Add docs for UpdateAttribute > > > Key: MINIFICPP-402 > URL: https://issues.apache.org/jira/browse/MINIFICPP-402 > Project: NiFi MiNiFi C++ > Issue Type: Documentation >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Docs need to be added to README/PROCESSORS.md for UpdateAttribute. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-436) Implement encode/decode XML EL functions
[ https://issues.apache.org/jira/browse/MINIFICPP-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-436: -- Fix Version/s: 0.5.0 > Implement encode/decode XML EL functions > > > Key: MINIFICPP-436 > URL: https://issues.apache.org/jira/browse/MINIFICPP-436 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > [Encode/Decode > Functions|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#encode] > * > [escapeXml|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escapexml] > * > [unescapeXml|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#unescapexml] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-434) Create ExecuteSQL (lite) implementation
[ https://issues.apache.org/jira/browse/MINIFICPP-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-434: -- Fix Version/s: 0.5.0 > Create ExecuteSQL (lite) implementation > --- > > Key: MINIFICPP-434 > URL: https://issues.apache.org/jira/browse/MINIFICPP-434 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > SQLite is a lightweight, embedded DB. Including SQLite in MiNiFi - C++ will > enable many flow configurations not possible before because it will allow > keeping lightweight, structured, query-able state on endpoint devices. > Embedded IoT use is recommended by the SQLite project: > "Embedded devices and the internet of things > Because an SQLite database requires no administration, it works well in > devices that must operate without expert human support. SQLite is a good fit > for use in cellphones, set-top boxes, televisions, game consoles, cameras, > watches, kitchen appliances, thermostats, automobiles, machine tools, > airplanes, remote sensors, drones, medical devices, and robots: the "internet > of things". > Client/server database engines are designed to live inside a > lovingly-attended datacenter at the core of the network. SQLite works there > too, but SQLite also thrives at the edge of the network, fending for itself > while providing fast and reliable data services to applications that would > otherwise have dodgy connectivity." > https://www.sqlite.org/whentouse.html -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-449) Allow cURL to be built and statically linked
[ https://issues.apache.org/jira/browse/MINIFICPP-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-449: -- Fix Version/s: 0.5.0 > Allow cURL to be built and statically linked > > > Key: MINIFICPP-449 > URL: https://issues.apache.org/jira/browse/MINIFICPP-449 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Allowing cURL to be built as an external project and linked statically will > help support certain embedded deployments and certain portability situations. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-397) Implement RouteOnAttribute
[ https://issues.apache.org/jira/browse/MINIFICPP-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-397: -- Fix Version/s: 0.5.0 > Implement RouteOnAttribute > -- > > Key: MINIFICPP-397 > URL: https://issues.apache.org/jira/browse/MINIFICPP-397 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > RouteOnAttribute is notably missing from MiNiFi - C++ and should be > implemented. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-401) Implement Dynamic Relationships
[ https://issues.apache.org/jira/browse/MINIFICPP-401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-401: -- Fix Version/s: 0.5.0 > Implement Dynamic Relationships > --- > > Key: MINIFICPP-401 > URL: https://issues.apache.org/jira/browse/MINIFICPP-401 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Certain features (e.g. RouteOnAttribute) require processor output > relationships to be created dynamically. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-414) Implement Expression Language boolean logic operations
[ https://issues.apache.org/jira/browse/MINIFICPP-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-414: -- Fix Version/s: 0.5.0 > Implement Expression Language boolean logic operations > -- > > Key: MINIFICPP-414 > URL: https://issues.apache.org/jira/browse/MINIFICPP-414 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > [Boolean > Logic|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#boolean] > * > [isNull|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#isnull] > * > [notNull|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#notnull] > * > [isEmpty|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#isempty] > * > [equals|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#equals] > * > [equalsIgnoreCase|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#equalsignorecase] > * > [gt|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#gt] > * > [ge|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#ge] > * > [lt|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#lt] > * > [le|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#le] > * > [and|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#and] > * > [or|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#or] > * > [not|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#not] > * > [ifElse|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#ifelse] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-387) Allow TF path to be manually specified via env var
[ https://issues.apache.org/jira/browse/MINIFICPP-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-387: -- Fix Version/s: 0.5.0 > Allow TF path to be manually specified via env var > -- > > Key: MINIFICPP-387 > URL: https://issues.apache.org/jira/browse/MINIFICPP-387 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Minor > Fix For: 0.5.0 > > > If TensorFlow is installed in a custom or unusual location, we should allow > the user to specify the path via environment variable as part of the CMake > build. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-453) Support external build/static link of zlib
[ https://issues.apache.org/jira/browse/MINIFICPP-453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-453: -- Fix Version/s: 0.5.0 > Support external build/static link of zlib > -- > > Key: MINIFICPP-453 > URL: https://issues.apache.org/jira/browse/MINIFICPP-453 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > To improve portability in certain cases, support building and > statically-linking zlib as an external project. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-415) Implement matches() Expression Language function
[ https://issues.apache.org/jira/browse/MINIFICPP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-415: -- Fix Version/s: 0.5.0 > Implement matches() Expression Language function > > > Key: MINIFICPP-415 > URL: https://issues.apache.org/jira/browse/MINIFICPP-415 > Project: NiFi MiNiFi C++ > Issue Type: Sub-task >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > Implement matches() Expression Language function -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (MINIFICPP-440) Build & statically link libressl when not available in system
[ https://issues.apache.org/jira/browse/MINIFICPP-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri updated MINIFICPP-440: -- Fix Version/s: 0.5.0 > Build & statically link libressl when not available in system > - > > Key: MINIFICPP-440 > URL: https://issues.apache.org/jira/browse/MINIFICPP-440 > Project: NiFi MiNiFi C++ > Issue Type: Improvement >Reporter: Andrew Christianson >Assignee: Andrew Christianson >Priority: Major > Fix For: 0.5.0 > > > In order to target systems where no SSL library is available, we should > support building & statically linking LibreSSL. This will help make MiNiFi - > C++ more portable. -- This message was sent by Atlassian JIRA (v7.6.3#76005)