nifi git commit: NIFI-3894: This closes #1820. Fixed close and consume order with compression.

2017-05-17 Thread joewitt
Repository: nifi
Updated Branches:
  refs/heads/master 8e1c79eaa -> 36e7bd616


NIFI-3894: This closes #1820. Fixed close and consume order with compression.

Before this fix, 'NullPointerException: Inflater has been closed' can be thrown 
as the Inflater is closed before input stream is consumed.

Also, calling close from AbstractTransaction.receive is removed, because the 
DataPacket is exposed as its return value and this class will not be able to 
know when to close the stream.

Signed-off-by: joewitt 


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

Branch: refs/heads/master
Commit: 36e7bd6164f6d7294ec17fe6487a74b042ba2f25
Parents: 8e1c79e
Author: Koji Kawamura 
Authored: Thu May 18 10:05:08 2017 +0900
Committer: joewitt 
Committed: Wed May 17 22:57:33 2017 -0400

--
 .../java/org/apache/nifi/remote/AbstractTransaction.java  |  5 -
 .../remote/protocol/AbstractFlowFileServerProtocol.java   | 10 +-
 2 files changed, 5 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/36e7bd61/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/AbstractTransaction.java
--
diff --git 
a/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/AbstractTransaction.java
 
b/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/AbstractTransaction.java
index 2d6b2e1..826cf00 100644
--- 
a/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/AbstractTransaction.java
+++ 
b/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/AbstractTransaction.java
@@ -148,11 +148,6 @@ public abstract class AbstractTransaction implements 
Transaction {
 final InputStream dataIn = compress ? new 
CompressionInputStream(is) : is;
 final DataPacket packet = codec.decode(new 
CheckedInputStream(dataIn, crc));
 
-if (compress) {
-// Close CompressionInputStream to free acquired memory, 
without closing underlying stream.
-dataIn.close();
-}
-
 if (packet == null) {
 this.dataAvailable = false;
 } else {

http://git-wip-us.apache.org/repos/asf/nifi/blob/36e7bd61/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/protocol/AbstractFlowFileServerProtocol.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/protocol/AbstractFlowFileServerProtocol.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/protocol/AbstractFlowFileServerProtocol.java
index f539808..3a5f23c 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/protocol/AbstractFlowFileServerProtocol.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/protocol/AbstractFlowFileServerProtocol.java
@@ -441,11 +441,6 @@ public abstract class AbstractFlowFileServerProtocol 
implements ServerProtocol {
 
 final DataPacket dataPacket = codec.decode(checkedInputStream);
 
-if (handshakeProperties.isUseGzip()) {
-// Close CompressionInputStream to free acquired memory, 
without closing underlying stream.
-checkedInputStream.close();
-}
-
 if (dataPacket == null) {
 logger.debug("{} Received null dataPacket indicating the end 
of transaction from {}", this, peer);
 break;
@@ -454,6 +449,11 @@ public abstract class AbstractFlowFileServerProtocol 
implements ServerProtocol {
 flowFile = session.importFrom(dataPacket.getData(), flowFile);
 flowFile = session.putAllAttributes(flowFile, 
dataPacket.getAttributes());
 
+if (handshakeProperties.isUseGzip()) {
+// Close CompressionInputStream to free acquired memory, 
without closing underlying stream.
+checkedInputStream.close();
+}
+
 final long transferNanos = System.nanoTime() - startNanos;
 final long transferMillis = 
TimeUnit.MILLISECONDS.convert(transferNanos, TimeUnit.NANOSECONDS);
 final String sourceSystemFlowFileUuid = 

nifi-site git commit: updated PMC members (myself and Oleg Z.)

2017-05-17 Thread ymdavis
Repository: nifi-site
Updated Branches:
  refs/heads/master b4c220546 -> 02538798b


updated PMC members (myself and Oleg Z.)


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

Branch: refs/heads/master
Commit: 02538798b4521464892a90d6f10dbbd308dc60e6
Parents: b4c2205
Author: ymda...@apache.org 
Authored: Wed May 17 23:16:19 2017 -0400
Committer: ymda...@apache.org 
Committed: Wed May 17 23:16:19 2017 -0400

--
 src/pages/html/people.hbs | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi-site/blob/02538798/src/pages/html/people.hbs
--
diff --git a/src/pages/html/people.hbs b/src/pages/html/people.hbs
index c504624..42e538c 100644
--- a/src/pages/html/people.hbs
+++ b/src/pages/html/people.hbs
@@ -124,6 +124,16 @@ title: Apache NiFi Team
 James Wing
 
 
+
+ozhurakousky
+Oleg Zhurakousky
+
+
+
+ymdavis
+Yolanda M. Davis
+
+
 
 
 
@@ -159,11 +169,6 @@ title: Apache NiFi Team

 
 
-   ozhurakousky
-   Oleg Zhurakousky
-   
-
-
 pvillard31
 Pierre Villard
 
@@ -174,11 +179,6 @@ title: Apache NiFi Team
 
 
 
-ymdavis
-Yolanda M. Davis
-
-
-
 brosander
 Bryan Rosander
 



svn commit: r1795473 - /nifi/site/trunk/people.html

2017-05-17 Thread ymdavis
Author: ymdavis
Date: Thu May 18 03:14:34 2017
New Revision: 1795473

URL: http://svn.apache.org/viewvc?rev=1795473=rev
Log:
updated people list for PMC members

Modified:
nifi/site/trunk/people.html

Modified: nifi/site/trunk/people.html
URL: 
http://svn.apache.org/viewvc/nifi/site/trunk/people.html?rev=1795473=1795472=1795473=diff
==
--- nifi/site/trunk/people.html (original)
+++ nifi/site/trunk/people.html Thu May 18 03:14:34 2017
@@ -227,6 +227,16 @@
 James Wing
 
 
+
+ozhurakousky
+Oleg Zhurakousky
+
+
+
+ymdavis
+Yolanda M. Davis
+
+
 
 
 
@@ -262,11 +272,6 @@

 
 
-   ozhurakousky
-   Oleg Zhurakousky
-   
-
-
 pvillard31
 Pierre Villard
 
@@ -277,11 +282,6 @@
 
 
 
-ymdavis
-Yolanda M. Davis
-
-
-
 brosander
 Bryan Rosander
 




[nifi] Git Push Summary

2017-05-17 Thread mosermw
Repository: nifi
Updated Tags:  refs/tags/rel/nifi-0.7.3 [created] 3ebca16fe


[jira] [Updated] (MINIFI-320) In cases where users run TLSSocket, the context will cause a realloc in multiple threads.

2017-05-17 Thread marco polo (JIRA)

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

marco polo updated MINIFI-320:
--
Component/s: C++

> In cases where users run TLSSocket, the context will cause a realloc in 
> multiple threads. 
> --
>
> Key: MINIFI-320
> URL: https://issues.apache.org/jira/browse/MINIFI-320
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Priority: Blocker
> Fix For: cpp-0.3.0
>
>
> An example stacktrace. . We can either move to a singleton of simply move the 
> ssl library initialization to a better place. 
> #0 0x10122d520 in wrap_realloc 
> (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56520)
> #1 0x100fe80ae in CRYPTO_realloc (libcrypto.1.0.0.dylib:x86_64+0x20ae)
> #2 0x10109880c in lh_insert (libcrypto.1.0.0.dylib:x86_64+0xb280c)
> #3 0x100fea6e7 in OBJ_NAME_add (libcrypto.1.0.0.dylib:x86_64+0x46e7)
> #4 0x1010a5b41 in OpenSSL_add_all_ciphers 
> (libcrypto.1.0.0.dylib:x86_64+0xbfb41)
> #5 0x1010a58d1 in OPENSSL_add_all_algorithms_noconf 
> (libcrypto.1.0.0.dylib:x86_64+0xbf8d1)
> #6 0x10012ad40 in org::apache::nifi::minifi::io::TLSContext::initialize() 
> TLSSocket.cpp:60
> #7 0x100132255 in org::apache::nifi::minifi::io::TLSSocket::initialize() 
> TLSSocket.cpp:166
> #8 0x100677a68 in org::apache::nifi::minifi::Site2SitePeer::Open() 
> Site2SitePeer.cpp:42
> #9 0x100631543 in 
> org::apache::nifi::minifi::Site2SiteClientProtocol::establish() 
> Site2SiteClientProtocol.cpp:46
> #10 0x10063e9ff in 
> org::apache::nifi::minifi::Site2SiteClientProtocol::bootstrap() 
> Site2SiteClientProtocol.cpp:483
> #11 0x100600880 in 
> org::apache::nifi::minifi::RemoteProcessorGroupPort::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
>  org::apache::nifi::minifi::core::ProcessSession*) 
> RemoteProcessorGroupPort.cpp:148
> #12 0x1002c1a3a in 
> org::apache::nifi::minifi::core::Processor::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
>  org::apache::nifi::minifi::core::ProcessSessionFactory*) Processor.cpp:235
> #13 0x10062cc20 in 
> org::apache::nifi::minifi::SchedulingAgent::onTrigger(std::__1::shared_ptr,
>  org::apache::nifi::minifi::core::ProcessContext*, 
> org::apache::nifi::minifi::core::ProcessSessionFactory*) 
> SchedulingAgent.cpp:66
> #14 0x10069b933 in 
> org::apache::nifi::minifi::TimerDrivenSchedulingAgent::run(std::__1::shared_ptr,
>  org::apache::nifi::minifi::core::ProcessContext*, 
> org::apache::nifi::minifi::core::ProcessSessionFactory*) 
> TimerDrivenSchedulingAgent.cpp:37
> #15 0x100690205 in 
> org::apache::nifi::minifi::ThreadedSchedulingAgent::schedule(std::__1::shared_ptr)::$_0::operator()()
>  const ThreadedSchedulingAgent.cpp:97
> #16 0x10068f37d in void* 
> std::__1::__thread_proxy
>  >(void*) __functional_base:416
> #17 0x7fffb45cf9ae in _pthread_body 
> (libsystem_pthread.dylib:x86_64+0x39ae)
> #18 0x7fffb45cf8fa in _pthread_start 
> (libsystem_pthread.dylib:x86_64+0x38fa)
> #19 0x7fffb45cf100 in thread_start (libsystem_pthread.dylib:x86_64+0x3100)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (MINIFI-320) In cases where users run TLSSocket, the context will cause a realloc in multiple threads.

2017-05-17 Thread marco polo (JIRA)

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

marco polo updated MINIFI-320:
--
Description: 
An example stacktrace. . We can either move *back* to a singleton of simply 
move the ssl library initialization to a better place. 
#0 0x10122d520 in wrap_realloc 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56520)
#1 0x100fe80ae in CRYPTO_realloc (libcrypto.1.0.0.dylib:x86_64+0x20ae)
#2 0x10109880c in lh_insert (libcrypto.1.0.0.dylib:x86_64+0xb280c)
#3 0x100fea6e7 in OBJ_NAME_add (libcrypto.1.0.0.dylib:x86_64+0x46e7)
#4 0x1010a5b41 in OpenSSL_add_all_ciphers 
(libcrypto.1.0.0.dylib:x86_64+0xbfb41)
#5 0x1010a58d1 in OPENSSL_add_all_algorithms_noconf 
(libcrypto.1.0.0.dylib:x86_64+0xbf8d1)
#6 0x10012ad40 in org::apache::nifi::minifi::io::TLSContext::initialize() 
TLSSocket.cpp:60
#7 0x100132255 in org::apache::nifi::minifi::io::TLSSocket::initialize() 
TLSSocket.cpp:166
#8 0x100677a68 in org::apache::nifi::minifi::Site2SitePeer::Open() 
Site2SitePeer.cpp:42
#9 0x100631543 in 
org::apache::nifi::minifi::Site2SiteClientProtocol::establish() 
Site2SiteClientProtocol.cpp:46
#10 0x10063e9ff in 
org::apache::nifi::minifi::Site2SiteClientProtocol::bootstrap() 
Site2SiteClientProtocol.cpp:483
#11 0x100600880 in 
org::apache::nifi::minifi::RemoteProcessorGroupPort::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSession*) 
RemoteProcessorGroupPort.cpp:148
#12 0x1002c1a3a in 
org::apache::nifi::minifi::core::Processor::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSessionFactory*) Processor.cpp:235
#13 0x10062cc20 in 
org::apache::nifi::minifi::SchedulingAgent::onTrigger(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) SchedulingAgent.cpp:66
#14 0x10069b933 in 
org::apache::nifi::minifi::TimerDrivenSchedulingAgent::run(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) 
TimerDrivenSchedulingAgent.cpp:37
#15 0x100690205 in 
org::apache::nifi::minifi::ThreadedSchedulingAgent::schedule(std::__1::shared_ptr)::$_0::operator()()
 const ThreadedSchedulingAgent.cpp:97
#16 0x10068f37d in void* 
std::__1::__thread_proxy
 >(void*) __functional_base:416
#17 0x7fffb45cf9ae in _pthread_body (libsystem_pthread.dylib:x86_64+0x39ae)
#18 0x7fffb45cf8fa in _pthread_start (libsystem_pthread.dylib:x86_64+0x38fa)
#19 0x7fffb45cf100 in thread_start (libsystem_pthread.dylib:x86_64+0x3100)

  was:
An example stacktrace. . We can either move to a singleton of simply move the 
ssl library initialization to a better place. 
#0 0x10122d520 in wrap_realloc 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56520)
#1 0x100fe80ae in CRYPTO_realloc (libcrypto.1.0.0.dylib:x86_64+0x20ae)
#2 0x10109880c in lh_insert (libcrypto.1.0.0.dylib:x86_64+0xb280c)
#3 0x100fea6e7 in OBJ_NAME_add (libcrypto.1.0.0.dylib:x86_64+0x46e7)
#4 0x1010a5b41 in OpenSSL_add_all_ciphers 
(libcrypto.1.0.0.dylib:x86_64+0xbfb41)
#5 0x1010a58d1 in OPENSSL_add_all_algorithms_noconf 
(libcrypto.1.0.0.dylib:x86_64+0xbf8d1)
#6 0x10012ad40 in org::apache::nifi::minifi::io::TLSContext::initialize() 
TLSSocket.cpp:60
#7 0x100132255 in org::apache::nifi::minifi::io::TLSSocket::initialize() 
TLSSocket.cpp:166
#8 0x100677a68 in org::apache::nifi::minifi::Site2SitePeer::Open() 
Site2SitePeer.cpp:42
#9 0x100631543 in 
org::apache::nifi::minifi::Site2SiteClientProtocol::establish() 
Site2SiteClientProtocol.cpp:46
#10 0x10063e9ff in 
org::apache::nifi::minifi::Site2SiteClientProtocol::bootstrap() 
Site2SiteClientProtocol.cpp:483
#11 0x100600880 in 
org::apache::nifi::minifi::RemoteProcessorGroupPort::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSession*) 
RemoteProcessorGroupPort.cpp:148
#12 0x1002c1a3a in 
org::apache::nifi::minifi::core::Processor::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSessionFactory*) Processor.cpp:235
#13 0x10062cc20 in 
org::apache::nifi::minifi::SchedulingAgent::onTrigger(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) SchedulingAgent.cpp:66
#14 0x10069b933 in 
org::apache::nifi::minifi::TimerDrivenSchedulingAgent::run(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) 
TimerDrivenSchedulingAgent.cpp:37
#15 0x100690205 in 

