nifi git commit: NIFI-1342 Added default User-Agent in PostHttp

2016-09-15 Thread ozhurakousky
Repository: nifi
Updated Branches:
  refs/heads/master 8a28395e9 -> c1ad91359


NIFI-1342 Added default User-Agent in PostHttp

This closes #1021


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/c1ad9135
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/c1ad9135
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/c1ad9135

Branch: refs/heads/master
Commit: c1ad913598c9c41fdc99a53d9939fece9c3250b9
Parents: 8a28395
Author: Pierre Villard 
Authored: Wed Sep 14 17:59:17 2016 +0200
Committer: Oleg Zhurakousky 
Committed: Thu Sep 15 09:57:09 2016 -0400

--
 .../java/org/apache/nifi/processors/standard/PostHTTP.java| 2 ++
 .../org/apache/nifi/processors/standard/TestPostHTTP.java | 7 +++
 2 files changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/c1ad9135/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
index 37b307e..44b7973 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
@@ -82,6 +82,7 @@ import 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpCoreContext;
 import org.apache.http.util.EntityUtils;
+import org.apache.http.util.VersionInfo;
 import org.apache.nifi.annotation.behavior.InputRequirement;
 import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
 import org.apache.nifi.annotation.behavior.SupportsBatching;
@@ -194,6 +195,7 @@ public class PostHTTP extends AbstractProcessor {
 .description("What to report as the User Agent when we connect to 
the remote server")
 .required(false)
 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.defaultValue(VersionInfo.getUserAgent("Apache-HttpClient", 
"org.apache.http.client", HttpClientBuilder.class))
 .build();
 public static final PropertyDescriptor COMPRESSION_LEVEL = new 
PropertyDescriptor.Builder()
 .name("Compression Level")

http://git-wip-us.apache.org/repos/asf/nifi/blob/c1ad9135/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
index edff3b4..cfda2ef 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
@@ -434,4 +434,11 @@ public class TestPostHTTP {
 Assert.assertEquals(suppliedMimeType, 
lastPostHeaders.get(PostHTTP.CONTENT_TYPE_HEADER));
 Assert.assertEquals("4700",lastPostHeaders.get("Content-Length"));
 }
+
+@Test
+public void testDefaultUserAgent() throws Exception {
+setup(null);
+
Assert.assertTrue(runner.getProcessContext().getProperty(PostHTTP.USER_AGENT).getValue().startsWith("Apache-HttpClient"));
+}
+
 }



nifi git commit: NIFI-1342 Added default User-Agent in PostHttp

2016-09-15 Thread ozhurakousky
Repository: nifi
Updated Branches:
  refs/heads/0.x 3e70fbde3 -> e5761966c


NIFI-1342 Added default User-Agent in PostHttp

This closes #1021


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/e5761966
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/e5761966
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/e5761966

Branch: refs/heads/0.x
Commit: e5761966c9576143ce3e07776687e34e981025d0
Parents: 3e70fbd
Author: Pierre Villard 
Authored: Wed Sep 14 17:59:17 2016 +0200
Committer: Oleg Zhurakousky 
Committed: Thu Sep 15 10:05:10 2016 -0400

--
 .../java/org/apache/nifi/processors/standard/PostHTTP.java| 2 ++
 .../org/apache/nifi/processors/standard/TestPostHTTP.java | 7 +++
 2 files changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/e5761966/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
index e78f1e5..2b99369 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
@@ -82,6 +82,7 @@ import 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpCoreContext;
 import org.apache.http.util.EntityUtils;
+import org.apache.http.util.VersionInfo;
 import org.apache.nifi.annotation.behavior.InputRequirement;
 import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
 import org.apache.nifi.annotation.behavior.SupportsBatching;
@@ -195,6 +196,7 @@ public class PostHTTP extends AbstractProcessor {
 .description("What to report as the User Agent when we connect to 
the remote server")
 .required(false)
 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.defaultValue(VersionInfo.getUserAgent("Apache-HttpClient", 
"org.apache.http.client", HttpClientBuilder.class))
 .build();
 public static final PropertyDescriptor COMPRESSION_LEVEL = new 
PropertyDescriptor.Builder()
 .name("Compression Level")

http://git-wip-us.apache.org/repos/asf/nifi/blob/e5761966/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
index edff3b4..cfda2ef 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestPostHTTP.java
@@ -434,4 +434,11 @@ public class TestPostHTTP {
 Assert.assertEquals(suppliedMimeType, 
lastPostHeaders.get(PostHTTP.CONTENT_TYPE_HEADER));
 Assert.assertEquals("4700",lastPostHeaders.get("Content-Length"));
 }
+
+@Test
+public void testDefaultUserAgent() throws Exception {
+setup(null);
+
Assert.assertTrue(runner.getProcessContext().getProperty(PostHTTP.USER_AGENT).getValue().startsWith("Apache-HttpClient"));
+}
+
 }



nifi git commit: NIFI-2755 - Fixes minor typo in Developers Guide

2016-09-15 Thread ozhurakousky
Repository: nifi
Updated Branches:
  refs/heads/master c1ad91359 -> aa933a194


NIFI-2755 - Fixes minor typo in Developers Guide

This closes #1003


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/aa933a19
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/aa933a19
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/aa933a19

Branch: refs/heads/master
Commit: aa933a194110b58a8c2fe07013f37a6fc1d10e71
Parents: c1ad913
Author: Andre F de Miranda 
Authored: Mon Sep 12 01:04:11 2016 +1000
Committer: Oleg Zhurakousky 
Committed: Thu Sep 15 10:12:04 2016 -0400

--
 nifi-docs/src/main/asciidoc/developer-guide.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/aa933a19/nifi-docs/src/main/asciidoc/developer-guide.adoc
--
diff --git a/nifi-docs/src/main/asciidoc/developer-guide.adoc 
b/nifi-docs/src/main/asciidoc/developer-guide.adoc
index c9bb1fb..de5fb46 100644
--- a/nifi-docs/src/main/asciidoc/developer-guide.adoc
+++ b/nifi-docs/src/main/asciidoc/developer-guide.adoc
@@ -1744,7 +1744,8 @@ have an `onTrigger` method because Controller Services 
are not
 scheduled to run periodically, and
 Controller Services do not have Relationships because they are not
 integrated into the flow directly. Rather,
-they are used Processors, Reporting Tasks, and other Controller Services.
+they are used by Processors, Reporting Tasks, and
+other Controller Services.
 
 [[developing-controller-service]]
 === Developing a ControllerService



[jira] [Commented] (MINIFI-97) Error when trying to stop already stopped MiNiFi

2016-09-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-97:
--

Github user apiri commented on the issue:

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


> Error when trying to stop already stopped MiNiFi
> 
>
> Key: MINIFI-97
> URL: https://issues.apache.org/jira/browse/MINIFI-97
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
> Environment: CentOS 7
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Minor
>
> If calling
> {noformat}
> ./minifi.sh stop
> {noformat}
> when MiNiFi is already stopped, the process will kill PID -1. When connected 
> to the host by SSH, I get disconnected from the host.
> I'd suggest replacing:
> {noformat}
> if [ $(active_pid ${saved_pid}) -ne 0 ]; then
> {noformat}
> by
> {noformat}
> if [ $(active_pid ${saved_pid}) -le 0 ]; then
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MINIFI-97) Error when trying to stop already stopped MiNiFi

2016-09-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-97:
--

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/10
  
Looks good, thanks for finding and patching up.

Will merge in shortly.


> Error when trying to stop already stopped MiNiFi
> 
>
> Key: MINIFI-97
> URL: https://issues.apache.org/jira/browse/MINIFI-97
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
> Environment: CentOS 7
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Minor
>
> If calling
> {noformat}
> ./minifi.sh stop
> {noformat}
> when MiNiFi is already stopped, the process will kill PID -1. When connected 
> to the host by SSH, I get disconnected from the host.
> I'd suggest replacing:
> {noformat}
> if [ $(active_pid ${saved_pid}) -ne 0 ]; then
> {noformat}
> by
> {noformat}
> if [ $(active_pid ${saved_pid}) -le 0 ]; then
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


nifi-minifi-cpp git commit: MINIFI-73 Advancing versions as part of release process.

2016-09-15 Thread aldrin
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 61f0e450e -> 5dfe09795


MINIFI-73 Advancing versions as part of release process.


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/5dfe0979
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/5dfe0979
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/5dfe0979

Branch: refs/heads/master
Commit: 5dfe09795474874337dc9b541ca989ec34ecae38
Parents: 61f0e45
Author: Aldrin Piri 
Authored: Thu Sep 1 22:46:16 2016 -0400
Committer: Aldrin Piri 
Committed: Thu Sep 1 22:46:41 2016 -0400

--
 Makefile   | 2 +-
 conf/minifi.properties | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/5dfe0979/Makefile
--
diff --git a/Makefile b/Makefile
index bd446fe..0b03842 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
 
 
 # for ARM make CROSS_COMPILE=arm-linux-gnueabi ARCH=arm
-VERSION=0.0.1
+VERSION=0.1.0
 CC=$(CROSS_COMPILE)-g++
 AR=$(CROSS_COMPILE)-ar
 BUILD_DIR= ./build

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/5dfe0979/conf/minifi.properties
--
diff --git a/conf/minifi.properties b/conf/minifi.properties
index dd7eb7e..037ff8b 100644
--- a/conf/minifi.properties
+++ b/conf/minifi.properties
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 # Core Properties #
-nifi.version=0.0.1
+nifi.version=0.1.0
 nifi.flow.configuration.file=./conf/flow.yml
 nifi.administrative.yield.duration=30 sec
 # If a component has no work to do (is "bored"), how long should we wait 
before checking again for work?



[jira] [Commented] (MINIFI-73) Perform release of C++ 0.0.1

2016-09-15 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on MINIFI-73:
---

Commit 5dfe09795474874337dc9b541ca989ec34ecae38 in nifi-minifi-cpp's branch 
refs/heads/master from [~aldrin]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=5dfe097 ]

