[jira] [Commented] (NIFI-4333) Dockerize NiFi Toolkit

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4333:
--

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

https://github.com/apache/nifi/pull/2161#discussion_r154488084
  
--- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
@@ -100,4 +100,87 @@ language governing permissions and limitations under 
the License. -->
 compile
 
 
+
+
+
+
+docker
+
+
+
+maven-resources-plugin
+
+
+copy-resources
--- End diff --

On my machine, this copy execution does not preserve file permissions for 
`docker-entrypoint.sh`, so when I try to run the image, I get: 

> starting container process caused "exec: 
\"/opt/sh/docker-entrypoint.sh\": permission denied".


> Dockerize NiFi Toolkit
> --
>
> Key: NIFI-4333
> URL: https://issues.apache.org/jira/browse/NIFI-4333
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Docker
>Reporter: Aldrin Piri
>Assignee: Aldrin Piri
>
> It would be helpful to have a TLS Toolkit image to work in conjunction with 
> NiFI and would help in orchestration of clustered instances as well as 
> provisioning security items.
> As this is one assembly, we should support all tooling provided through one 
> image.



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


[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

2017-12-01 Thread kevdoran
Github user kevdoran commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2161#discussion_r154488084
  
--- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
@@ -100,4 +100,87 @@ language governing permissions and limitations under 
the License. -->
 compile
 
 
+
+
+
+
+docker
+
+
+
+maven-resources-plugin
+
+
+copy-resources
--- End diff --

On my machine, this copy execution does not preserve file permissions for 
`docker-entrypoint.sh`, so when I try to run the image, I get: 

> starting container process caused "exec: 
\"/opt/sh/docker-entrypoint.sh\": permission denied".


---


[jira] [Commented] (NIFI-4428) Implement PutDruid Processor and Controller

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4428:
--

Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2310
  
Need to add Kerberos support to this, but wanted to get the PR up for 
review/test for folks who won't be using Kerberos


> Implement PutDruid Processor and Controller
> ---
>
> Key: NIFI-4428
> URL: https://issues.apache.org/jira/browse/NIFI-4428
> Project: Apache NiFi
>  Issue Type: New Feature
>Affects Versions: 1.3.0
>Reporter: Vadim Vaks
>Assignee: Matt Burgess
>
> Implement a PutDruid Processor and Controller using Tranquility API. This 
> will enable Nifi to index contents of flow files in Druid. The implementation 
> should also be able to handle late arriving data (event timestamp points to 
> Druid indexing task that has closed, segment granularity and grace window 
> period expired). Late arriving data is typically dropped. Nifi should allow 
> late arriving data to be diverted to FAILED or DROPPED relationship. That 
> would allow late arriving data to be stored on HDFS or S3 until a re-indexing 
> task can merge it into the correct segment in deep storage.



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


[GitHub] nifi issue #2310: NIFI-4428: Add PutDruidRecord processor and DruidTranquili...

2017-12-01 Thread mattyb149
Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2310
  
Need to add Kerberos support to this, but wanted to get the PR up for 
review/test for folks who won't be using Kerberos


---


[jira] [Resolved] (NIFIREG-60) Add support for configuring NiFi Identities in FileAccessPolicyProvider

2017-12-01 Thread Bryan Bende (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFIREG-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Bende resolved NIFIREG-60.

   Resolution: Fixed
Fix Version/s: 0.0.1

> Add support for configuring NiFi Identities in FileAccessPolicyProvider
> ---
>
> Key: NIFIREG-60
> URL: https://issues.apache.org/jira/browse/NIFIREG-60
> Project: NiFi Registry
>  Issue Type: New Feature
>Reporter: Kevin Doran
>Assignee: Kevin Doran
> Fix For: 0.0.1
>
>
> Similar to how in NiFi a user is to configure Node Identities in 
> authorizers.xml to enable clustered NiFi nodes to be initialized as proxies 
> for other users, NiFi Registry should allow for NiFi clients identities to be 
> initialized as authorized proxies for end users, via a similar configuration 
> scheme.



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


[jira] [Commented] (NIFIREG-60) Add support for configuring NiFi Identities in FileAccessPolicyProvider

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFIREG-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16275032#comment-16275032
 ] 

ASF GitHub Bot commented on NIFIREG-60:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-registry/pull/45


> Add support for configuring NiFi Identities in FileAccessPolicyProvider
> ---
>
> Key: NIFIREG-60
> URL: https://issues.apache.org/jira/browse/NIFIREG-60
> Project: NiFi Registry
>  Issue Type: New Feature
>Reporter: Kevin Doran
>Assignee: Kevin Doran
> Fix For: 0.0.1
>
>
> Similar to how in NiFi a user is to configure Node Identities in 
> authorizers.xml to enable clustered NiFi nodes to be initialized as proxies 
> for other users, NiFi Registry should allow for NiFi clients identities to be 
> initialized as authorized proxies for end users, via a similar configuration 
> scheme.



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


[GitHub] nifi-registry pull request #45: NIFIREG-60 NiFi Proxy Identity Support

2017-12-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi-registry/pull/45


---


[jira] [Commented] (NIFIREG-60) Add support for configuring NiFi Identities in FileAccessPolicyProvider

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFIREG-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16275029#comment-16275029
 ] 

ASF GitHub Bot commented on NIFIREG-60:
---

Github user bbende commented on the issue:

https://github.com/apache/nifi-registry/pull/45
  
+1 all looks good now, was able to run the TestUserClient with a proxied 
entity based on setting up the initial NiFi identity in authorizers.xml, will 
merge


> Add support for configuring NiFi Identities in FileAccessPolicyProvider
> ---
>
> Key: NIFIREG-60
> URL: https://issues.apache.org/jira/browse/NIFIREG-60
> Project: NiFi Registry
>  Issue Type: New Feature
>Reporter: Kevin Doran
>Assignee: Kevin Doran
>
> Similar to how in NiFi a user is to configure Node Identities in 
> authorizers.xml to enable clustered NiFi nodes to be initialized as proxies 
> for other users, NiFi Registry should allow for NiFi clients identities to be 
> initialized as authorized proxies for end users, via a similar configuration 
> scheme.



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