[jira] [Created] (MINIFI-320) In cases where users run TLSSocket, the context will cause a realloc in multiple threads.

2017-05-17 Thread marco polo (JIRA)
marco polo created MINIFI-320:
-

 Summary: In cases where users run TLSSocket, the context will 
cause a realloc in multiple threads. 
 Key: MINIFI-320
 URL: https://issues.apache.org/jira/browse/MINIFI-320
 Project: Apache NiFi MiNiFi
  Issue Type: Bug
Reporter: marco polo
Priority: Blocker
 Fix For: cpp-0.3.0


An example stacktrace. . We can either move to a singleton of simply move the 
ssl library initialization to a better place. 
#0 0x10122d520 in wrap_realloc 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56520)
#1 0x100fe80ae in CRYPTO_realloc (libcrypto.1.0.0.dylib:x86_64+0x20ae)
#2 0x10109880c in lh_insert (libcrypto.1.0.0.dylib:x86_64+0xb280c)
#3 0x100fea6e7 in OBJ_NAME_add (libcrypto.1.0.0.dylib:x86_64+0x46e7)
#4 0x1010a5b41 in OpenSSL_add_all_ciphers 
(libcrypto.1.0.0.dylib:x86_64+0xbfb41)
#5 0x1010a58d1 in OPENSSL_add_all_algorithms_noconf 
(libcrypto.1.0.0.dylib:x86_64+0xbf8d1)
#6 0x10012ad40 in org::apache::nifi::minifi::io::TLSContext::initialize() 
TLSSocket.cpp:60
#7 0x100132255 in org::apache::nifi::minifi::io::TLSSocket::initialize() 
TLSSocket.cpp:166
#8 0x100677a68 in org::apache::nifi::minifi::Site2SitePeer::Open() 
Site2SitePeer.cpp:42
#9 0x100631543 in 
org::apache::nifi::minifi::Site2SiteClientProtocol::establish() 
Site2SiteClientProtocol.cpp:46
#10 0x10063e9ff in 
org::apache::nifi::minifi::Site2SiteClientProtocol::bootstrap() 
Site2SiteClientProtocol.cpp:483
#11 0x100600880 in 
org::apache::nifi::minifi::RemoteProcessorGroupPort::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSession*) 
RemoteProcessorGroupPort.cpp:148
#12 0x1002c1a3a in 
org::apache::nifi::minifi::core::Processor::onTrigger(org::apache::nifi::minifi::core::ProcessContext*,
 org::apache::nifi::minifi::core::ProcessSessionFactory*) Processor.cpp:235
#13 0x10062cc20 in 
org::apache::nifi::minifi::SchedulingAgent::onTrigger(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) SchedulingAgent.cpp:66
#14 0x10069b933 in 
org::apache::nifi::minifi::TimerDrivenSchedulingAgent::run(std::__1::shared_ptr,
 org::apache::nifi::minifi::core::ProcessContext*, 
org::apache::nifi::minifi::core::ProcessSessionFactory*) 
TimerDrivenSchedulingAgent.cpp:37
#15 0x100690205 in 
org::apache::nifi::minifi::ThreadedSchedulingAgent::schedule(std::__1::shared_ptr)::$_0::operator()()
 const ThreadedSchedulingAgent.cpp:97