MINIFI-73 Advancing versions as part of release process.


> Perform release of C++ 0.0.1
> 
>
> Key: MINIFI-73
> URL: https://issues.apache.org/jira/browse/MINIFI-73
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++
>Reporter: Aldrin Piri
>Assignee: Aldrin Piri
> Fix For: cpp-0.0.1
>
>
> This ticket will be to track the process of providing the initial C++ 
> release, 0.0.1 and track any additional tasks needed for the initial release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


nifi-minifi-cpp git commit: MINIFI-97 Correct handling of process ID for minifi.sh stop

2016-09-15 Thread aldrin
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 5dfe09795 -> cadd945d9


MINIFI-97 Correct handling of process ID for minifi.sh stop

This closes #10.

Signed-off-by: Aldrin Piri 


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/cadd945d
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/cadd945d
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/cadd945d

Branch: refs/heads/master
Commit: cadd945d99ef306902bda18cf3530dbca6c7ebb6
Parents: 5dfe097
Author: Pierre Villard 
Authored: Tue Aug 30 00:12:46 2016 +0200
Committer: Aldrin Piri 
Committed: Thu Sep 15 12:16:31 2016 -0400

--
 bin/minifi.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/cadd945d/bin/minifi.sh
--
diff --git a/bin/minifi.sh b/bin/minifi.sh
index dca94f3..ef772e6 100755
--- a/bin/minifi.sh
+++ b/bin/minifi.sh
@@ -174,7 +174,7 @@ case "\$1" in
   echo Starting MiNiFi with PID \${pid} and pid file \${pid_file}
   ;;
 stop)