[jira] [Commented] (NIFIREG-59) Migrate Authorizer-specific exceptions to more generic SecurityProvider exceptiosn

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFIREG-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274966#comment-16274966
 ] 

ASF GitHub Bot commented on NIFIREG-59:
---

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-registry/pull/44


> Migrate Authorizer-specific exceptions to more generic SecurityProvider 
> exceptiosn
> --
>
> Key: NIFIREG-59
> URL: https://issues.apache.org/jira/browse/NIFIREG-59
> Project: NiFi Registry
>  Issue Type: Improvement
>Reporter: Kevin Doran
>Assignee: Kevin Doran
>Priority: Minor
> Fix For: 0.0.1
>
>
> As part of NIFIREG-45, the nifi-registry-security-api was simplified, 
> included exception types. New SecurityProviderCreationException and 
> SecurityProviderDestructionException types were introduced designed to cover 
> all security provider types (Authorizers, IdentityProviders, etc). This 
> ticket is to remove the usage of the old, provider-type specific 
> creation/destruction exceptions in place of the new types.



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


[jira] [Commented] (NIFIREG-59) Migrate Authorizer-specific exceptions to more generic SecurityProvider exceptiosn

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFIREG-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274964#comment-16274964
 ] 

ASF GitHub Bot commented on NIFIREG-59:
---

Github user bbende commented on the issue:

https://github.com/apache/nifi-registry/pull/44
  
+1 Looks good, will merge to master, thanks!


> Migrate Authorizer-specific exceptions to more generic SecurityProvider 
> exceptiosn
> --
>
> Key: NIFIREG-59
> URL: https://issues.apache.org/jira/browse/NIFIREG-59
> Project: NiFi Registry
>  Issue Type: Improvement
>Reporter: Kevin Doran
>Assignee: Kevin Doran
>Priority: Minor
>
> As part of NIFIREG-45, the nifi-registry-security-api was simplified, 
> included exception types. New SecurityProviderCreationException and 
> SecurityProviderDestructionException types were introduced designed to cover 
> all security provider types (Authorizers, IdentityProviders, etc). This 
> ticket is to remove the usage of the old, provider-type specific 
> creation/destruction exceptions in place of the new types.



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


[GitHub] nifi-registry issue #44: NIFIREG-59 Migrate Authorizer Exceptions

2017-12-01 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi-registry/pull/44
  
+1 Looks good, will merge to master, thanks!


---


[GitHub] nifi-registry pull request #44: NIFIREG-59 Migrate Authorizer Exceptions

2017-12-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi-registry/pull/44


---


[GitHub] nifi-registry pull request #45: NIFIREG-60 NiFi Proxy Identity Support

2017-12-01 Thread kevdoran
Github user kevdoran commented on a diff in the pull request:

https://github.com/apache/nifi-registry/pull/45#discussion_r154445377
  
--- Diff: 
nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/file/FileAccessPolicyProvider.java
 ---
@@ -517,28 +522,22 @@ private void populateInitialAdmin(final 
Authorizations authorizations) {
 }
 }
 
-///**
-// * Creates a user for each node and gives the nodes write permission 
to /proxy.
-// *
-// * @param authorizations the overall authorizations
-// */
-//private void populateNodes(Authorizations authorizations) {
-//for (String nodeIdentity : nodeIdentities) {
-//final User node = 
userGroupProvider.getUserByIdentity(nodeIdentity);
-//if (node == null) {
-//throw new AuthorizerCreationException("Unable to locate 
node " + nodeIdentity + " to seed policies.");
-//}
-//
-//// grant access to the proxy resource
-//addUserToAccessPolicy(authorizations, 
ResourceType.Proxy.getValue(), node.getIdentifier(), WRITE_CODE);
-//
-//// grant the user read/write access data of the root group
-//if (rootGroupId != null) {
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), READ_CODE);
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), WRITE_CODE);
-//}
-//}
-//}
+/**
+ * Creates a user for each NiFi client and gives each one write 
permission to /proxy.
+ *
+ * @param authorizations the overall authorizations
+ */
+private void populateNodes(Authorizations authorizations) {
--- End diff --

Good catch, will update


---


[jira] [Commented] (NIFIREG-60) Add support for configuring NiFi Identities in FileAccessPolicyProvider

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFIREG-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274952#comment-16274952
 ] 

ASF GitHub Bot commented on NIFIREG-60:
---

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

https://github.com/apache/nifi-registry/pull/45#discussion_r154445195
  
--- Diff: 
nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/file/FileAccessPolicyProvider.java
 ---
@@ -517,28 +522,22 @@ private void populateInitialAdmin(final 
Authorizations authorizations) {
 }
 }
 
-///**
-// * Creates a user for each node and gives the nodes write permission 
to /proxy.
-// *
-// * @param authorizations the overall authorizations
-// */
-//private void populateNodes(Authorizations authorizations) {
-//for (String nodeIdentity : nodeIdentities) {
-//final User node = 
userGroupProvider.getUserByIdentity(nodeIdentity);
-//if (node == null) {
-//throw new AuthorizerCreationException("Unable to locate 
node " + nodeIdentity + " to seed policies.");
-//}
-//
-//// grant access to the proxy resource
-//addUserToAccessPolicy(authorizations, 
ResourceType.Proxy.getValue(), node.getIdentifier(), WRITE_CODE);
-//
-//// grant the user read/write access data of the root group
-//if (rootGroupId != null) {
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), READ_CODE);
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), WRITE_CODE);
-//}
-//}
-//}
+/**
+ * Creates a user for each NiFi client and gives each one write 
permission to /proxy.
+ *
+ * @param authorizations the overall authorizations
+ */
+private void populateNodes(Authorizations authorizations) {
--- End diff --

Looks like this needs to get called from the load method similar to 
populateInitialAdmin


> Add support for configuring NiFi Identities in FileAccessPolicyProvider
> ---
>
> Key: NIFIREG-60
> URL: https://issues.apache.org/jira/browse/NIFIREG-60
> Project: NiFi Registry
>  Issue Type: New Feature
>Reporter: Kevin Doran
>Assignee: Kevin Doran
>
> Similar to how in NiFi a user is to configure Node Identities in 
> authorizers.xml to enable clustered NiFi nodes to be initialized as proxies 
> for other users, NiFi Registry should allow for NiFi clients identities to be 
> initialized as authorized proxies for end users, via a similar configuration 
> scheme.



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


[GitHub] nifi-registry pull request #45: NIFIREG-60 NiFi Proxy Identity Support

2017-12-01 Thread bbende
Github user bbende commented on a diff in the pull request:

https://github.com/apache/nifi-registry/pull/45#discussion_r154445195
  
--- Diff: 
nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/file/FileAccessPolicyProvider.java
 ---
@@ -517,28 +522,22 @@ private void populateInitialAdmin(final 
Authorizations authorizations) {
 }
 }
 