#16 0x10068f37d in void* 
std::__1::__thread_proxy
 >(void*) __functional_base:416
#17 0x7fffb45cf9ae in _pthread_body (libsystem_pthread.dylib:x86_64+0x39ae)
#18 0x7fffb45cf8fa in _pthread_start (libsystem_pthread.dylib:x86_64+0x38fa)
#19 0x7fffb45cf100 in thread_start (libsystem_pthread.dylib:x86_64+0x3100)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-1963 Allows a node reconnecting to the cluster to inherit non-fingerprinted processor settings Forces a node reconnecting to a cluster to serialize the updated flow to disk Added

2017-05-17 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master 289dde098 -> 8e1c79eaa


NIFI-1963 Allows a node reconnecting to the cluster to inherit 
non-fingerprinted processor settings
Forces a node reconnecting to a cluster to serialize the updated flow to disk
Added most processor settings to the flow fingerprint (excluding name, style, 
comment, position, and schedule state)
Updated some test data for FingerprintFactoryTest to test for new fields added 
to the flow fingerprint
Updated StandardProcessorNode to allow processor comments and name to be 
settable while a processor is running
Updated StandardFlowSynchronizer to inherit non-fingerprinted processor 
settings (name, style, comment, and position) when flow is already synchronized
This closes #1812


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

Branch: refs/heads/master
Commit: 8e1c79eaafe886e85e4ceaf8436b961eccfef568
Parents: 289dde0
Author: Jeff Storck 
Authored: Mon May 15 17:21:11 2017 -0400
Committer: Matt Gilman 
Committed: Wed May 17 17:35:33 2017 -0400

--
 .../nifi/controller/StandardFlowService.java|  4 ++-
 .../controller/StandardFlowSynchronizer.java| 14 +++---
 .../nifi/controller/StandardProcessorNode.java  |  6 -
 .../nifi/fingerprint/FingerprintFactory.java| 19 ++
 .../test/resources/nifi/fingerprint/flow1a.xml  | 17 +---
 .../test/resources/nifi/fingerprint/flow1b.xml  | 27 +++-
 .../test/resources/nifi/fingerprint/flow2.xml   | 17 +---
 7 files changed, 80 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/8e1c79ea/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
index 0ce6742..b2c1628 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowService.java
@@ -643,7 +643,9 @@ public class StandardFlowService implements FlowService, 
ProtocolHandler {
 
 
clusterCoordinator.resetNodeStatuses(connectionResponse.getNodeConnectionStatuses().stream()
 .collect(Collectors.toMap(status -> 
status.getNodeIdentifier(), status -> status)));
-controller.resumeHeartbeats();  // we are now connected, so resume 
sending heartbeats.
+// reconnected, this node needs to explicitly write the inherited 
flow to disk, and resume heartbeats
+saveFlowChanges();
+controller.resumeHeartbeats();
 
 logger.info("Node reconnected.");
 } catch (final Exception ex) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/8e1c79ea/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