-  if [ \$(active_pid \${saved_pid}) -ne 0 ]; then
+  if [ \$(active_pid \${saved_pid}) -le 0 ]; then
 echo "MiNiFi is not currently running."
   else
 echo "Stopping MiNiFi (PID: \${saved_pid})."
@@ -274,7 +274,7 @@ case "$1" in
   echo Starting MiNiFi with PID ${pid} and pid file ${pid_file}
   ;;
 stop)
-  if [ $(active_pid ${saved_pid}) -ne 0 ]; then
+  if [ $(active_pid ${saved_pid}) -le 0 ]; then
 echo "MiNiFi is not currently running."
   else
 echo "Stopping MiNiFi (PID: ${saved_pid})."



[jira] [Commented] (MINIFI-97) Error when trying to stop already stopped MiNiFi

2016-09-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-97:
--

Github user asfgit closed the pull request at:

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


> Error when trying to stop already stopped MiNiFi
> 
>
> Key: MINIFI-97
> URL: https://issues.apache.org/jira/browse/MINIFI-97
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
> Environment: CentOS 7
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Minor
>
> If calling
> {noformat}
> ./minifi.sh stop
> {noformat}
> when MiNiFi is already stopped, the process will kill PID -1. When connected 
> to the host by SSH, I get disconnected from the host.
> I'd suggest replacing:
> {noformat}
> if [ $(active_pid ${saved_pid}) -ne 0 ]; then
> {noformat}
> by
> {noformat}
> if [ $(active_pid ${saved_pid}) -le 0 ]; then
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MINIFI-97) Error when trying to stop already stopped MiNiFi