-///**
-// * Creates a user for each node and gives the nodes write permission 
to /proxy.
-// *
-// * @param authorizations the overall authorizations
-// */
-//private void populateNodes(Authorizations authorizations) {
-//for (String nodeIdentity : nodeIdentities) {
-//final User node = 
userGroupProvider.getUserByIdentity(nodeIdentity);
-//if (node == null) {
-//throw new AuthorizerCreationException("Unable to locate 
node " + nodeIdentity + " to seed policies.");
-//}
-//
-//// grant access to the proxy resource
-//addUserToAccessPolicy(authorizations, 
ResourceType.Proxy.getValue(), node.getIdentifier(), WRITE_CODE);
-//
-//// grant the user read/write access data of the root group
-//if (rootGroupId != null) {
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), READ_CODE);
-//addUserToAccessPolicy(authorizations, 
ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + 
rootGroupId, node.getIdentifier(), WRITE_CODE);
-//}
-//}
-//}
+/**
+ * Creates a user for each NiFi client and gives each one write 
permission to /proxy.
+ *
+ * @param authorizations the overall authorizations
+ */
+private void populateNodes(Authorizations authorizations) {
--- End diff --

Looks like this needs to get called from the load method similar to 
populateInitialAdmin


---


[jira] [Commented] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4645:
--

GitHub user mcgilman opened a pull request:

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

NIFI-4645: Remove activation rules for include the grpc bundle

NIFI-4645:
- Removing rule based activation because it was causing the 
generateArchives profile to not activate. Now the grpc bundle can be excluded 
by disabling the include-grpc profile.

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

$ git pull https://github.com/mcgilman/nifi NIFI-4645

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

https://github.com/apache/nifi/pull/2311.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 #2311


commit 3da6d781118fc67afcc812082372a79cc34f1c21
Author: Matt Gilman 
Date:   2017-12-01T20:14:28Z

NIFI-4645:
- Removing rule based activation because it was causing the 
generateArchives profile to not activate. Now the grpc bundle can be excluded 
by disabling the include-grpc profile.




> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[GitHub] nifi pull request #2311: NIFI-4645: Remove activation rules for include the ...

2017-12-01 Thread mcgilman
GitHub user mcgilman opened a pull request:

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

NIFI-4645: Remove activation rules for include the grpc bundle

NIFI-4645:
- Removing rule based activation because it was causing the 
generateArchives profile to not activate. Now the grpc bundle can be excluded 
by disabling the include-grpc profile.

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

$ git pull https://github.com/mcgilman/nifi NIFI-4645

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

https://github.com/apache/nifi/pull/2311.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 #2311


commit 3da6d781118fc67afcc812082372a79cc34f1c21
Author: Matt Gilman 
Date:   2017-12-01T20:14:28Z

NIFI-4645:
- Removing rule based activation because it was causing the 
generateArchives profile to not activate. Now the grpc bundle can be excluded 
by disabling the include-grpc profile.




---


[jira] [Reopened] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread Matt Gilman (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Gilman reopened NIFI-4645:
---

> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[jira] [Resolved] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread Matt Gilman (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Gilman resolved NIFI-4645.
---
Resolution: Fixed

> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[jira] [Commented] (MINIFICPP-280) Move extension tests and test headers, lint extensions

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274759#comment-16274759
 ] 

ASF GitHub Bot commented on MINIFICPP-280:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/168#discussion_r154417158
  
--- Diff: extensions/http-curl/client/HTTPClient.cpp ---
@@ -87,26 +89,17 @@ HTTPClient::HTTPClient()
 }
 
 HTTPClient::~HTTPClient() {
-  if (nullptr != headers_) {
-curl_slist_free_all(headers_);
-headers_ = nullptr;
-  }
-  if (http_session_ != nullptr) {
-curl_easy_cleanup(http_session_);
-http_session_ = nullptr;
-  }
+  forceClose();
--- End diff --

Why did you remove the destruction of http_session_ ? That means we can't 
reclaim resources and in some cases may result in a TCP socket in CLOSE_WAIT


> Move extension tests and test headers, lint extensions
> --
>
> Key: MINIFICPP-280
> URL: https://issues.apache.org/jira/browse/MINIFICPP-280
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Caleb Johnson
>Priority: Minor
>
> * move extension tests into their respective folders
> * separate source and header files
> * remove unnecessary or nonexisting include directories
> * run linter on extension source files as part of linter target
> * clean up extensions according to linter
> * add ability to specify more than one include and source folder for linter



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


[GitHub] nifi-minifi-cpp pull request #168: MINIFICPP-280 Move extension tests and te...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/168#discussion_r154417158
  
--- Diff: extensions/http-curl/client/HTTPClient.cpp ---
@@ -87,26 +89,17 @@ HTTPClient::HTTPClient()
 }
 
 HTTPClient::~HTTPClient() {
-  if (nullptr != headers_) {
-curl_slist_free_all(headers_);
-headers_ = nullptr;
-  }
-  if (http_session_ != nullptr) {
-curl_easy_cleanup(http_session_);
-http_session_ = nullptr;
-  }
+  forceClose();
--- End diff --

Why did you remove the destruction of http_session_ ? That means we can't 
reclaim resources and in some cases may result in a TCP socket in CLOSE_WAIT


---


[GitHub] nifi issue #2310: NIFI-4428: Add PutDruidRecord processor and DruidTranquili...

2017-12-01 Thread mattyb149
Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2310
  
I started with #2181 and refactored to use the RecordReader/Writer API


---


[jira] [Commented] (NIFI-4428) Implement PutDruid Processor and Controller

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4428:
--

Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2310
  
I started with #2181 and refactored to use the RecordReader/Writer API


> Implement PutDruid Processor and Controller
> ---
>
> Key: NIFI-4428
> URL: https://issues.apache.org/jira/browse/NIFI-4428
> Project: Apache NiFi
>  Issue Type: New Feature
>Affects Versions: 1.3.0
>Reporter: Vadim Vaks
>Assignee: Matt Burgess
>
> Implement a PutDruid Processor and Controller using Tranquility API. This 
> will enable Nifi to index contents of flow files in Druid. The implementation 
> should also be able to handle late arriving data (event timestamp points to 
> Druid indexing task that has closed, segment granularity and grace window 
> period expired). Late arriving data is typically dropped. Nifi should allow 
> late arriving data to be diverted to FAILED or DROPPED relationship. That 
> would allow late arriving data to be stored on HDFS or S3 until a re-indexing 
> task can merge it into the correct segment in deep storage.



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


[GitHub] nifi-minifi-cpp issue #188: MINIFICPP-49 Added initial implementation of NiF...

2017-12-01 Thread achristianson
Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@phrocker fixed.


---


[jira] [Updated] (NIFI-4428) Implement PutDruid Processor and Controller

2017-12-01 Thread Matt Burgess (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated NIFI-4428:
---
Status: Patch Available  (was: In Progress)

> Implement PutDruid Processor and Controller
> ---
>
> Key: NIFI-4428
> URL: https://issues.apache.org/jira/browse/NIFI-4428
> Project: Apache NiFi
>  Issue Type: New Feature
>Affects Versions: 1.3.0
>Reporter: Vadim Vaks
>Assignee: Matt Burgess
>
> Implement a PutDruid Processor and Controller using Tranquility API. This 
> will enable Nifi to index contents of flow files in Druid. The implementation 
> should also be able to handle late arriving data (event timestamp points to 
> Druid indexing task that has closed, segment granularity and grace window 
> period expired). Late arriving data is typically dropped. Nifi should allow 
> late arriving data to be diverted to FAILED or DROPPED relationship. That 
> would allow late arriving data to be stored on HDFS or S3 until a re-indexing 
> task can merge it into the correct segment in deep storage.



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


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274750#comment-16274750
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@phrocker fixed.


> NiFi Expression Language support
> 
>
> Key: MINIFICPP-49
> URL: https://issues.apache.org/jira/browse/MINIFICPP-49
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Jeremy Dyer
>Assignee: Andrew Christianson
>
> An implementation of NiFi's expression language is needed for the cpp version 
> of the project. The feature should support all of the same EL syntax that 
> NiFi supports so that any flow developed in NiFi and then ran through the 
> minifi-toolkit will generate a valid .yml configuration file. Currently if 
> there are any expression language values in the flow.yml file the agent will 
> not act as anticipated or crash.



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


[jira] [Assigned] (NIFI-4428) Implement PutDruid Processor and Controller

2017-12-01 Thread Matt Burgess (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess reassigned NIFI-4428:
--

Assignee: Matt Burgess

> Implement PutDruid Processor and Controller
> ---
>
> Key: NIFI-4428
> URL: https://issues.apache.org/jira/browse/NIFI-4428
> Project: Apache NiFi
>  Issue Type: New Feature
>Affects Versions: 1.3.0
>Reporter: Vadim Vaks
>Assignee: Matt Burgess
>
> Implement a PutDruid Processor and Controller using Tranquility API. This 
> will enable Nifi to index contents of flow files in Druid. The implementation 
> should also be able to handle late arriving data (event timestamp points to 
> Druid indexing task that has closed, segment granularity and grace window 
> period expired). Late arriving data is typically dropped. Nifi should allow 
> late arriving data to be diverted to FAILED or DROPPED relationship. That 
> would allow late arriving data to be stored on HDFS or S3 until a re-indexing 
> task can merge it into the correct segment in deep storage.



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


[jira] [Commented] (NIFI-4428) Implement PutDruid Processor and Controller

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4428:
--

GitHub user mattyb149 opened a pull request:

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

NIFI-4428: Add PutDruidRecord processor and DruidTranquilityController 
service

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- 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)?

- [ ] Is your initial contribution a single, squashed commit?

### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [x] Have you written or updated unit tests to verify your changes?
- [ ] 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?
- [x] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


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

$ git pull https://github.com/mattyb149/nifi NIFI-4428

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

https://github.com/apache/nifi/pull/2310.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 #2310


commit e502364ffb18683747c93af1deb85b0185b165a6
Author: vvaks 
Date:   2017-09-27T17:23:23Z

NIFI-4428: - Implement PutDruid Processor and Controller

update

added provenance report

added parameters for batch control

WIP

commit d7db6ed526a8e2a06625a2a0cd1e46ea2b923ff3
Author: Matthew Burgess 
Date:   2017-11-22T16:36:30Z

NIFI-4428: Replaced JSON input with RecordReader
using per-record flowfiles
NIFI-4428: Added initial L, fixed dependency hierarchy

NIFI-4428: Exposed additional ZK properties




> Implement PutDruid Processor and Controller
> ---
>
> Key: NIFI-4428
> URL: https://issues.apache.org/jira/browse/NIFI-4428
> Project: Apache NiFi
>  Issue Type: New Feature
>Affects Versions: 1.3.0
>Reporter: Vadim Vaks
>
> Implement a PutDruid Processor and Controller using Tranquility API. This 
> will enable Nifi to index contents of flow files in Druid. The implementation 
> should also be able to handle late arriving data (event timestamp points to 
> Druid indexing task that has closed, segment granularity and grace window 
> period expired). Late arriving data is typically dropped. Nifi should allow 
> late arriving data to be diverted to FAILED or DROPPED relationship. That 
> would allow late arriving data to be stored on HDFS or S3 until a re-indexing 
> task can merge it into the correct segment in deep storage.



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


[GitHub] nifi pull request #2310: NIFI-4428: Add PutDruidRecord processor and DruidTr...

2017-12-01 Thread mattyb149
GitHub user mattyb149 opened a pull request:

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

NIFI-4428: Add PutDruidRecord processor and DruidTranquilityController 
service

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- 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)?

- [ ] Is your initial contribution a single, squashed commit?

### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [x] Have you written or updated unit tests to verify your changes?
- [ ] 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?
- [x] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


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

$ git pull https://github.com/mattyb149/nifi NIFI-4428

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

https://github.com/apache/nifi/pull/2310.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 #2310


commit e502364ffb18683747c93af1deb85b0185b165a6
Author: vvaks 
Date:   2017-09-27T17:23:23Z

NIFI-4428: - Implement PutDruid Processor and Controller

update

added provenance report

added parameters for batch control

WIP

commit d7db6ed526a8e2a06625a2a0cd1e46ea2b923ff3
Author: Matthew Burgess 
Date:   2017-11-22T16:36:30Z

NIFI-4428: Replaced JSON input with RecordReader
using per-record flowfiles
NIFI-4428: Added initial L, fixed dependency hierarchy

NIFI-4428: Exposed additional ZK properties




---


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274733#comment-16274733
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154413015
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
--- End diff --

^ same for this move sorry I didn't notice before. 


> NiFi Expression Language support
> 
>
> Key: MINIFICPP-49
> URL: https://issues.apache.org/jira/browse/MINIFICPP-49
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Jeremy Dyer
>Assignee: Andrew Christianson
>
> An implementation of NiFi's expression language is needed for the cpp version 
> of the project. The feature should support all of the same EL syntax that 
> NiFi supports so that any flow developed in NiFi and then ran through the 
> minifi-toolkit will generate a valid .yml configuration file. Currently if 
> there are any expression language values in the flow.yml file the agent will 
> not act as anticipated or crash.



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


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274731#comment-16274731
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412788
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
  

[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154413015
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
--- End diff --

^ same for this move sorry I didn't notice before. 


---


[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412788
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
+  return std::move(result);
+});
+  } else if (isDynamic() && !other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val = other_expr.val_;
+return make_dynamic([val_fn, other_val](const 

[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274730#comment-16274730
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412705
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
  

[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412705
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
+  return std::move(result);
+});
+  } else if (isDynamic() && !other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val = other_expr.val_;
+return make_dynamic([val_fn, other_val](const 

[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274724#comment-16274724
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412216
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
  

[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274723#comment-16274723
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412200
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
  

[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274725#comment-16274725
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412281
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
  

[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412216
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
+  return std::move(result);
+});
+  } else if (isDynamic() && !other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val = other_expr.val_;
+return make_dynamic([val_fn, other_val](const 

[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412281
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
+  return std::move(result);
+});
+  } else if (isDynamic() && !other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val = other_expr.val_;
+return make_dynamic([val_fn, other_val](const 

[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154412200
  
--- Diff: extensions/expression-language/Expression.cpp ---
@@ -0,0 +1,164 @@
+/**
+ * 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.
+ */
+
+#include 
+#include 
+
+#include 
+#include "Driver.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace expression {
+
+Expression compile(const std::string _str) {
+  std::stringstream expr_str_stream(expr_str);
+  Driver driver(_str_stream);
+  Parser parser();
+  parser.parse();
+  return driver.result;
+}
+
+Expression make_static(std::string val) {
+  return Expression(std::move(val));
+}
+
+Expression make_dynamic(std::function val_fn) {
+  return Expression("", std::move(val_fn));
+}
+
+Expression make_dynamic_attr(const std::string _id) {
+  return make_dynamic([attribute_id](const Parameters ) -> 
std::string {
+std::string result;
+params.flow_file.lock()->getAttribute(attribute_id, result);
+return result;
+  });
+}
+
+std::string expr_hostname(const std::vector ) {
+  char hostname[1024];
+  hostname[1023] = '\0';
+  gethostname(hostname, 1023);
+  return std::move(std::string(hostname));
+}
+
+std::string expr_toUpper(const std::vector ) {
+  std::string result = args[0];
+  std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+  return result;
+}
+
+template &)>
+Expression make_dynamic_function_incomplete(const std::string 
_name,
+const std::vector 
,
+std::size_t num_args) {
+  if (args.size() == num_args) {
+return make_dynamic([=](const Parameters ) -> std::string {
+  std::vector evaluated_args;
+
+  for (const auto  : args) {
+evaluated_args.emplace_back(arg(params));
+  }
+
+  return T(evaluated_args);
+});
+  } else {
+auto result = make_dynamic([](const Parameters ) -> std::string 
{
+  throw std::runtime_error("Attempted to call incomplete function");
+});
+
+result.complete = [function_name, args](Expression expr) -> Expression 
{
+  std::vector complete_args = {expr};
+  complete_args.insert(complete_args.end(), args.begin(), args.end());
+  return make_dynamic_function(function_name, complete_args);
+};
+
+return result;
+  }
+}
+
+Expression make_dynamic_function(const std::string _name, const 
std::vector ) {
+  if (function_name == "hostname") {
+return make_dynamic_function_incomplete(function_name, 
args, 0);
+  } else if (function_name == "toUpper") {
+return make_dynamic_function_incomplete(function_name, 
args, 1);
+  } else {
+std::string msg("Unknown expression function: ");
+msg.append(function_name);
+throw std::runtime_error(msg);
+  }
+}
+
+Expression make_dynamic_function_postfix(const Expression , const 
Expression ) {
+  return fn.complete(subject);
+}
+
+bool Expression::isDynamic() const {
+  if (val_fn_) {
+return true;
+  } else {
+return false;
+  }
+}
+
+Expression Expression::operator+(const Expression _expr) const {
+  if (isDynamic() && other_expr.isDynamic()) {
+auto val_fn = val_fn_;
+auto other_val_fn = other_expr.val_fn_;
+return make_dynamic([val_fn, other_val_fn](const Parameters ) 
-> std::string {
+  std::string result = val_fn(params);
+  result.append(other_val_fn(params));
+  return std::move(result);
--- End diff --

The move prevents copy elision through RVO.


---


[jira] [Commented] (MINIFICPP-12) Enable -Wall when building

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274698#comment-16274698
 ] 

ASF GitHub Bot commented on MINIFICPP-12:
-

Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/212
  
This doesn't eliminate every warning. I'll be checking different versions 
of compilers to see if there is more low hanging fruit. 


> Enable -Wall when building
> --
>
> Key: MINIFICPP-12
> URL: https://issues.apache.org/jira/browse/MINIFICPP-12
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: marco polo
>Assignee: marco polo
>Priority: Minor
>  Labels: Durability, Reliability
> Fix For: 0.4.0
>
>
> Implement -Wall and correct any or omit any issues. 



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


[jira] [Commented] (MINIFICPP-12) Enable -Wall when building

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274697#comment-16274697
 ] 

ASF GitHub Bot commented on MINIFICPP-12:
-

GitHub user phrocker opened a pull request:

https://github.com/apache/nifi-minifi-cpp/pull/212

MINIFICPP-12: Resolve warnings found during compilation

MINIFICPP-12: Remove linux warnings

MINIFICPP-12: Update property and stringutils

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:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
 in the commit message?

- [ ] Does your PR title start with MINIFI- 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:
- [ ] 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?
- [ ] If applicable, have you updated the NOTICE file?

### 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/phrocker/nifi-minifi-cpp MINIFICPP-12

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

https://github.com/apache/nifi-minifi-cpp/pull/212.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 #212


commit e25a4b2b630dcf8ca3362f0d61008be06b0762e8
Author: Marc Parisi 
Date:   2017-11-29T14:05:00Z

MINIFICPP-12: Resolve warnings found during compilation

MINIFICPP-12: Remove linux warnings

MINIFICPP-12: Update property and stringutils




> Enable -Wall when building
> --
>
> Key: MINIFICPP-12
> URL: https://issues.apache.org/jira/browse/MINIFICPP-12
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: marco polo
>Assignee: marco polo
>Priority: Minor
>  Labels: Durability, Reliability
> Fix For: 0.4.0
>
>
> Implement -Wall and correct any or omit any issues. 



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


[GitHub] nifi-minifi-cpp pull request #212: MINIFICPP-12: Resolve warnings found duri...

2017-12-01 Thread phrocker
GitHub user phrocker opened a pull request:

https://github.com/apache/nifi-minifi-cpp/pull/212

MINIFICPP-12: Resolve warnings found during compilation

MINIFICPP-12: Remove linux warnings

MINIFICPP-12: Update property and stringutils

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:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
 in the commit message?

- [ ] Does your PR title start with MINIFI- 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:
- [ ] 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?
- [ ] If applicable, have you updated the NOTICE file?

### 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/phrocker/nifi-minifi-cpp MINIFICPP-12

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

https://github.com/apache/nifi-minifi-cpp/pull/212.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 #212


commit e25a4b2b630dcf8ca3362f0d61008be06b0762e8
Author: Marc Parisi 
Date:   2017-11-29T14:05:00Z

MINIFICPP-12: Resolve warnings found during compilation

MINIFICPP-12: Remove linux warnings

MINIFICPP-12: Update property and stringutils




---


[GitHub] nifi-minifi-cpp issue #212: MINIFICPP-12: Resolve warnings found during comp...

2017-12-01 Thread phrocker
Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/212
  
This doesn't eliminate every warning. I'll be checking different versions 
of compilers to see if there is more low hanging fruit. 


---


[jira] [Commented] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4645:
--

Github user asfgit closed the pull request at:

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


> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[jira] [Commented] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on NIFI-4645:
---

Commit 9fdab10c7c989b395e31e7bbee138bc4fa82f369 in nifi's branch 
refs/heads/master from [~joewitt]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=9fdab10 ]

NIFI-4645 now being very specific to include if not ppc. This closes #2309


> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[GitHub] nifi pull request #2309: NIFI-4645 now being very specific to include if not...

2017-12-01 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[jira] [Commented] (NIFI-4645) NiFi build on powerpc fails because the google/rpc nar cannot be built/used there

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4645:
--

Github user mcgilman commented on the issue:

https://github.com/apache/nifi/pull/2309
  
Will review...


> NiFi build on powerpc fails because the google/rpc nar cannot be built/used 
> there
> -
>
> Key: NIFI-4645
> URL: https://issues.apache.org/jira/browse/NIFI-4645
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Tools and Build
> Environment: ibm/power pc
>Reporter: Joseph Witt
>Assignee: Joseph Witt
> Fix For: 1.5.0
>
>
> Going to update the poms to detect the os family and if not powerpc will 
> activate module builds and assembly usage of nars that are not capable in 
> that environment.



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


[GitHub] nifi issue #2309: NIFI-4645 now being very specific to include if not ppc

2017-12-01 Thread mcgilman
Github user mcgilman commented on the issue:

https://github.com/apache/nifi/pull/2309
  
Will review...


---


[jira] [Commented] (MINIFICPP-303) Upgrade civetweb and rocksdb

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274564#comment-16274564
 ] 

ASF GitHub Bot commented on MINIFICPP-303:
--

Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
@calebj the travis failure shows you what we've been seeing on clang 9

https://travis-ci.org/apache/nifi-minifi-cpp/jobs/309102064

It might be better to separate the upgrade of civet and rocksdb?


> Upgrade civetweb and rocksdb
> 
>
> Key: MINIFICPP-303
> URL: https://issues.apache.org/jira/browse/MINIFICPP-303
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Caleb Johnson
>
> These upgrades to the latest stable releases of civetweb 
> ([v1.10|https://github.com/civetweb/civetweb/releases/tag/v1.10]) and RocksDB 
> ([v5.8|https://github.com/facebook/rocksdb/releases/tag/v5.8]) bring numerous 
> improvements. They might solve any issues similar to those in MINIFICPP-262.
> For civet, the most notable is OpenSSL v1.1 support. It was partially 
> backported to the version in the minifi tree (1.9.1), but still had issues 
> matching some OpenSSL v1.1 interface changes. Civetweb release v1.10 has 
> complete and official support.
> RocksDB v5.8 comes with the following bugfixes:
> * Fix wrong latencies in rocksdb.db.get.micros, rocksdb.db.write.micros, and 
> rocksdb.sst.read.micros.
> * Fix incorrect dropping of deletions during intra-L0 compaction.
> * Fix transient reappearance of keys covered by range deletions when memtable 
> prefix bloom filter is enabled.
> * Fix potentially wrong file smallest key when range deletions separated by 
> snapshot are written together.



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


[GitHub] nifi-minifi-cpp issue #185: MINIFICPP-303 Upgrade civetweb and rocksdb

2017-12-01 Thread phrocker
Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
@calebj the travis failure shows you what we've been seeing on clang 9

https://travis-ci.org/apache/nifi-minifi-cpp/jobs/309102064

It might be better to separate the upgrade of civet and rocksdb?


---


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274559#comment-16274559
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

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

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154381712
  
--- Diff: libminifi/CMakeLists.txt ---
@@ -74,6 +74,7 @@ target_link_libraries(core-minifi ${UUID_LIBRARIES} 
${JSONCPP_LIB} yaml-cpp )
 find_package(ZLIB REQUIRED)
 include_directories(${ZLIB_INCLUDE_DIRS})
 
+target_link_libraries(core-minifi minifi-expression-language-extensions)
--- End diff --

Should be able to use enable_if to to completely eliminate the code and the 
function calls, but I'm not terribly worried. Cost will be low and can be 
changed in the future. 

It won't be completely optimized. With -O3 you'll get a stack setup, checks 
for the std::__throw_bad_function_call() and delete in the assembler. It's not 
the same as calling an empty function that does nothing, which can be optimized 
out, but in my opinion it's premature to concern ourselves over the cost. 


> NiFi Expression Language support
> 
>
> Key: MINIFICPP-49
> URL: https://issues.apache.org/jira/browse/MINIFICPP-49
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Jeremy Dyer
>Assignee: Andrew Christianson
>
> An implementation of NiFi's expression language is needed for the cpp version 
> of the project. The feature should support all of the same EL syntax that 
> NiFi supports so that any flow developed in NiFi and then ran through the 
> minifi-toolkit will generate a valid .yml configuration file. Currently if 
> there are any expression language values in the flow.yml file the agent will 
> not act as anticipated or crash.



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


[GitHub] nifi-minifi-cpp pull request #188: MINIFICPP-49 Added initial implementation...

2017-12-01 Thread phrocker
Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/188#discussion_r154381712
  
--- Diff: libminifi/CMakeLists.txt ---
@@ -74,6 +74,7 @@ target_link_libraries(core-minifi ${UUID_LIBRARIES} 
${JSONCPP_LIB} yaml-cpp )
 find_package(ZLIB REQUIRED)
 include_directories(${ZLIB_INCLUDE_DIRS})
 
+target_link_libraries(core-minifi minifi-expression-language-extensions)
--- End diff --

Should be able to use enable_if to to completely eliminate the code and the 
function calls, but I'm not terribly worried. Cost will be low and can be 
changed in the future. 

It won't be completely optimized. With -O3 you'll get a stack setup, checks 
for the std::__throw_bad_function_call() and delete in the assembler. It's not 
the same as calling an empty function that does nothing, which can be optimized 
out, but in my opinion it's premature to concern ourselves over the cost. 


---


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274546#comment-16274546
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@minifirocks fixed.


> NiFi Expression Language support
> 
>
> Key: MINIFICPP-49
> URL: https://issues.apache.org/jira/browse/MINIFICPP-49
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Jeremy Dyer
>Assignee: Andrew Christianson
>
> An implementation of NiFi's expression language is needed for the cpp version 
> of the project. The feature should support all of the same EL syntax that 
> NiFi supports so that any flow developed in NiFi and then ran through the 
> minifi-toolkit will generate a valid .yml configuration file. Currently if 
> there are any expression language values in the flow.yml file the agent will 
> not act as anticipated or crash.



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


[GitHub] nifi-minifi-cpp issue #188: MINIFICPP-49 Added initial implementation of NiF...

2017-12-01 Thread achristianson
Github user achristianson commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@minifirocks fixed.


---


[jira] [Commented] (MINIFICPP-49) NiFi Expression Language support

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274517#comment-16274517
 ] 

ASF GitHub Bot commented on MINIFICPP-49:
-

Github user minifirocks commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@achristianson here is conflict. 


> NiFi Expression Language support
> 
>
> Key: MINIFICPP-49
> URL: https://issues.apache.org/jira/browse/MINIFICPP-49
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Jeremy Dyer
>Assignee: Andrew Christianson
>
> An implementation of NiFi's expression language is needed for the cpp version 
> of the project. The feature should support all of the same EL syntax that 
> NiFi supports so that any flow developed in NiFi and then ran through the 
> minifi-toolkit will generate a valid .yml configuration file. Currently if 
> there are any expression language values in the flow.yml file the agent will 
> not act as anticipated or crash.



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


[GitHub] nifi-minifi-cpp issue #188: MINIFICPP-49 Added initial implementation of NiF...

2017-12-01 Thread minifirocks
Github user minifirocks commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/188
  
@achristianson here is conflict. 


---


[jira] [Commented] (MINIFICPP-303) Upgrade civetweb and rocksdb

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274507#comment-16274507
 ] 

ASF GitHub Bot commented on MINIFICPP-303:
--

Github user calebj commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
I did. The new commit messages reflect the new version, too.


> Upgrade civetweb and rocksdb
> 
>
> Key: MINIFICPP-303
> URL: https://issues.apache.org/jira/browse/MINIFICPP-303
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Caleb Johnson
>
> These upgrades to the latest stable releases of civetweb 
> ([v1.10|https://github.com/civetweb/civetweb/releases/tag/v1.10]) and RocksDB 
> ([v5.8|https://github.com/facebook/rocksdb/releases/tag/v5.8]) bring numerous 
> improvements. They might solve any issues similar to those in MINIFICPP-262.
> For civet, the most notable is OpenSSL v1.1 support. It was partially 
> backported to the version in the minifi tree (1.9.1), but still had issues 
> matching some OpenSSL v1.1 interface changes. Civetweb release v1.10 has 
> complete and official support.
> RocksDB v5.8 comes with the following bugfixes:
> * Fix wrong latencies in rocksdb.db.get.micros, rocksdb.db.write.micros, and 
> rocksdb.sst.read.micros.
> * Fix incorrect dropping of deletions during intra-L0 compaction.
> * Fix transient reappearance of keys covered by range deletions when memtable 
> prefix bloom filter is enabled.
> * Fix potentially wrong file smallest key when range deletions separated by 
> snapshot are written together.



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


[GitHub] nifi-minifi-cpp issue #185: MINIFICPP-303 Upgrade civetweb and rocksdb

2017-12-01 Thread calebj
Github user calebj commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
I did. The new commit messages reflect the new version, too.


---


[jira] [Commented] (MINIFICPP-321) Support Maximum File Count in PutFile

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274461#comment-16274461
 ] 

ASF GitHub Bot commented on MINIFICPP-321:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/211


> Support Maximum File Count in PutFile
> -
>
> Key: MINIFICPP-321
> URL: https://issues.apache.org/jira/browse/MINIFICPP-321
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Dustin Rodrigues
>Priority: Minor
> Fix For: 0.4.0
>
>
> Support max file count that exists in Apache Nifi PutFile processor



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


[GitHub] nifi-minifi-cpp pull request #211: MINIFICPP-321: Support Maximum File Count...

2017-12-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/211


---


[jira] [Commented] (MINIFICPP-303) Upgrade civetweb and rocksdb

2017-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16274458#comment-16274458
 ] 

ASF GitHub Bot commented on MINIFICPP-303:
--

Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
@calebj Re the next push, did you force push into that last commit?


> Upgrade civetweb and rocksdb
> 
>
> Key: MINIFICPP-303
> URL: https://issues.apache.org/jira/browse/MINIFICPP-303
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Caleb Johnson
>
> These upgrades to the latest stable releases of civetweb 
> ([v1.10|https://github.com/civetweb/civetweb/releases/tag/v1.10]) and RocksDB 
> ([v5.8|https://github.com/facebook/rocksdb/releases/tag/v5.8]) bring numerous 
> improvements. They might solve any issues similar to those in MINIFICPP-262.
> For civet, the most notable is OpenSSL v1.1 support. It was partially 
> backported to the version in the minifi tree (1.9.1), but still had issues 
> matching some OpenSSL v1.1 interface changes. Civetweb release v1.10 has 
> complete and official support.
> RocksDB v5.8 comes with the following bugfixes:
> * Fix wrong latencies in rocksdb.db.get.micros, rocksdb.db.write.micros, and 
> rocksdb.sst.read.micros.
> * Fix incorrect dropping of deletions during intra-L0 compaction.
> * Fix transient reappearance of keys covered by range deletions when memtable 
> prefix bloom filter is enabled.
> * Fix potentially wrong file smallest key when range deletions separated by 
> snapshot are written together.



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


[GitHub] nifi-minifi-cpp issue #185: MINIFICPP-303 Upgrade civetweb and rocksdb

2017-12-01 Thread phrocker
Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/185
  
@calebj Re the next push, did you force push into that last commit?


---


[jira] [Commented] (NIFI-3970) Add CSVRecordLookupService

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-3970:
--

Github user MikeThomsen commented on the issue:

https://github.com/apache/nifi/pull/2130
  
@markap14 @mattyb149 I think I cleaned up everything that was requested 
here on my version of the branch here:


https://github.com/MikeThomsen/nifi/commit/b216a1df8ef9631a1dd0cc31a8ec0eacb9a6a668

Feel free to merge that.


> Add CSVRecordLookupService
> --
>
> Key: NIFI-3970
> URL: https://issues.apache.org/jira/browse/NIFI-3970
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Joey Frazee
>Assignee: Matt Burgess
>
> PR [#1830|https://github.com/apache/nifi/pull/1830] provides a 
> SimpleCsvFileLookupService. Since CSV data is tabular, a counterpart 
> CSVRecordLookupService would be useful for using with multi-criteria lookups 
> and enrichments in LookupRecord and LookupAttribute.



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


[GitHub] nifi issue #2130: NIFI-3970: Add CSVRecordLookupService

2017-12-01 Thread MikeThomsen
Github user MikeThomsen commented on the issue:

https://github.com/apache/nifi/pull/2130
  
@markap14 @mattyb149 I think I cleaned up everything that was requested 
here on my version of the branch here:


https://github.com/MikeThomsen/nifi/commit/b216a1df8ef9631a1dd0cc31a8ec0eacb9a6a668

Feel free to merge that.


---


[jira] [Commented] (NIFI-4325) Create a new ElasticSearch processor that supports the JSON DSL

2017-12-01 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-4325:
--

Github user MikeThomsen commented on the issue:

https://github.com/apache/nifi/pull/2113
  
@mattyb149 I think everything should be up to date now.


> Create a new ElasticSearch processor that supports the JSON DSL
> ---
>
> Key: NIFI-4325
> URL: https://issues.apache.org/jira/browse/NIFI-4325
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Mike Thomsen
>Priority: Minor
>
> The existing ElasticSearch processors use the Lucene-style syntax for 
> querying, not the JSON DSL. A new processor is needed that can take a full 
> JSON query and execute it. It should also support aggregation queries in this 
> syntax. A user needs to be able to take a query as-is from Kibana and drop it 
> into NiFi and have it just run.



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


[GitHub] nifi issue #2113: NIFI-4325 Added new processor that uses the JSON DSL.

2017-12-01 Thread MikeThomsen
Github user MikeThomsen commented on the issue:

https://github.com/apache/nifi/pull/2113
  
@mattyb149 I think everything should be up to date now.


---