index 09338c9..975f954 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
@@ -725,6 +725,8 @@ public class StandardFlowSynchronizer implements 
FlowSynchronizer {
 final ProcessorDTO dto = 
FlowFromDOMFactory.getProcessor(processorElement, encryptor);
 final ProcessorNode procNode = 
processGroup.getProcessor(dto.getId());
 
+updateNonFingerprintedProcessorSettings(procNode, dto);
+
 if (!procNode.getScheduledState().name().equals(dto.getState())) {
 try {
 switch (ScheduledState.valueOf(dto.getState())) {
@@ -964,15 +966,12 @@ public 

nifi git commit: NIFI-3896 - Makes DeprecationNotice more intuitive. This closes #1799

2017-05-17 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master 5cf4bf61b -> 289dde098


NIFI-3896 - Makes DeprecationNotice more intuitive. This closes #1799

Update developers guide on how to deprecate a component


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

Branch: refs/heads/master
Commit: 289dde098e8f14c7ed586e03a0d9f70ccc8b97ac
Parents: 5cf4bf6
Author: Andre F de Miranda 
Authored: Tue May 16 00:30:02 2017 +1000
Committer: Matt Gilman 
Committed: Wed May 17 16:37:11 2017 -0400

--
 .../annotation/documentation/DeprecationNotice.java |  3 ++-
 nifi-docs/src/main/asciidoc/developer-guide.adoc| 16 
 .../documentation/html/HtmlDocumentationWriter.java |  2 +-
 .../documentation/example/DeprecatedProcessor.java  |  2 +-
 4 files changed, 20 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/289dde09/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/DeprecationNotice.java
--
diff --git 
a/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/DeprecationNotice.java
 
b/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/DeprecationNotice.java
index a3bbdf4..f9d47dd 100644
--- 
a/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/DeprecationNotice.java
+++ 
b/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/DeprecationNotice.java
@@ -36,8 +36,9 @@ import java.lang.annotation.Target;
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
 @Inherited
+
 public @interface DeprecationNotice {
-Class[] value() default {};
+Class[] alternatives() default {};
 
 String[] classNames() default {};
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/289dde09/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 7b2ba35..d4195a1 100644
--- a/nifi-docs/src/main/asciidoc/developer-guide.adoc
+++ b/nifi-docs/src/main/asciidoc/developer-guide.adoc
@@ -2379,6 +2379,22 @@ bundled with an extension that requires it, even if 
@RequiresInstanceClassLoadin
 logged to help avoid this bad practice.
 
 
+[[deprecation]]
+== Deprecating a Component
+Sometimes it may be desirable to deprecate a component. Whenever this occurs 
the developer may use the
+ @DeprecationNotice annotation to indicate that a component has been 
deprecated, aloowing the developer
+ to describe a reason for the deprecation and suggest alternative components. 
An example of how to do this can
+ be found below:
+
+[source, java]
+
+ @DeprecationNotice(alternatives = {ListenSyslog.class}, classNames = 
{"org.apache.nifi.processors.standard.ListenRELP"}, reason = "Technologyhas 
been superseded",  )
+ public class ListenOldProtocol extends AbstractProcessor {
+
+As you can see, the alternatives can be used to define and array of 
alternative Components, while classNames can be
+used to represent the similar content through an array of strings.
+
+
 == How to contribute to Apache NiFi
 
 We are always excited to have contributions from the community - especially 
from new contributors!

http://git-wip-us.apache.org/repos/asf/nifi/blob/289dde09/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
index e5badc8..6497e41 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java
@@ -249,7 +249,7 @@ public class HtmlDocumentationWriter implements 
DocumentationWriter {
 xmlStreamWriter.writeCharacters("Please consider using one the 
following alternatives: ");
 
 
-Class[] componentNames = 
deprecationNotice.value();
+Class[] componentNames = 
deprecationNotice.alternatives();
 

[jira] [Assigned] (MINIFI-207) findProcessor in ProcessGroup not thread safe

2017-05-17 Thread marco polo (JIRA)

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

marco polo reassigned MINIFI-207:
-

Assignee: marco polo

> findProcessor in ProcessGroup not thread safe
> -
>
> Key: MINIFI-207
> URL: https://issues.apache.org/jira/browse/MINIFI-207
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: marco polo
>Assignee: marco polo
>
> These functions do not use the mutex. the sets can be change the underlying 
> tree upon insertion. Since flow cannot be guaranteed we should use the mutex 
> here ( i.e. it can be called in any order since it is public ). 
> add and remove connection call this function and lock the mutex themselves. 
> An alternative might be to use a recursive mutex or dramatically reduce the 
> critical section in add/remove connection. This appears more desirable. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-202) consider moving away from std::queue

2017-05-17 Thread marco polo (JIRA)

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

marco polo commented on MINIFI-202:
---

Introduced in MINIFI-270 to remove locking. This ticket will remain open to 
address other places where this might be useful. 

> consider moving away from std::queue
> 
>
> Key: MINIFI-202
> URL: https://issues.apache.org/jira/browse/MINIFI-202
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>Priority: Minor
>
> https://github.com/cameron314/concurrentqueue is a concurrent lock free queue 
> offering excellent performance with a palatable license. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (MINIFI-202) consider moving away from std::queue

2017-05-17 Thread marco polo (JIRA)

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

marco polo reassigned MINIFI-202:
-

Assignee: marco polo

> consider moving away from std::queue
> 
>
> Key: MINIFI-202
> URL: https://issues.apache.org/jira/browse/MINIFI-202
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>Priority: Minor
>
> https://github.com/cameron314/concurrentqueue is a concurrent lock free queue 
> offering excellent performance with a palatable license. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117082313
  
--- Diff: README.md ---
@@ -299,7 +299,19 @@ Additionally, users can utilize the MiNiFi Toolkit 
Converter (version 0.0.1 - sc
 
 if you do not want to enable client certificate base authorization
 nifi.security.need.ClientAuth=false
-
+
+### Configuring Volatile and NO-OP Repositories
+
+ in minifi.properties 
+ 
+ # For Volatile Repositories:
+ nifi.flow.repository.class.name=VolatileRepository
+ nifi.provenance.repository.class.name=VolatileRepository
+ 
+ # For NO-OP Repositories:
+nifi.flow.repository.class.name=NoOpRepository
--- End diff --

My thought, initially was that we could have processors that could be self 
contained and work with or without connections. In those cases the 
configuration wouldn't need to be updated but we may be able to disable both 
repositories at runtime thus altering certain devices to have a different 
capability. I support what you are suggesting though but wonder if the Java 
model fits all embedded devices and use cases. 


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117081374
  
--- Diff: LICENSE ---
@@ -401,6 +401,33 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 The views and conclusions contained in the software and documentation are 
those of the authors and
 should not be interpreted as representing official policies, either 
expressed or implied, of Dmitry Vyukov.
 
+
+This product bundles 'concurrentqueue' which is available a Boost Software 
License.
--- End diff --

I'll add a link to that on the wiki entry from other PR. 


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117080960
  
--- Diff: libminifi/src/core/Processor.cpp ---
@@ -194,52 +193,10 @@ void 
Processor::removeConnection(std::shared_ptr conn) {
   }
 }
 
-std::shared_ptr 
Processor::obtainSite2SiteProtocol(
-const std::shared_ptr _factory, std::string 
host, uint16_t sport, uuid_t portId) {
-  std::lock_guard < std::mutex > lock(mutex_);
+/*
--- End diff --

but thanks!


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117079731
  
--- Diff: libminifi/src/core/Processor.cpp ---
@@ -194,52 +193,10 @@ void 
Processor::removeConnection(std::shared_ptr conn) {
   }
 }
 
-std::shared_ptr 
Processor::obtainSite2SiteProtocol(
-const std::shared_ptr _factory, std::string 
host, uint16_t sport, uuid_t portId) {
-  std::lock_guard < std::mutex > lock(mutex_);
+/*
--- End diff --

Sorry I was still self reviewing this. 


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117079682
  
--- Diff: LICENSE ---
@@ -401,6 +401,33 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 The views and conclusions contained in the software and documentation are 
those of the authors and
 should not be interpreted as representing official policies, either 
expressed or implied, of Dmitry Vyukov.
 
+
+This product bundles 'concurrentqueue' which is available a Boost Software 
License.
--- End diff --

After actually visiting the linked article on the emotional dromedary, I 
see that it is actually dual licensed Boost and 2-Clause BSD.  


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117079885
  
--- Diff: LICENSE ---
@@ -401,6 +401,33 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 The views and conclusions contained in the software and documentation are 
those of the authors and
 should not be interpreted as representing official policies, either 
expressed or implied, of Dmitry Vyukov.
 
+
+This product bundles 'concurrentqueue' which is available a Boost Software 
License.
--- End diff --

https://github.com/cameron314/concurrentqueue/blob/master/LICENSE.md


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117076765
  
--- Diff: libminifi/src/core/Processor.cpp ---
@@ -194,52 +193,10 @@ void 
Processor::removeConnection(std::shared_ptr conn) {
   }
 }
 
-std::shared_ptr 
Processor::obtainSite2SiteProtocol(
-const std::shared_ptr _factory, std::string 
host, uint16_t sport, uuid_t portId) {
-  std::lock_guard < std::mutex > lock(mutex_);
+/*
--- End diff --

Remnants of commented out block


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/99#discussion_r117076182
  
--- Diff: LICENSE ---
@@ -401,6 +401,33 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 The views and conclusions contained in the software and documentation are 
those of the authors and
 should not be interpreted as representing official policies, either 
expressed or implied, of Dmitry Vyukov.
 
+
+This product bundles 'concurrentqueue' which is available a Boost Software 
License.
--- End diff --

The included header file indicates it is a Simplified/2-Clause BSD.  Is 
there something else that suggests this is BSL?


> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-270) some refactor to move site2site protocol out of processor

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user phrocker opened a pull request:

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

MINIFI-270: Move Base RPG capabilities back into RemoteProcessGroupPort

This allows us to extend capabilities in RPG into other classes. Since
the same basic functions are the same we can bring the code up from
Processor into RemoteProcessGroupPort.h instead of a separate class.

Updated LICENSE and added concurrentqueue to locking for the object pool.

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 MINIFI-270

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

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


commit 3f9825e48bf340cb9694068cd5873afa28c3ed65
Author: Marc Parisi 
Date:   2017-05-17T12:18:26Z

MINIFI-270: Move Base RPG capabilities back into RemoteProcessGroupPort

This allows us to extend capabilities in RPG into other classes. Since
the same basic functions are the same we can bring the code up from
Processor into RemoteProcessGroupPort.h instead of a separate class.

Updated LICENSE and added concurrentqueue to locking for the object pool.




> some refactor to move site2site protocol out of processor
> -
>
> Key: MINIFI-270
> URL: https://issues.apache.org/jira/browse/MINIFI-270
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++
>Affects Versions: cpp-0.1.0
>Reporter: bqiu
>Assignee: marco polo
>Priority: Minor
>
> @@ -239,12 +242,21 @@ class Processor : public Connectable, public 
> ConfigurableComponent,
>// Trigger the Processor even if the incoming connection is empty
>std::atomic _triggerWhenEmpty;
>  
> - private:
> +  //! obtainSite2SiteProtocol for use
> +  std::shared_ptr 
> obtainSite2SiteProtocol(std::string host, uint16_t sport, uuid_t portId);
>   phrocker
> phrocker 5 hours ago Contributor
> @benqiu2016 Can you make a ticket to move this out of Processor? It should be 
> a separate component. If you make the ticket I'll make this particular change.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117070877
  
--- Diff: libminifi/test/resources/cn.ckey.pem ---
@@ -0,0 +1,31 @@
+Bag Attributes
--- End diff --

Added a reference to that wiki entry in the ReadMe. 


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3917: Use a default value of 'false' for CSV Reader's Skip Header Line property. This closes #1819

2017-05-17 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master 3fd7d3b27 -> 5cf4bf61b


NIFI-3917: Use a default value of 'false' for CSV Reader's Skip Header Line 
property. This closes #1819


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

Branch: refs/heads/master
Commit: 5cf4bf61b384a97ff8430447f7e02afe1aa6ba2a
Parents: 3fd7d3b
Author: Mark Payne 
Authored: Wed May 17 12:09:01 2017 -0400
Committer: Matt Gilman 
Committed: Wed May 17 13:31:53 2017 -0400

--
 .../src/main/java/org/apache/nifi/csv/CSVUtils.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/5cf4bf61/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVUtils.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVUtils.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVUtils.java
index 13afe30..a391a7b 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVUtils.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVUtils.java
@@ -70,7 +70,7 @@ public class CSVUtils {
 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
 .expressionLanguageSupported(false)
 .allowableValues("true", "false")
-.defaultValue("true")
+.defaultValue("false")
 .required(true)
 .build();
 static final PropertyDescriptor COMMENT_MARKER = new 
PropertyDescriptor.Builder()



[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117061976
  
--- Diff: libminifi/src/core/RepositoryFactory.cpp ---
@@ -48,9 +50,15 @@ std::shared_ptr createRepository(
   try {
 std::shared_ptr return_obj = nullptr;
 if (class_name_lc == "flowfilerepository") {
+  std::cout << "creating flow" << std::endl;
   return_obj = instantiate();
 } else if (class_name_lc == "provenancerepository") {
   return_obj = instantiate();
+} else if (class_name_lc == "volatilerepository") {
+  return_obj = instantiate();
+} else if (class_name_lc == "nooprepository") {
+  std::cout << "creating noop" << std::endl;
--- End diff --

it's needed for a test, but the test should be using the 
outputstreamappender. will fix. thanks. 


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117062050
  
--- Diff: libminifi/include/core/Repository.h ---
@@ -47,14 +47,21 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
+#define REPOSITORY_DIRECTORY "./repo"
--- End diff --

Yes. agreed. 


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117061878
  
--- Diff: libminifi/src/core/RepositoryFactory.cpp ---
@@ -48,9 +50,15 @@ std::shared_ptr createRepository(
   try {
 std::shared_ptr return_obj = nullptr;
 if (class_name_lc == "flowfilerepository") {
+  std::cout << "creating flow" << std::endl;
--- End diff --

sorry I added that to be captured by a test, but I guess I forgot the 
outputstreamappender can redirect to stdout. I'll fix. Thanks for reminding me. 


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-317) Update README to include NiFi HipChat public room info

2017-05-17 Thread Andy LoPresto (JIRA)

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

Andy LoPresto commented on MINIFI-317:
--

NiFi has the HipChat information already. 

> Update README to include NiFi HipChat public room info
> --
>
> Key: MINIFI-317
> URL: https://issues.apache.org/jira/browse/MINIFI-317
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Kevin Doran
>Priority: Minor
>  Labels: beginner, beginners, documentation
>
> The top level README for MiNiFi includes mention of the mailing list and IRC 
> channel. We should update it to include the new HipChat room: 
> https://www.hipchat.com/gzh2m5YML
> This probably goes for minifi-cpp as well, and maybe also NIFI (haven't check 
> there yet)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3873: Improve Avro logical types readability

2017-05-17 Thread mattyb149
Repository: nifi
Updated Branches:
  refs/heads/master 2dde48002 -> 3fd7d3b27


NIFI-3873: Improve Avro logical types readability

Signed-off-by: Matt Burgess 

This closes #1788


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

Branch: refs/heads/master
Commit: 3fd7d3b272fcbf4778ab8b6315113b63747697ee
Parents: 2dde480
Author: Koji Kawamura 
Authored: Fri May 12 13:30:31 2017 +0900
Committer: Matt Burgess 
Committed: Wed May 17 13:08:00 2017 -0400

--
 .../nifi-standard-content-viewer/pom.xml|  5 
 .../web/StandardContentViewerController.java| 25 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/3fd7d3b2/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
index 7ca03c7..163a129 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/pom.xml
@@ -64,6 +64,11 @@
 avro
 
 
+joda-time
+joda-time
+compile
+
+
 org.xerial.snappy
 snappy-java
 1.1.2

http://git-wip-us.apache.org/repos/asf/nifi/blob/3fd7d3b2/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java
index d8cb37d..cf532c3 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java
@@ -18,11 +18,16 @@ package org.apache.nifi.web;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
+import org.apache.avro.Conversions;
+import org.apache.avro.data.TimeConversions;
 import org.apache.avro.file.DataFileStream;
 import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericDatumReader;
 import org.apache.avro.io.DatumReader;
 import org.apache.nifi.web.ViewableContent.DisplayMode;
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalTime;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -103,11 +108,27 @@ public class StandardContentViewerController extends 
HttpServlet {
 } else if ("application/avro-binary".equals(contentType) || 
"avro/binary".equals(contentType) || 
"application/avro+binary".equals(contentType)) {
 final StringBuilder sb = new StringBuilder();
 sb.append("[");
-final DatumReader datumReader = new 
GenericDatumReader<>();
+// Use Avro conversions to display logical type values in 
human readable way.
+final GenericData genericData = new GenericData(){
+@Override
+protected void toString(Object datum, StringBuilder 
buffer) {
+// Since these types are not quoted and produce a 
malformed JSON string, quote it here.
+if (datum instanceof LocalDate || datum instanceof 
LocalTime || datum instanceof DateTime) {
+buffer.append("\"").append(datum).append("\"");
+return;
+}
+super.toString(datum, buffer);
+}
+};
+genericData.addLogicalTypeConversion(new 
Conversions.DecimalConversion());
+genericData.addLogicalTypeConversion(new 
TimeConversions.DateConversion());
+genericData.addLogicalTypeConversion(new 
TimeConversions.TimeConversion());
+genericData.addLogicalTypeConversion(new 
TimeConversions.TimestampConversion());
+final 

[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r116998267
  
--- Diff: libminifi/src/core/RepositoryFactory.cpp ---
@@ -48,9 +50,15 @@ std::shared_ptr createRepository(
   try {
 std::shared_ptr return_obj = nullptr;
 if (class_name_lc == "flowfilerepository") {
+  std::cout << "creating flow" << std::endl;
   return_obj = instantiate();
 } else if (class_name_lc == "provenancerepository") {
   return_obj = instantiate();
+} else if (class_name_lc == "volatilerepository") {
+  return_obj = instantiate();
+} else if (class_name_lc == "nooprepository") {
+  std::cout << "creating noop" << std::endl;
--- End diff --

is this needed? should it be logged instead?


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: [NIFI-3906] Introduce additional validation when handling user-supplied input to ensure appropriate values and output encoding within SlickGrid tables. This closes #1818

2017-05-17 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master 9198bee03 -> 2dde48002


[NIFI-3906] Introduce additional validation when handling user-supplied input 
to ensure appropriate values and output encoding within SlickGrid tables. This 
closes #1818


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

Branch: refs/heads/master
Commit: 2dde48002953b490d3ce487082831ba5349e8395
Parents: 9198bee
Author: Scott Aslan 
Authored: Wed May 17 11:32:33 2017 -0400
Committer: Matt Gilman 
Committed: Wed May 17 13:04:31 2017 -0400

--
 .../nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js | 3 ++-
 .../nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/2dde4800/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
index 0192b49..ac66249 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
@@ -681,7 +681,8 @@
 sortable: true,
 resizable: true,
 cssClass: 'cell-right',
-headerCssClass: 'header-right'
+headerCssClass: 'header-right',
+formatter: nfCommon.genericValueFormatter
 },
 {
 id: 'nonHeapUsed',

http://git-wip-us.apache.org/repos/asf/nifi/blob/2dde4800/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
index 503be42..7623234 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
@@ -643,7 +643,7 @@
 markup += dataContext.component.action;
 }
 
-return markup;
+return nfCommon.escapeHtml(markup);
 };
 
 var userPoliciesColumns = [



[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117002470
  
--- Diff: libminifi/include/core/repository/VolatileRepository.h ---
@@ -0,0 +1,350 @@
+/**
+ *
+ * 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.
+ */
+#ifndef LIBMINIFI_INCLUDE_CORE_REPOSITORY_VolatileRepository_H_
+#define LIBMINIFI_INCLUDE_CORE_REPOSITORY_VolatileRepository_H_
+
+#include "core/Repository.h"
+#include 
+#include 
+#include 
+#include "core/Core.h"
+#include "Connection.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace repository {
+
+
+static uint16_t accounting_size = sizeof(void*) * 2 + sizeof(uint64_t)
++ sizeof(size_t);
+
+class RepoValue {
+ public:
+
+  explicit RepoValue()
+  {
+  }
+
+  explicit RepoValue(std::string key, uint8_t *ptr, size_t size)
+  :
+key_(key)
+   {
+ buffer_.resize(size);
+std::memcpy(buffer_.data(), ptr, size);
+  }
+
+  explicit RepoValue(RepoValue &) noexcept
+  : key_(std::move(other.key_)),
+buffer_(std::move(other.buffer_)){
+  }
+  
+  ~RepoValue()
+  {
+  }
+
+ 
+
+  std::string () {
+return key_;
+  }
+
+  /**
+   * Return the size of the memory within the key
+   * buffer, the size of timestamp, and the general
+   * system word size
+   */
+  uint64_t size() {
+return buffer_.size() + accounting_size;
+  }
+
+  size_t bufferSize() {
+return buffer_.size();
+  }
+
+  void emplace(std::string ) {
+str.insert(0, reinterpret_cast(buffer_.data()), 
buffer_.size());
+  }
+
+  RepoValue =(RepoValue &) noexcept {
+key_ = std::move(other.key_);
+buffer_ = std::move(other.buffer_);
+other.buffer_.clear();
+return *this;
+  }
+
+ private:
+  std::string key_;
+  std::vector buffer_;
+};
+
+class AtomicEntry {
+
+ public:
+  AtomicEntry()
+  : write_pending_(false),
+has_value_(false) {
+
+  }
+
+  bool setRepoValue(RepoValue _value, size_t _size) {
+// delete the underlying pointer
+bool lock = false;
+if (!write_pending_.compare_exchange_weak(lock, true) && !lock)
+  return false;
+if (has_value_)
+{
+  prev_size = value_.size();
+}
+value_ = std::move(new_value);
+has_value_ = true;
+try_unlock();
+return true;
+  }
+
+  bool getValue(RepoValue ) {
+try_lock();
+if (!has_value_) {
+  try_unlock();
+  return false;
+}
+value = std::move(value_);
+has_value_ = false;
+try_unlock();
+return true;
+  }
+
+  bool getValue(const std::string , RepoValue ) {
+try_lock();
+if (!has_value_) {
+  try_unlock();
+  return false;
+}
+if (value_.getKey() != key) {
+  try_unlock();
+  return false;
+}
+value = std::move(value_);
+has_value_ = false;
+try_unlock();
+return true;
+  }
+
+ private:
+
+  inline void try_lock() {
+bool lock = false;
+while (!write_pending_.compare_exchange_weak(lock, true) && !lock) {
+  // attempt again
+}
+  }
+
+  inline void try_unlock() {
+bool lock = true;
+while (!write_pending_.compare_exchange_weak(lock, false) && lock) {
+  // attempt again
+}
+  }
+
+  std::atomic write_pending_;
+  std::atomic has_value_;
+  RepoValue value_;
+};
+
+/**
  

[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117001436
  
--- Diff: libminifi/include/core/Repository.h ---
@@ -47,14 +47,21 @@ namespace nifi {
 namespace minifi {
 namespace core {
 
+#define REPOSITORY_DIRECTORY "./repo"
--- End diff --

Should we expose these out to our properties file as well?  Can create a 
ticket to do so at a later juncture.


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117001163
  
--- Diff: README.md ---
@@ -299,7 +299,19 @@ Additionally, users can utilize the MiNiFi Toolkit 
Converter (version 0.0.1 - sc
 
 if you do not want to enable client certificate base authorization
 nifi.security.need.ClientAuth=false
-
+
+### Configuring Volatile and NO-OP Repositories
+
+ in minifi.properties 
+ 
+ # For Volatile Repositories:
+ nifi.flow.repository.class.name=VolatileRepository
+ nifi.provenance.repository.class.name=VolatileRepository
+ 
+ # For NO-OP Repositories:
+nifi.flow.repository.class.name=NoOpRepository
--- End diff --

Not sure we should allow the NoOp repo for flowfiles as that should be 
maintaining the state of our processing.  When we get content established in a 
similar fashion, also feels like it might not be a fit but could potentially 
see some cases where there might be some benefit.


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117002738
  
--- Diff: libminifi/include/core/repository/VolatileRepository.h ---
@@ -0,0 +1,350 @@
+/**
+ *
+ * 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.
+ */
+#ifndef LIBMINIFI_INCLUDE_CORE_REPOSITORY_VolatileRepository_H_
+#define LIBMINIFI_INCLUDE_CORE_REPOSITORY_VolatileRepository_H_
+
+#include "core/Repository.h"
+#include 
+#include 
+#include 
+#include "core/Core.h"
+#include "Connection.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace repository {
+
+
+static uint16_t accounting_size = sizeof(void*) * 2 + sizeof(uint64_t)
++ sizeof(size_t);
+
+class RepoValue {
+ public:
+
+  explicit RepoValue()
+  {
+  }
+
+  explicit RepoValue(std::string key, uint8_t *ptr, size_t size)
+  :
+key_(key)
+   {
+ buffer_.resize(size);
+std::memcpy(buffer_.data(), ptr, size);
+  }
+
+  explicit RepoValue(RepoValue &) noexcept
+  : key_(std::move(other.key_)),
+buffer_(std::move(other.buffer_)){
+  }
+  
+  ~RepoValue()
+  {
+  }
+
+ 
+
+  std::string () {
+return key_;
+  }
+
+  /**
+   * Return the size of the memory within the key
+   * buffer, the size of timestamp, and the general
+   * system word size
+   */
+  uint64_t size() {
+return buffer_.size() + accounting_size;
+  }
+
+  size_t bufferSize() {
+return buffer_.size();
+  }
+
+  void emplace(std::string ) {
+str.insert(0, reinterpret_cast(buffer_.data()), 
buffer_.size());
+  }
+
+  RepoValue =(RepoValue &) noexcept {
+key_ = std::move(other.key_);
+buffer_ = std::move(other.buffer_);
+other.buffer_.clear();
+return *this;
+  }
+
+ private:
+  std::string key_;
+  std::vector buffer_;
+};
+
+class AtomicEntry {
+
+ public:
+  AtomicEntry()
+  : write_pending_(false),
+has_value_(false) {
+
+  }
+
+  bool setRepoValue(RepoValue _value, size_t _size) {
+// delete the underlying pointer
+bool lock = false;
+if (!write_pending_.compare_exchange_weak(lock, true) && !lock)
+  return false;
+if (has_value_)
+{
+  prev_size = value_.size();
+}
+value_ = std::move(new_value);
+has_value_ = true;
+try_unlock();
+return true;
+  }
+
+  bool getValue(RepoValue ) {
+try_lock();
+if (!has_value_) {
+  try_unlock();
+  return false;
+}
+value = std::move(value_);
+has_value_ = false;
+try_unlock();
+return true;
+  }
+
+  bool getValue(const std::string , RepoValue ) {
+try_lock();
+if (!has_value_) {
+  try_unlock();
+  return false;
+}
+if (value_.getKey() != key) {
+  try_unlock();
+  return false;
+}
+value = std::move(value_);
+has_value_ = false;
+try_unlock();
+return true;
+  }
+
+ private:
+
+  inline void try_lock() {
+bool lock = false;
+while (!write_pending_.compare_exchange_weak(lock, true) && !lock) {
+  // attempt again
+}
+  }
+
+  inline void try_unlock() {
+bool lock = true;
+while (!write_pending_.compare_exchange_weak(lock, false) && lock) {
+  // attempt again
+}
+  }
+
+  std::atomic write_pending_;
+  std::atomic has_value_;
+  RepoValue value_;
+};
+
+/**
  

[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r116998366
  
--- Diff: libminifi/src/core/RepositoryFactory.cpp ---
@@ -48,9 +50,15 @@ std::shared_ptr createRepository(
   try {
 std::shared_ptr return_obj = nullptr;
 if (class_name_lc == "flowfilerepository") {
+  std::cout << "creating flow" << std::endl;
--- End diff --

should it be logged instead?


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117018442
  
--- Diff: README.md ---
@@ -299,7 +299,19 @@ Additionally, users can utilize the MiNiFi Toolkit 
Converter (version 0.0.1 - sc
 
 if you do not want to enable client certificate base authorization
 nifi.security.need.ClientAuth=false
-
+
+### Configuring Volatile and NO-OP Repositories
+
+ in minifi.properties 
+ 
+ # For Volatile Repositories:
+ nifi.flow.repository.class.name=VolatileRepository
--- End diff --

shall we stub out these properties with their defaults in the 
minifi.properties?


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-37:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/98#discussion_r117057969
  
--- Diff: README.md ---
@@ -299,7 +299,19 @@ Additionally, users can utilize the MiNiFi Toolkit 
Converter (version 0.0.1 - sc
 
 if you do not want to enable client certificate base authorization
 nifi.security.need.ClientAuth=false
-
+
+### Configuring Volatile and NO-OP Repositories
+
+ in minifi.properties 
+ 
+ # For Volatile Repositories:
+ nifi.flow.repository.class.name=VolatileRepository
+ nifi.provenance.repository.class.name=VolatileRepository
+ 
+ # For NO-OP Repositories:
+nifi.flow.repository.class.name=NoOpRepository
--- End diff --

I think this works for how flowfile is currently implemented but if we have 
a model closer to that of the Java counterparts, not sure this makes a lot of 
sense outside of provenance.  For the other repositories we would not capture 
the current state of where a flowfile is in its overall processing nor have any 
content available between processor hops in the case of content.  Let me know 
your thoughts.  


> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-223) Support HTTP(s) as transport mechanism for Site to Site

2017-05-17 Thread marco polo (JIRA)

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

marco polo commented on MINIFI-223:
---

Sorry this was a misunderstanding on my part based on a prior discussion that 
it was complete and ready to go in. 

> Support HTTP(s) as transport mechanism for Site to Site
> ---
>
> Key: MINIFI-223
> URL: https://issues.apache.org/jira/browse/MINIFI-223
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++, Data Transmission
>Reporter: Aldrin Piri
>Assignee: bqiu
>
> The C++ implementation would benefit from having an HTTP(S) implementation of 
> Site to Site as was described in  
> https://cwiki.apache.org/confluence/display/NIFI/Support+HTTP(S)+as+a+transport+mechanism+for+Site-to-Site
>  and performed in NIFI-1857



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-223) Support HTTP(s) as transport mechanism for Site to Site

2017-05-17 Thread bqiu (JIRA)

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

bqiu commented on MINIFI-223:
-

We only have raw socket support for Site2Site now. We did not implement the 
http support yet.

> Support HTTP(s) as transport mechanism for Site to Site
> ---
>
> Key: MINIFI-223
> URL: https://issues.apache.org/jira/browse/MINIFI-223
> Project: Apache NiFi MiNiFi
>  Issue Type: Improvement
>  Components: C++, Data Transmission
>Reporter: Aldrin Piri
>Assignee: bqiu
>
> The C++ implementation would benefit from having an HTTP(S) implementation of 
> Site to Site as was described in  
> https://cwiki.apache.org/confluence/display/NIFI/Support+HTTP(S)+as+a+transport+mechanism+for+Site-to-Site
>  and performed in NIFI-1857



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3923: Only start processors after repositories have been initialized. This closes #1817

2017-05-17 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master 40a9cd4f2 -> 9198bee03


NIFI-3923: Only start processors after repositories have been initialized. This 
closes #1817


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

Branch: refs/heads/master
Commit: 9198bee0382be60b90191369d8fcc99deebcb2b9
Parents: 40a9cd4
Author: Mark Payne 
Authored: Wed May 17 09:31:47 2017 -0400
Committer: Matt Gilman 
Committed: Wed May 17 11:12:59 2017 -0400

--
 .../org/apache/nifi/controller/StandardFlowSynchronizer.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/9198bee0/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
index a9372a4..09338c9 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowSynchronizer.java
@@ -731,19 +731,19 @@ public class StandardFlowSynchronizer implements 
FlowSynchronizer {
 case DISABLED:
 // switch processor do disabled. This means we 
have to stop it (if it's already stopped, this method does nothing),
 // and then we have to disable it.
-procNode.getProcessGroup().stopProcessor(procNode);
+
controller.stopProcessor(procNode.getProcessGroupIdentifier(), 
procNode.getIdentifier());
 
procNode.getProcessGroup().disableProcessor(procNode);
 break;
 case RUNNING:
 // we want to run now. Make sure processor is not 
disabled and then start it.
 
procNode.getProcessGroup().enableProcessor(procNode);
-
procNode.getProcessGroup().startProcessor(procNode);
+
controller.startProcessor(procNode.getProcessGroupIdentifier(), 
procNode.getIdentifier());
 break;
 case STOPPED:
 if (procNode.getScheduledState() == 
ScheduledState.DISABLED) {
 
procNode.getProcessGroup().enableProcessor(procNode);
 } else if (procNode.getScheduledState() == 
ScheduledState.RUNNING) {
-
procNode.getProcessGroup().stopProcessor(procNode);
+
controller.stopProcessor(procNode.getProcessGroupIdentifier(), 
procNode.getIdentifier());
 }
 break;
 }



[jira] [Commented] (MINIFI-304) Test Failures manifested by logger initialization failures.

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/96
  
Sounds good.  We can finish that up and go from there.


> Test Failures manifested by logger initialization failures. 
> 
>
> Key: MINIFI-304
> URL: https://issues.apache.org/jira/browse/MINIFI-304
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> statics within spdlog would not be initialized in time depending on the order 
> of execution. As a result it is better to use no logging unless necessary. 
> There are examples which use logging, but unless explicitly needed ( and 
> captured into strings, for example ) we should instead turn logging off.
> Breaking this out into separate executables would be idea. This ticket will 
> involve editing the cmake file to move tests into a separate file. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3919: Let AvroTypeUtil try every possible type

2017-05-17 Thread markap14
Repository: nifi
Updated Branches:
  refs/heads/master f019d509f -> 40a9cd4f2


NIFI-3919: Let AvroTypeUtil try every possible type

Before this fix, AvroTypeUtil can throw an Exception before trying every 
possible data types defined within a union field.

This closes #1816.


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

Branch: refs/heads/master
Commit: 40a9cd4f2ead4d0388581921b0de9108a6e97946
Parents: f019d50
Author: Koji Kawamura 
Authored: Wed May 17 15:34:01 2017 +0900
Committer: Mark Payne 
Committed: Wed May 17 10:53:27 2017 -0400

--
 .../java/org/apache/nifi/avro/AvroTypeUtil.java | 20 ++---
 .../nifi-record-serialization-services/pom.xml  |  1 +
 .../avro/TestAvroReaderWithEmbeddedSchema.java  | 43 
 .../src/test/resources/avro/multiple-types.avsc | 16 
 4 files changed, 75 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/40a9cd4f/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
--
diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
index 6494fe5..daf4031 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
@@ -39,6 +39,8 @@ import org.apache.nifi.serialization.record.RecordSchema;
 import org.apache.nifi.serialization.record.SchemaIdentifier;
 import org.apache.nifi.serialization.record.util.DataTypeUtils;
 import 
org.apache.nifi.serialization.record.util.IllegalTypeConversionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -58,6 +60,7 @@ import java.util.function.Function;
 import java.util.stream.Collectors;
 
 public class AvroTypeUtil {
+private static final Logger logger = 
LoggerFactory.getLogger(AvroTypeUtil.class);
 public static final String AVRO_SCHEMA_FORMAT = "avro";
 
 private static final String LOGICAL_TYPE_DATE = "date";
@@ -459,12 +462,19 @@ public class AvroTypeUtil {
 // If at least one non-null type exists, find the first compatible type
 if (nonNullFieldSchemas.size() >= 1) {
 for (final Schema nonNullFieldSchema : nonNullFieldSchemas) {
-final Object convertedValue = 
conversion.apply(nonNullFieldSchema);
 final DataType desiredDataType = 
AvroTypeUtil.determineDataType(nonNullFieldSchema);
-if (DataTypeUtils.isCompatibleDataType(convertedValue, 
desiredDataType)
-// For logical types those store with different type 
(e.g. BigDecimal as ByteBuffer), check compatibility using the original rawValue
-|| (nonNullFieldSchema.getLogicalType() != null && 
DataTypeUtils.isCompatibleDataType(originalValue, desiredDataType))) {
-return convertedValue;
+try {
+final Object convertedValue = 
conversion.apply(nonNullFieldSchema);
+if (DataTypeUtils.isCompatibleDataType(convertedValue, 
desiredDataType)
+// For logical types those store with different 
type (e.g. BigDecimal as ByteBuffer), check compatibility using the original 
rawValue
+|| (nonNullFieldSchema.getLogicalType() != null && 
DataTypeUtils.isCompatibleDataType(originalValue, desiredDataType))) {
+return convertedValue;
+}
+} catch (Exception e) {
+// If failed with one of possible types, continue with the 
next available option.
+if (logger.isDebugEnabled()) {
+logger.debug("Cannot convert value {} to type {}", 
originalValue, desiredDataType, e);
+}
 }
 }
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/40a9cd4f/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/pom.xml
--
diff --git 

[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117022477
  
--- Diff: libminifi/src/SchedulingAgent.cpp ---
@@ -39,6 +40,36 @@ bool 
SchedulingAgent::hasWorkToDo(std::shared_ptr processor) {
 return false;
 }
 
+void SchedulingAgent::enableControllerService(
+std::shared_ptr ) 
{
+
+  logger_->log_trace("Enabling CSN in SchedulingAgent %s",
+ serviceNode->getName());
+  // reference the enable function from serviceNode
+  std::function f_ex = [serviceNode] {
+return serviceNode->enable();
+  };
+  // create a functor that will be submitted to the thread pool.
+  utils::Worker functor(f_ex);
+  // move the functor into the thread pool. While a future is returned
+  // we aren't terribly concerned with the result.
+  component_lifecycle_thread_pool_.execute(std::move(functor));
+}
+
+void SchedulingAgent::disableControllerService(
--- End diff --

Cool, sounds good.  Probably viewed this PR too much in isolation from the 
rest of the codebase and started thinking about if the agent would ever 
shutdown was there a need for the disable sequence.  This lead to me wondering 
if we could tie it to the shutdown process to allow resources to be freed, 
meanwhile, all of this was already done.  Anyway, all good here, just wanted to 
share my mental journey for some (hopeful) clarification.


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117021448
  
--- Diff: libminifi/src/SchedulingAgent.cpp ---
@@ -39,6 +40,36 @@ bool 
SchedulingAgent::hasWorkToDo(std::shared_ptr processor) {
 return false;
 }
 
+void SchedulingAgent::enableControllerService(
+std::shared_ptr ) 
{
+
+  logger_->log_trace("Enabling CSN in SchedulingAgent %s",
+ serviceNode->getName());
+  // reference the enable function from serviceNode
+  std::function f_ex = [serviceNode] {
+return serviceNode->enable();
+  };
+  // create a functor that will be submitted to the thread pool.
+  utils::Worker functor(f_ex);
+  // move the functor into the thread pool. While a future is returned
+  // we aren't terribly concerned with the result.
+  component_lifecycle_thread_pool_.execute(std::move(functor));
+}
+
+void SchedulingAgent::disableControllerService(
--- End diff --

The FlowController is an implementation of a controller service provider. 
It will start the controller services and disable them at shutdown to allow for 
cleanup. There's still some questions in my mind if that is adequate (i.e. 
we're using a timer in some spots ), but that is a separate issue and  captured 
in a ticket.


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-304) Test Failures manifested by logger initialization failures.

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user phrocker commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/96
  
@apiri I would prefer to wait on #83 . 




> Test Failures manifested by logger initialization failures. 
> 
>
> Key: MINIFI-304
> URL: https://issues.apache.org/jira/browse/MINIFI-304
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> statics within spdlog would not be initialized in time depending on the order 
> of execution. As a result it is better to use no logging unless necessary. 
> There are examples which use logging, but unless explicitly needed ( and 
> captured into strings, for example ) we should instead turn logging off.
> Breaking this out into separate executables would be idea. This ticket will 
> involve editing the cmake file to move tests into a separate file. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3918: Added Choice mapping to JsonTreeRowRecordReader.

2017-05-17 Thread markap14
Repository: nifi
Updated Branches:
  refs/heads/master 33dc3e36f -> f019d509f


NIFI-3918: Added Choice mapping to JsonTreeRowRecordReader.


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

Branch: refs/heads/master
Commit: f019d509f38afc0685f361647ee20f798583dfa8
Parents: 33dc3e3
Author: Koji Kawamura 
Authored: Wed May 17 14:23:42 2017 +0900
Committer: Mark Payne 
Committed: Wed May 17 09:49:11 2017 -0400

--
 .../nifi/json/JsonTreeRowRecordReader.java  |  3 ++
 .../nifi/json/TestJsonTreeRowRecordReader.java  | 31 
 2 files changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/f019d509/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeRowRecordReader.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeRowRecordReader.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeRowRecordReader.java
index b542ebe..792c774 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeRowRecordReader.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeRowRecordReader.java
@@ -186,6 +186,9 @@ public class JsonTreeRowRecordReader extends 
AbstractJsonRowRecordReader {
 return null;
 }
 }
+case CHOICE: {
+return DataTypeUtils.convertType(getRawNodeValue(fieldNode), 
desiredType, fieldName);
+}
 }
 
 return null;

http://git-wip-us.apache.org/repos/asf/nifi/blob/f019d509/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/json/TestJsonTreeRowRecordReader.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/json/TestJsonTreeRowRecordReader.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/json/TestJsonTreeRowRecordReader.java
index d0534ff..c83d0dc 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/json/TestJsonTreeRowRecordReader.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/json/TestJsonTreeRowRecordReader.java
@@ -44,6 +44,7 @@ import org.apache.nifi.serialization.record.Record;
 import org.apache.nifi.serialization.record.RecordField;
 import org.apache.nifi.serialization.record.RecordFieldType;
 import org.apache.nifi.serialization.record.RecordSchema;
+import org.apache.nifi.serialization.record.type.ChoiceDataType;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -184,6 +185,36 @@ public class TestJsonTreeRowRecordReader {
 }
 
 @Test
+public void testSingleJsonElementWithChoiceFields() throws IOException, 
MalformedRecordException {
+// Wraps default fields by Choice data type to test mapping to a 
Choice type.
+final List choiceFields = getDefaultFields().stream()
+.map(f -> new RecordField(f.getFieldName(), 
RecordFieldType.CHOICE.getChoiceDataType(f.getDataType(.collect(Collectors.toList());
+final RecordSchema schema = new SimpleRecordSchema(choiceFields);
+
+try (final InputStream in = new FileInputStream(new 
File("src/test/resources/json/single-bank-account.json"));
+ final JsonTreeRowRecordReader reader = new 
JsonTreeRowRecordReader(in, Mockito.mock(ComponentLog.class), schema, 
dateFormat, timeFormat, timestampFormat)) {
+
+final List fieldNames = schema.getFieldNames();
+final List expectedFieldNames = Arrays.asList(new String[] 
{"id", "name", "balance", "address", "city", "state", "zipCode", 

[jira] [Commented] (MINIFI-304) Test Failures manifested by logger initialization failures.

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user kevdoran commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/96
  
@aldrin I created MINIFI-319 to track the CMake Catch scanning.


> Test Failures manifested by logger initialization failures. 
> 
>
> Key: MINIFI-304
> URL: https://issues.apache.org/jira/browse/MINIFI-304
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: C++
>Reporter: marco polo
>Assignee: marco polo
>
> statics within spdlog would not be initialized in time depending on the order 
> of execution. As a result it is better to use no logging unless necessary. 
> There are examples which use logging, but unless explicitly needed ( and 
> captured into strings, for example ) we should instead turn logging off.
> Breaking this out into separate executables would be idea. This ticket will 
> involve editing the cmake file to move tests into a separate file. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (MINIFI-319) Investigate CMake's CatchTest auto-scan capability

2017-05-17 Thread Kevin Doran (JIRA)
Kevin Doran created MINIFI-319:
--

 Summary: Investigate CMake's CatchTest auto-scan capability
 Key: MINIFI-319
 URL: https://issues.apache.org/jira/browse/MINIFI-319
 Project: Apache NiFi MiNiFi
  Issue Type: Improvement
  Components: C++, Testing
Reporter: Kevin Doran


The CMake project provides an integration with Catch, the testing framework we 
use in minifi-cpp:
https://github.com/philsquared/Catch/blob/master/docs/build-systems.md

The CMake script they provide, 
[ParseAndAddCatchTests.cmake|https://github.com/philsquared/Catch/blob/master/contrib/ParseAndAddCatchTests.cmake],
 would likely have to be added to our project and included from our 
CMakeLists.txt file.

Related to: [PR 
#96|https://github.com/apache/nifi-minifi-cpp/pull/96#issuecomment-301543336]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


nifi git commit: NIFI-3920: Remove unnecessary code from AvroTypeUtil

2017-05-17 Thread markap14
Repository: nifi
Updated Branches:
  refs/heads/master c50d51607 -> 33dc3e36f


NIFI-3920: Remove unnecessary code from AvroTypeUtil

- Removed remaining duplicate lines of code left by NIFI-3861 refactoring.
- Added test case that writes Avro record having union field.

This closes #1813.


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

Branch: refs/heads/master
Commit: 33dc3e36fbb7910b9d1ee05091b37b08f32aae6a
Parents: c50d516
Author: Koji Kawamura 
Authored: Wed May 17 11:23:54 2017 +0900
Committer: Mark Payne 
Committed: Wed May 17 09:45:21 2017 -0400

--
 .../java/org/apache/nifi/avro/AvroTypeUtil.java   | 18 --
 .../org/apache/nifi/avro/TestWriteAvroResult.java | 18 +-
 2 files changed, 17 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/33dc3e36/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
--
diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
index 0682b34..6494fe5 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
@@ -386,24 +386,6 @@ public class AvroTypeUtil {
 }
 return avroRecord;
 case UNION:
-// Ignore null types in union
-final List nonNullFieldSchemas = 
getNonNullSubSchemas(fieldSchema);
-
-// If at least one non-null type exists, find the first 
compatible type
-if (nonNullFieldSchemas.size() >= 1) {
-for (final Schema nonNullFieldSchema : 
nonNullFieldSchemas) {
-final Object avroObject = 
convertToAvroObject(rawValue, nonNullFieldSchema, fieldName);
-final DataType desiredDataType = 
AvroTypeUtil.determineDataType(nonNullFieldSchema);
-if (DataTypeUtils.isCompatibleDataType(avroObject, 
desiredDataType)
-// For logical types those store with 
different type (e.g. BigDecimal as ByteBuffer), check compatibility using the 
original rawValue
-|| (nonNullFieldSchema.getLogicalType() != 
null && DataTypeUtils.isCompatibleDataType(rawValue, desiredDataType))) {
-return avroObject;
-}
-}
-
-throw new IllegalTypeConversionException("Cannot convert 
value " + rawValue + " of type " + rawValue.getClass()
-+ " because no compatible types exist in the 
UNION");
-}
 return convertUnionFieldValue(rawValue, fieldSchema, schema -> 
convertToAvroObject(rawValue, schema, fieldName));
 case ARRAY:
 final Object[] objectArray = (Object[]) rawValue;

http://git-wip-us.apache.org/repos/asf/nifi/blob/33dc3e36/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestWriteAvroResult.java
--
diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestWriteAvroResult.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestWriteAvroResult.java
index c9587f3..0a84aec 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestWriteAvroResult.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/avro/TestWriteAvroResult.java
@@ -39,9 +39,11 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.TimeZone;
 
 import 

[jira] [Assigned] (MINIFI-37) Native Volatile Content Repository implementation

2017-05-17 Thread Aldrin Piri (JIRA)

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

Aldrin Piri reassigned MINIFI-37:
-

Assignee: marco polo

> Native Volatile Content Repository implementation
> -
>
> Key: MINIFI-37
> URL: https://issues.apache.org/jira/browse/MINIFI-37
> Project: Apache NiFi MiNiFi
>  Issue Type: Task
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>Priority: Minor
>  Labels: native
>
> Given the constrained environments in which MiNiFi could operate, it would be 
> beneficial to provide a content repository that is strictly in memory for 
> those environments where disk storage may be limited or non-existent. 
> This implementation should consider configuration options around its 
> footprint such as number of entries held and/or sheer capacity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116983866
  
--- Diff: libminifi/test/Test.cpp ---
@@ -1,6 +1,4 @@
 /**
- * @file MiNiFiMain.cpp 
--- End diff --

Ah yeah this one is per another PR I have. I'll remove it here since the 
other PR would need to be rebased, anyway. 


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968835
  
--- Diff: libminifi/include/processors/ListenHTTP.h ---
@@ -115,6 +114,9 @@ class ListenHTTP : public core::Processor {
   std::unique_ptr _handler;
 };
 
+
+REGISTER_RESOURCE(ListenHTTP);
--- End diff --

yes I thought about this morning that the readme needs some love. I'll do 
that. 


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968718
  
--- Diff: libminifi/test/resources/cn.ckey.pem ---
@@ -0,0 +1,31 @@
+Bag Attributes
--- End diff --

yes. i just used the toolkit to generate them. Should I provide that info 
somewhere in the readme?
Owner: CN=test, OU=NIFI
Issuer: CN=localhost, OU=NIFI
Serial number: 15a67536961
Valid from: Wed Feb 22 14:36:44 EST 2017 until: Sat Feb 22 14:36:44 EST 2020


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968249
  
--- Diff: libminifi/test/resources/TestControllerServices.yml ---
@@ -0,0 +1,62 @@
+Flow Controller:
--- End diff --

Yah. that was a last minute copy when I rebased. I'll get rid of that and 
add a .gitignore. thanks!


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968276
  
--- Diff: libminifi/test/resources/nifi-cert.pem ---
@@ -0,0 +1,20 @@
+-BEGIN CERTIFICATE-
--- End diff --

yes


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968270
  
--- Diff: libminifi/test/resources/cn.crt.pem ---
@@ -0,0 +1,25 @@
+Bag Attributes
--- End diff --

yes


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MINIFI-226) Provide support for controller services

2017-05-17 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968301
  
--- Diff: libminifi/test/unit/ClassLoaderTests.cpp ---
@@ -0,0 +1,48 @@
+/**
+ *
+ * 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/core/ClassLoader.h"
+#include "../TestBase.h"
+#include "io/ClientSocket.h"
+#include "core/Processor.h"
+#include "core/ClassLoader.h"
+#include "processors/AppendHostInfo.h"
+#include "core/logging/LogAppenders.h"
+
+using namespace org::apache::nifi::minifi::io;
+TEST_CASE("TestLoader", "[TestLoader]") {
+  
+REQUIRE ( nullptr != 
core::ClassLoader::getDefaultClassLoader().instantiate("AppendHostInfo","hosty"));
+REQUIRE ( nullptr != 
core::ClassLoader::getDefaultClassLoader().instantiate("ListenHTTP","hosty2"));
+REQUIRE ( nullptr == 
core::ClassLoader::getDefaultClassLoader().instantiate("Don'tExist","hosty3"));
+REQUIRE ( nullptr == 
core::ClassLoader::getDefaultClassLoader().instantiate("","EmptyEmpty"));
+/*
--- End diff --

doh!


> Provide support for controller services
> ---
>
> Key: MINIFI-226
> URL: https://issues.apache.org/jira/browse/MINIFI-226
> Project: Apache NiFi MiNiFi
>  Issue Type: New Feature
>  Components: C++, Core Framework
>Reporter: Aldrin Piri
>Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)