2016-09-15 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on MINIFI-97:
---

Commit cadd945d99ef306902bda18cf3530dbca6c7ebb6 in nifi-minifi-cpp's branch 
refs/heads/master from [~pvillard]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=cadd945 ]

MINIFI-97 Correct handling of process ID for minifi.sh stop

This closes #10.

Signed-off-by: Aldrin Piri 


> Error when trying to stop already stopped MiNiFi
> 
>
> Key: MINIFI-97
> URL: https://issues.apache.org/jira/browse/MINIFI-97
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
> Environment: CentOS 7
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Minor
>
> If calling
> {noformat}
> ./minifi.sh stop
> {noformat}
> when MiNiFi is already stopped, the process will kill PID -1. When connected 
> to the host by SSH, I get disconnected from the host.
> I'd suggest replacing:
> {noformat}
> if [ $(active_pid ${saved_pid}) -ne 0 ]; then
> {noformat}
> by
> {noformat}
> if [ $(active_pid ${saved_pid}) -le 0 ]; then
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MINIFI-97) Error when trying to stop already stopped MiNiFi

2016-09-15 Thread Aldrin Piri (JIRA)

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

Aldrin Piri updated MINIFI-97:
--
Fix Version/s: cpp-0.1.0

> Error when trying to stop already stopped MiNiFi
> 
>
> Key: MINIFI-97
> URL: https://issues.apache.org/jira/browse/MINIFI-97
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
> Environment: CentOS 7
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Minor
> Fix For: cpp-0.1.0
>
>
> If calling
> {noformat}
> ./minifi.sh stop
> {noformat}
> when MiNiFi is already stopped, the process will kill PID -1. When connected 
> to the host by SSH, I get disconnected from the host.
> I'd suggest replacing:
> {noformat}
> if [ $(active_pid ${saved_pid}) -ne 0 ]; then
> {noformat}
> by
> {noformat}
> if [ $(active_pid ${saved_pid}) -le 0 ]; then
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


nifi git commit: NIFI-2771: - Using GzipHandler instead of GzipFilter.

2016-09-15 Thread ozhurakousky
Repository: nifi
Updated Branches:
  refs/heads/master aa933a194 -> abcfbeb06


NIFI-2771:
- Using GzipHandler instead of GzipFilter.

This closes #1020


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/abcfbeb0
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/abcfbeb0
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/abcfbeb0

Branch: refs/heads/master
Commit: abcfbeb062ff014e3ffefaaa1a689e0646af1d42
Parents: aa933a1
Author: Matt Gilman 
Authored: Wed Sep 14 10:13:16 2016 -0400
Committer: Oleg Zhurakousky 
Committed: Thu Sep 15 10:27:39 2016 -0400

--
 .../org/apache/nifi/web/server/JettyServer.java | 67 
 .../src/main/webapp/WEB-INF/web.xml | 12 
 2 files changed, 40 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/abcfbeb0/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
index 10b6513..8180c75 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
@@ -16,32 +16,6 @@
  */
 package org.apache.nifi.web.server;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import javax.servlet.DispatcherType;
-import javax.servlet.ServletContext;
-
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -72,6 +46,7 @@ import org.eclipse.jetty.server.handler.ContextHandler;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.handler.HandlerCollection;
 import org.eclipse.jetty.server.handler.ResourceHandler;
+import org.eclipse.jetty.server.handler.gzip.GzipHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.util.resource.Resource;
 import org.eclipse.jetty.util.resource.ResourceCollection;
@@ -88,6 +63,31 @@ import org.springframework.context.ApplicationContext;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
+import javax.servlet.DispatcherType;
+import javax.servlet.ServletContext;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
 /**
  * Encapsulates the Jetty instance.
  */
@@ -326,7 +326,20 @@ public class JettyServer implements NiFiServer {
 handlers.addHandler(loadWar(webErrorWar, "/", frameworkClassLoader));
 
 // deploy the web apps
-server.setHandler(handlers);
+server.setHandler(gzip(handlers));
+}
+
+/**
+ * Enables compression for the specified handler.
+ *
+ * @param handler handler to enable compression for
+ * @return compression enabled handler
+ */
+private Handler gzip(final Handler handler) {
+final GzipHandler gzip = new GzipHandler();
+gzip.setIncludedMethods("GET", "POST", "PUT", "DELETE");
+gzip.setHandler(handler);
+return gzip;
 }
 
 private Map findWars(final Set narWorkingDirectories) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/abcfbeb0

[jira] [Commented] (MINIFI-104) MiNiFi uses connection names for the FlowFileQueue.getIdentifier()

2016-09-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-104:
---

Github user brosander closed the pull request at:

https://github.com/apache/nifi-minifi/pull/32


> MiNiFi uses connection names for the FlowFileQueue.getIdentifier()
> --
>
> Key: MINIFI-104
> URL: https://issues.apache.org/jira/browse/MINIFI-104
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>Reporter: Bryan Rosander
>Assignee: Bryan Rosander
>
> This causes problems with the conversion tool and swapping.  The forward 
> slashes we put into the filename cause the FileSystemSwapManager to try to 
> create a directory hierarchy for the swap file instead of just a file.
> One solution is to make sure it will be a legal filename and if necessary 
> append unique numbers to it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


nifi-minifi-cpp git commit: MINIFI-103 added File Filter Property to GetFile processor

2016-09-15 Thread aldrin
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master cadd945d9 -> eb1f268fb


MINIFI-103 added File Filter Property to GetFile processor

This closes #11.

Signed-off-by: Aldrin Piri 


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/eb1f268f
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/eb1f268f
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/eb1f268f

Branch: refs/heads/master
Commit: eb1f268fb05556a8467a97b4f54fe2f9c1e09b45
Parents: cadd945
Author: Jeremy Dyer 
Authored: Fri Sep 9 09:19:38 2016 -0400
Committer: Aldrin Piri 
Committed: Thu Sep 15 14:02:57 2016 -0400

--
 inc/GetFile.h   |  3 +++
 src/GetFile.cpp | 18 ++
 2 files changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/eb1f268f/inc/GetFile.h
--
diff --git a/inc/GetFile.h b/inc/GetFile.h
index 7ba6af4..eb975fd 100644
--- a/inc/GetFile.h
+++ b/inc/GetFile.h
@@ -47,6 +47,7 @@ public:
_pollInterval = 0;
_batchSize = 10;
_lastDirectoryListingTime = getTimeMillis();
+   _fileFilter = "[^\\.].*";
}
//! Destructor
virtual ~GetFile()
@@ -65,6 +66,7 @@ public:
static Property IgnoreHiddenFile;
static Property PollInterval;
static Property BatchSize;
+   static Property FileFilter;
//! Supported Relationships
static Relationship Success;
 
@@ -109,6 +111,7 @@ private:
int64_t _pollInterval;
int64_t _batchSize;
uint64_t _lastDirectoryListingTime;
+   std::string _fileFilter;
 };
 
 #endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/eb1f268f/src/GetFile.cpp
--
diff --git a/src/GetFile.cpp b/src/GetFile.cpp
index 32503f5..02e196a 100644
--- a/src/GetFile.cpp
+++ b/src/GetFile.cpp
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "TimeUtil.h"
 #include "GetFile.h"
@@ -52,6 +53,7 @@ Property GetFile::MaxSize("Maximum File Size", "The maximum 
size that a file can
 Property GetFile::MinSize("Minimum File Size", "The minimum size that a file 
must be in order to be pulled", "0 B");
 Property GetFile::PollInterval("Polling Interval", "Indicates how long to wait 
before performing a directory listing", "0 sec");
 Property GetFile::Recurse("Recurse Subdirectories", "Indicates whether or not 
to pull files from subdirectories", "true");
+Property GetFile::FileFilter("File Filter", "Only files whose names match the 
given regular expression will be picked up", "[^\\.].*");
 Relationship GetFile::Success("success", "All files are routed to success");
 
 void GetFile::initialize()
@@ -68,6 +70,7 @@ void GetFile::initialize()
properties.insert(MinSize);
properties.insert(PollInterval);
properties.insert(Recurse);
+   properties.insert(FileFilter);
setSupportedProperties(properties);
//! Set the supported relationships
std::set relationships;
@@ -134,6 +137,11 @@ void GetFile::onTrigger(ProcessContext *context, 
ProcessSession *session)
Property::StringToBool(value, _recursive);
}
 
+   if (context->getProperty(FileFilter.getName(), value))
+   {
+   _fileFilter = value;
+   }
+
// Perform directory list
if (isListingEmpty())
{
@@ -235,6 +243,16 @@ bool GetFile::acceptFile(std::string fileName)
if (_keepSourceFile == false && access(fileName.c_str(), W_OK) 
!= 0)
return false;
 
+   try {
+   std::regex re(_fileFilter);
+   if (!std::regex_match(fileName, re)) {
+   return false;
+   }
+   } catch (std::regex_error e) {
+   _logger->log_error("Invalid File Filter regex: %s.", 
e.what());
+   return false;
+   }
+
return true;
}
 



[jira] [Commented] (MINIFI-103) File Filter Property Support Missing For GetFile.cpp

2016-09-15 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on MINIFI-103:


Commit eb1f268fb05556a8467a97b4f54fe2f9c1e09b45 in nifi-minifi-cpp's branch 
refs/heads/master from [~jeremy.dyer]
[ https://git-wip-us.apache.org/repos/asf?p=nifi-minifi-cpp.git;h=eb1f268 ]

MINIFI-103 added File Filter Property to GetFile processor

This closes #11.

Signed-off-by: Aldrin Piri 


> File Filter Property Support Missing For GetFile.cpp
> 
>
> Key: MINIFI-103
> URL: https://issues.apache.org/jira/browse/MINIFI-103
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.0.1
>Reporter: Jeremy Dyer
> Fix For: cpp-0.1.0
>
>
> GetFile.cpp is missing the "File Filter" property present in GetFile 
> implementation of other NiFi versions. This causing the application to 
> generate a SegmentationFault if the "File Filter" property is placed in the 
> MiNiFi flow.yml file. This feature will be placed there if using the 
> minifi-toolkit for an existing NiFi template. "File Filter" should be added 
> to GetFile.cpp in order the match the features available in other GetFile 
> implementations



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


nifi git commit: NIFI-2266 Refactored GetHTTP processor to use SSLContext protocol vs. hard-coded TLSv1.

2016-09-15 Thread pvillard
Repository: nifi
Updated Branches:
  refs/heads/0.x e5761966c -> 639e6d6a7


NIFI-2266 Refactored GetHTTP processor to use SSLContext protocol vs. 
hard-coded TLSv1.

This closes #999.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/639e6d6a
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/639e6d6a
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/639e6d6a

Branch: refs/heads/0.x
Commit: 639e6d6a76ba92dbefd259861e2efc2ba2247f43
Parents: e576196
Author: Andy LoPresto 
Authored: Fri Sep 9 19:00:49 2016 -0700
Committer: Pierre Villard 
Committed: Fri Sep 16 00:05:29 2016 +0200

--
 .../nifi/util/StandardProcessorTestRunner.java  |   8 +-
 .../nifi/processors/standard/GetHTTP.java   |   6 +-
 .../standard/TestGetHTTPGroovy.groovy   | 443 +++
 .../resources/TestGetHTTP/GetHandler.groovy |  22 +
 .../resources/TestGetHTTP/ReverseHandler.groovy |  26 ++
 5 files changed, 501 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/639e6d6a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
--
diff --git 
a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java 
b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
index 6206c02..12d1f61 100644
--- 
a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
+++ 
b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
@@ -43,7 +43,6 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.nifi.annotation.behavior.TriggerSerially;
 import org.apache.nifi.annotation.lifecycle.OnAdded;
 import org.apache.nifi.annotation.lifecycle.OnConfigurationRestored;
@@ -526,6 +525,13 @@ public class StandardProcessorTestRunner implements 
TestRunner {
 return flowFileQueue.size();
 }
 
+public void clearQueue() {
+// TODO: Add #clear to MockFlowFileQueue or just point to new instance?
+while (!flowFileQueue.isEmpty()) {
+flowFileQueue.poll();
+}
+}
+
 @Override
 public Long getCounterValue(final String name) {
 return sharedState.getCounterValue(name);

http://git-wip-us.apache.org/repos/asf/nifi/blob/639e6d6a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
index 0695526..f782fc1 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
@@ -39,9 +39,7 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.regex.Pattern;
-
 import javax.net.ssl.SSLContext;
-
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
@@ -328,6 +326,8 @@ public class GetHTTP extends 
AbstractSessionFactoryProcessor {
 sslContextBuilder.loadKeyMaterial(keystore, 
service.getKeyStorePassword().toCharArray());
 }
 
+sslContextBuilder.useProtocol(service.getSslAlgorithm());
+
 return sslContextBuilder.build();
 }
 
@@ -368,7 +368,7 @@ public class GetHTTP extends 
AbstractSessionFactoryProcessor {
 throw new ProcessException(e);
 }
 
-final SSLConnectionSocketFactory sslsf = new 
SSLConnectionSocketFactory(sslContext, new String[]{"TLSv1"}, null, 
SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
+final SSLConnectionSocketFactory sslsf = new 
SSLConnectionSocketFactory(sslContext);
 
 // Also include a plain socket factory for regular http 
connections (especially proxies)
 final Registry socketFactoryRegistry =

http://git-wip-us.apache.org/repos/asf/nifi/blob/639e6d6a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/groovy/org/apache/nifi/processors/standard/TestGetHTTPGroovy.groovy
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/t

nifi git commit: NIFI-2266 Refactored GetHTTP processor to use SSLContext protocol vs. hard-coded TLSv1.

2016-09-15 Thread pvillard
Repository: nifi
Updated Branches:
  refs/heads/master abcfbeb06 -> 022f5a506


NIFI-2266 Refactored GetHTTP processor to use SSLContext protocol vs. 
hard-coded TLSv1.

This closes #999.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/022f5a50
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/022f5a50
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/022f5a50

Branch: refs/heads/master
Commit: 022f5a506dfb961dce955a2341544de184327b5e
Parents: abcfbeb
Author: Andy LoPresto 
Authored: Fri Sep 9 19:00:49 2016 -0700
Committer: Pierre Villard 
Committed: Fri Sep 16 00:08:08 2016 +0200

--
 .../nifi/util/StandardProcessorTestRunner.java  |  10 +-
 .../nifi/processors/standard/GetHTTP.java   |   6 +-
 .../standard/TestGetHTTPGroovy.groovy   | 430 +++
 .../resources/TestGetHTTP/GetHandler.groovy |  22 +
 .../resources/TestGetHTTP/ReverseHandler.groovy |  26 ++
 5 files changed, 489 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/022f5a50/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
--
diff --git 
a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java 
b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
index 69118db..138524d 100644
--- 
a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
+++ 
b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java
@@ -42,7 +42,6 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.nifi.annotation.behavior.TriggerSerially;
 import org.apache.nifi.annotation.lifecycle.OnAdded;
 import org.apache.nifi.annotation.lifecycle.OnConfigurationRestored;
@@ -390,7 +389,7 @@ public class StandardProcessorTestRunner implements 
TestRunner {
 
 @Override
 public void enqueue(final String data) {
-enqueue(data.getBytes(StandardCharsets.UTF_8), Collections. emptyMap());
+enqueue(data.getBytes(StandardCharsets.UTF_8), Collections.emptyMap());
 }
 
 @Override
@@ -468,6 +467,13 @@ public class StandardProcessorTestRunner implements 
TestRunner {
 return flowFileQueue.size();
 }
 
+public void clearQueue() {
+// TODO: Add #clear to MockFlowFileQueue or just point to new instance?
+while (!flowFileQueue.isEmpty()) {
+flowFileQueue.poll();
+}
+}
+
 @Override
 public Long getCounterValue(final String name) {
 return sharedState.getCounterValue(name);

http://git-wip-us.apache.org/repos/asf/nifi/blob/022f5a50/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
index a2bbb0c..87b1423 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
@@ -39,9 +39,7 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.regex.Pattern;
-
 import javax.net.ssl.SSLContext;
-
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
@@ -328,6 +326,8 @@ public class GetHTTP extends 
AbstractSessionFactoryProcessor {
 sslContextBuilder.loadKeyMaterial(keystore, 
service.getKeyStorePassword().toCharArray());
 }
 
+sslContextBuilder.useProtocol(service.getSslAlgorithm());
+
 return sslContextBuilder.build();
 }
 
@@ -368,7 +368,7 @@ public class GetHTTP extends 
AbstractSessionFactoryProcessor {
 throw new ProcessException(e);
 }
 
-final SSLConnectionSocketFactory sslsf = new 
SSLConnectionSocketFactory(sslContext, new String[]{"TLSv1"}, null, 
SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
+final SSLConnectionSocketFactory sslsf = new 
SSLConnectionSocketFactory(sslContext);
 
 // Also include a plain socket factory for regular http 
connections (especially proxies)
 final Registry socketFactoryRegistry =

http://gi