[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Pierre Villard (Jira)


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

Pierre Villard commented on NIFI-7114:
--

I've not been able to replicate the issue neither. The only thing that came to 
mind based on the different reported occurrences is the Java version (8u242). I 
could not replicate the issue myself with 8u242 but... by any chance, could you 
try to replicate the issue on your side with an older version of java like 
8u231? Is it possible to have the lsof output before it crashes?

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Joe Witt (Jira)


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

Joe Witt commented on NIFI-7114:


In the attached lsof output there is no indication of a file leak.  The 
nars/jars are all expected/normal.  That appears to leave only about 120 or 
other entries.

Can you please show lsof entry at some period of time. Wait some other period 
of time such as an hour and get another lsof output.  If there is a file leak 
we'll see it there and see what type of thing it is.

Another person reported something similar with sockets leaking.  But 
replicating this scenario so far yields not results and the other person could 
not provide lsof output or more details so you're our best chance of figuring 
out what is going on here at this time.

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376595029
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   It is not necessary since minificpp uses Multi-Byte Character Set and macro 
GetSystemDirectory resolved as GetSystemDirectoryA. 
   In general, if a concern that there is a possibility to accidentally use 
Unicode  instead of Multi-Byte Character Set (or vice versa) - it is not 
possible because of compilation error.
   
   This is a common way to use any Windows API without specifying 'A' or 'W', 
for instance GetSystemDirectory usage in chromium:
   
https://chromium.googlesource.com/chromium/src/base/+/refs/heads/master/base_paths_win.cc
   We should use Windows API this way as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376595029
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   It is not necessary since minificpp uses Multi-Byte Character Set and macro 
GetSystemDirectory resolved as GetSystemDirectoryA. 
   In general, if a concern that there is a possibility to accidentally use 
Unicode  instead of Multi-Byte Character Set (or vice versa) - it is not 
possible because of compilation error.
   
   This is a common way to use any Windows API without specifying 'A' or 'W', 
for instance GetSystemDirectory usage in chromium:
   
https://chromium.googlesource.com/chromium/src/base/+/refs/heads/master/base_paths_win.cc
   We should use Windows API this way it as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376681225
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   This is a common way to use any Windows API without specifying 'A' or 'W', 
for instance GetSystemDirectory usage in chromium:
   
https://chromium.googlesource.com/chromium/src/base/+/refs/heads/master/base_paths_win.cc
   We should use Windows API this way it as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376681225
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   This is a common way to use any Windows API without specifying 'A' or 'W', 
for instance GetSystemDirectory usage in chromium:
   
https://chromium.googlesource.com/chromium/src/base/+/refs/heads/master/base_paths_win.cc
   We should use Windows API this way it as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)


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

Vinicius Zolin commented on NIFI-7114:
--

HTTP mode

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Pierre Villard (Jira)


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

Pierre Villard commented on NIFI-7114:
--

[~vzolin] - is the S2S configured in RAW mode or in HTTP mode?

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)


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

Vinicius Zolin commented on NIFI-7114:
--

Yes to both questions.

 

I've also observed that if I run a StandardHttpContextMap the leak will also 
occur.

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Joe Witt (Jira)


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

Joe Witt commented on NIFI-7114:


ok so the single node nifi has a s2s port on it receiving data?   and that is 
the node where you observe file handles leak?

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (NIFI-7115) Add Zookeeper TLS configuration to Administration Guide

2020-02-07 Thread Joey Frazee (Jira)
Joey Frazee created NIFI-7115:
-

 Summary: Add Zookeeper TLS configuration to Administration Guide
 Key: NIFI-7115
 URL: https://issues.apache.org/jira/browse/NIFI-7115
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Documentation  Website
Reporter: Joey Frazee
Assignee: Joey Frazee






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)


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

Vinicius Zolin commented on NIFI-7114:
--

[~joewitt]

$java -version

openjdk version "1.8.0_242"

OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08

Open JDK 64-Bit Server VM (build 25.242-b08, mixed mode)

 

I've tried changing to Java 11 but had the same results.

 

It is a single node, unsecured, without any load balancer upstream. However it 
does have a s2s (it process provenance from another machine).

 

lsof output is attached. [^lsof.log]

 

 

 

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)


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

Vinicius Zolin updated NIFI-7114:
-
Attachment: lsof.log

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
> Attachments: lsof.log
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Joe Witt (Jira)


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

Joe Witt commented on NIFI-7114:


please show detailed java version output.

is this a single node?  secured?  any load balanced connections?  any s2s

can you share lsof output?

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (MINIFICPP-1147) CWEL: Resolve %% in XML output.

2020-02-07 Thread Alex Marmer (Jira)


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

Alex Marmer resolved MINIFICPP-1147.

Resolution: Fixed

> CWEL: Resolve %% in XML output.
> ---
>
> Key: MINIFICPP-1147
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1147
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Task
>Reporter: Alex Marmer
>Assignee: Alex Marmer
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (MINIFICPP-1149) Controller Socket is not compatible with C2 RESTSender

2020-02-07 Thread Kevin Doran (Jira)
Kevin Doran created MINIFICPP-1149:
--

 Summary: Controller Socket is not compatible with C2 RESTSender
 Key: MINIFICPP-1149
 URL: https://issues.apache.org/jira/browse/MINIFICPP-1149
 Project: Apache NiFi MiNiFi C++
  Issue Type: Test
Affects Versions: 0.7.0
Reporter: Kevin Doran
Assignee: Arpad Boda


When enabling both the controller socket and the C2 RESTSender, I get failures 
for the RESTSender when the controller fails to bind:

 
minifi.properties:

{noformat}
nifi.c2.enable=true
nifi.c2.agent.protocol.class=RESTSender

## base URL of the c2 server,
## very likely the same base url of rest urls
nifi.c2.flow.base.url=http://localhost:10080/efm/api/c2-protocol
nifi.c2.rest.url=http://localhost:10080/efm/api/c2-protocol/heartbeat
nifi.c2.rest.url.ack=http://localhost:10080/efm/api/c2-protocol/acknowledge
nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation

#...

## enable the controller socket provider on port 9998
## off by default. C2 must be enabled to support these
controller.socket.host=localhost
controller.socket.port=9988
{noformat}

errors:

{noformat}
[2020-02-07 18:37:38.870] [org::apache::nifi::minifi::c2::C2Agent] [info] Class 
is RESTSender
[2020-02-07 18:37:38.872] [org::apache::nifi::minifi::io::Socket] [error] Could 
not bind to socket, reason Address family not supported by protocol
{noformat}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)


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

Vinicius Zolin updated NIFI-7114:
-
Affects Version/s: (was: 1.11.1)
   1.10.0

> NiFi not closing file handles
> -
>
> Key: NIFI-7114
> URL: https://issues.apache.org/jira/browse/NIFI-7114
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 1.10.0, 1.11.0
> Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
> NiFi has been installed with no change to any configuration file.
>Reporter: Vinicius Zolin
>Priority: Major
> Fix For: 1.8.0
>
>
> Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
> 500 files per hour (measured using lsof) without any apparent limit until it 
> crashes due to too many open files.
>  
> Increasing the computer open file limit is not a solution since NiFi will 
> still crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (NIFI-7114) NiFi not closing file handles

2020-02-07 Thread Vinicius Zolin (Jira)
Vinicius Zolin created NIFI-7114:


 Summary: NiFi not closing file handles
 Key: NIFI-7114
 URL: https://issues.apache.org/jira/browse/NIFI-7114
 Project: Apache NiFi
  Issue Type: Bug
  Components: Configuration
Affects Versions: 1.11.1, 1.11.0
 Environment: Amazon EC2 running either Amazon Linux 2 or Ubuntu 18.04.
NiFi has been installed with no change to any configuration file.
Reporter: Vinicius Zolin
 Fix For: 1.8.0


Since at least version 1.10 NiFi stopped closing file handles. It opens circa 
500 files per hour (measured using lsof) without any apparent limit until it 
crashes due to too many open files.

 

Increasing the computer open file limit is not a solution since NiFi will still 
crash, it'll only take longer to do so.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376595029
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   It is not necessary since minificpp uses Multi-Byte Character Set and macro 
GetSystemDirectory resolved as GetSystemDirectoryA. 
   In general, if a concern that there is a possibility to accidentally use 
Unicode  instead of Multi-Byte Character Set (or vice versa) - it is not 
possible because of compilation error.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (NIFI-5856) Add capability to assign available matching controller services to processors during import from registry

2020-02-07 Thread Dave Gallagher (Jira)


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

Dave Gallagher commented on NIFI-5856:
--

[~markap14], can you confirm whether a registry upgrade is required? It looks 
like registry-0.2.0 exports don't contain the necessary 
'externalControllerServices' element. I do see it in exports from 
registry-0.5.0. 

> Add capability to assign available matching controller services to processors 
> during import from registry
> -
>
> Key: NIFI-5856
> URL: https://issues.apache.org/jira/browse/NIFI-5856
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: 1.8.0
>Reporter: Ed Berezitsky
>Assignee: Mark Payne
>Priority: Major
>  Labels: SDLC
> Fix For: 1.10.0
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> As a user I would like to reduce manual configuration of components after 
> importing flows from NIFI registry.
> Use cases:
>  * a component uses controller service(s) defined in a scope of *parent* (or 
> higher) level (e.g. record-based processors, DB pools, etc) can have 
> controllers assigned by default, if ID registered is not available (versioned 
> from another NIFI instance)
>  * a controller service that is in a scope of imported flow uses another 
> controller in a scope  of *parent* (or higher) level (e.g. Record 
> readers/writer using schema registry).
> Current state:
>  * a lookup for a controller service is done by ID. If ID is not found, a 
> controller won't be assigned and property of a processor/controller will stay 
> blank and will require manual configuration/selection
> Specifications/Requirements:
>  * Change current behavior to enable default assignment of controller 
> services to processor/controller property in case desired controller service 
> cannot be found by ID.
>  * in order to reduce wrong automatic assignments, both type and name of a 
> controller service should be considered. 
>  * Since names aren't unique, have a NIFI property to specify strict and 
> nonstrict policy for multi-match:
>  ** strict mode will restrict automatic assignment of controller service, and 
> property in the processor/controller will stay blank (as per current 
> specification).
>  ** nonstrict mode will allow any of matching controllers to be assigned 
> (first found).
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376596238
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -286,6 +301,103 @@ wel::WindowsEventLogHandler 
ConsumeWindowsEventLog::getEventLogHandler(const std
   return providers_[name];
 } 
 
+
+// !!! Used a non-documented approach to resolve `%%` in XML via 
C:\Windows\System32\MsObjs.dll.
+// Links which mention this approach: 
+// 
https://social.technet.microsoft.com/Forums/Windows/en-US/340632d1-60f0-4cc5-ad6f-f8c841107d0d/translate-value-1833quot-on-impersonationlevel-and-similar-values?forum=winservergen
+// 
https://github.com/libyal/libevtx/blob/master/documentation/Windows%20XML%20Event%20Log%20(EVTX).asciidoc
 
+// 
https://stackoverflow.com/questions/33498244/marshaling-a-message-table-resource
+//
+// Traverse xml and check each node, if it starts with '%%' and contains only 
digits, use it as key to lookup value in C:\Windows\System32\MsObjs.dll.
+void ConsumeWindowsEventLog::substituteXMLPercentageItems(pugi::xml_document& 
doc) {
+  if (!hMsobjsDll_) {
+return;
+  }
+
+  struct TreeWalker: public pugi::xml_tree_walker {
+TreeWalker(HMODULE hMsobjsDll, std::unordered_map& xmlPercentageItemsResolutions, std::shared_ptr 
logger)
+  : hMsobjsDll_(hMsobjsDll), 
xmlPercentageItemsResolutions_(xmlPercentageItemsResolutions), logger_(logger) {
+}
+
+bool for_each(pugi::xml_node& node) override {
+  const std::string& nodeText = node.text().get();
+
+  auto beginNumberPos = nodeText.find("%%", 0);
+  if (std::string::npos == beginNumberPos) {
+return true;
+  }
+  beginNumberPos += 2;
+
+  auto endNumberPos = beginNumberPos;
+
+  auto n = 0;
+  for (; endNumberPos < nodeText.size(); endNumberPos++) {
+const auto c = nodeText[endNumberPos];
+
+if (!isdigit(c)) {
+  break;
+}
+
+n = 10 * n + c - '0';
+  }
+
+  if (n) {
+const std::string key([beginNumberPos], endNumberPos - 
beginNumberPos);
+std::string value;
+
+const auto it = xmlPercentageItemsResolutions_.find(key);
+if (it == xmlPercentageItemsResolutions_.end()) {
+  LPTSTR pBuffer{};
+  if (FormatMessage(
+FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE | 
FORMAT_MESSAGE_IGNORE_INSERTS,
+hMsobjsDll_,
+n,
+MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+(LPTSTR),
+1024,
+0
+  )) {
+value = pBuffer;
+LocalFree(pBuffer);
+
+// Remove trailing white spaces.
 
 Review comment:
   Fixed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
am-c-p-p commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376595029
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   It is not necessary since minificpp uses Multi-Byte Character Set and macro 
GetSystemDirectory resolved as GetSystemDirectoryA. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-registry] bbende closed pull request #257: NIFIREG-358 Ensure full NiFiUser object is used when authorizing proxies

2020-02-07 Thread GitBox
bbende closed pull request #257: NIFIREG-358 Ensure full NiFiUser object is 
used when authorizing proxies
URL: https://github.com/apache/nifi-registry/pull/257
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-registry] bbende commented on issue #257: NIFIREG-358 Ensure full NiFiUser object is used when authorizing proxies

2020-02-07 Thread GitBox
bbende commented on issue #257: NIFIREG-358 Ensure full NiFiUser object is used 
when authorizing proxies
URL: https://github.com/apache/nifi-registry/pull/257#issuecomment-583596986
 
 
   After going through the code some more, I am going to close this and take a 
different approach, will put up a new PR soon


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-registry] bbende opened a new pull request #257: NIFIREG-358 Ensure full NiFiUser object is used when authorizing proxies

2020-02-07 Thread GitBox
bbende opened a new pull request #257: NIFIREG-358 Ensure full NiFiUser object 
is used when authorizing proxies
URL: https://github.com/apache/nifi-registry/pull/257
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Assigned] (NIFI-6388) Add dynamic relationships to ExecuteScript processor

2020-02-07 Thread Lars Winderling (Jira)


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

Lars Winderling reassigned NIFI-6388:
-

Assignee: Lars Winderling

> Add dynamic relationships to ExecuteScript processor
> 
>
> Key: NIFI-6388
> URL: https://issues.apache.org/jira/browse/NIFI-6388
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core Framework
>Reporter: Lars Winderling
>Assignee: Lars Winderling
>Priority: Minor
>  Labels: features
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> The ExecuteScript processor currently only suppors SUCCESS and FAILURE as 
> relationships. It should be possible to add custom relationships through 
> properties.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MINIFICPP-1119) Unify socket implementation of different platforms

2020-02-07 Thread Marton Szasz (Jira)


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

Marton Szasz updated MINIFICPP-1119:

Status: In Progress  (was: Patch Available)

> Unify socket implementation of different platforms
> --
>
> Key: MINIFICPP-1119
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1119
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Improvement
>Affects Versions: 0.7.0
>Reporter: Arpad Boda
>Assignee: Marton Szasz
>Priority: Major
> Fix For: 0.8.0
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Currently we have different cpp and h files for socket implementations for 
> Win and *nix platforms. 
> As the API is the same at least the latter should go away, we should have as 
> few code copy-pasted as possible. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (NIFI-7113) Developing NiFi custom processors from maven archetype in NetBeans 8.2 fails

2020-02-07 Thread Valentina Ivanova (Jira)
Valentina Ivanova created NIFI-7113:
---

 Summary: Developing NiFi custom processors from maven archetype in 
NetBeans 8.2 fails
 Key: NIFI-7113
 URL: https://issues.apache.org/jira/browse/NIFI-7113
 Project: Apache NiFi
  Issue Type: Bug
  Components: Tools and Build
Affects Versions: 1.11.0, nifi-nar-maven-plugin-1.3.1
 Environment: Windows 10
NetBeans 8.2
Reporter: Valentina Ivanova
 Attachments: project-settings.png, result.png, select-archetype.png

Cannot create a project from a maven Archetype. 
Steps to reproduce in NetBeans 8.2:
File-> New Project -> Maven -> Project from Maven Archetype and then selecting 
nifi-processor-bundle-archetype from the available archetypes. (screenshots 
attached)

Related info:
After some investigation I figured out that file can't be downloaded:
http://repo.maven.apache.org/maven2/org/apache/nifi/nifi/1.11.0/nifi-1.11.0.pom
as the protocol needs to be set to HTTPS. So I created a custom repository (and 
built the index) which uses the HTTPS protocol and try to create the project 
using it. However, it seems the HTTP version is still used, so creating the 
project failed again.

When I browsed the Maven repositories in the Services tab and tried to download 
certain org.apache.nifi poms I got error messages that some dependencies are 
broken which is not clear how to fix.

I figured out further that the protocol has not been changed to https for the 
nifi-nar-maven-plugin. The path to it is:
Expand Services tab, expand Maven Repository, Central Repository and  
org.apache.nifi under it.
Expand the nifi-nar-maven-plugin and download the 1.3.1 jar. 
The pom for which the protocol has not been changed is under 
META-INF.maven.org.apache.nifi.nifi-nar-maven-plugin .




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (NIFIREG-356) Classpath element of Authorizer is not used

2020-02-07 Thread Matt Gilman (Jira)


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

Matt Gilman resolved NIFIREG-356.
-
Resolution: Fixed

> Classpath element of Authorizer is not used
> ---
>
> Key: NIFIREG-356
> URL: https://issues.apache.org/jira/browse/NIFIREG-356
> Project: NiFi Registry
>  Issue Type: Bug
>Affects Versions: 0.5.0
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Major
> Fix For: 1.0.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The authorizers.xml of nifi registry has the same schema as nifi and the 
> authorizer element has a classpath element where the value is a comma 
> separated list of resources to add to the authorizer's classpath.
> In nifi registry this value is ignored and never used in the create method: 
> https://github.com/apache/nifi-registry/blob/master/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/AuthorizerFactory.java#L340



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-registry] mcgilman commented on issue #256: NIFIREG-356 Fixing additional classpath resources for Authorizers and…

2020-02-07 Thread GitBox
mcgilman commented on issue #256: NIFIREG-356 Fixing additional classpath 
resources for Authorizers and…
URL: https://github.com/apache/nifi-registry/pull/256#issuecomment-583457903
 
 
   Thanks for the PR @bbende! This have been merged to master. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-registry] asfgit closed pull request #256: NIFIREG-356 Fixing additional classpath resources for Authorizers and…

2020-02-07 Thread GitBox
asfgit closed pull request #256: NIFIREG-356 Fixing additional classpath 
resources for Authorizers and…
URL: https://github.com/apache/nifi-registry/pull/256
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Resolved] (MINIFICPP-989) Motion detect for a set of captured frames

2020-02-07 Thread Arpad Boda (Jira)


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

Arpad Boda resolved MINIFICPP-989.
--
Fix Version/s: 0.7.0
   Resolution: Fixed

> Motion detect for a set of captured frames
> --
>
> Key: MINIFICPP-989
> URL: https://issues.apache.org/jira/browse/MINIFICPP-989
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Nghia Le
>Assignee: Nghia Le
>Priority: Minor
> Fix For: 0.7.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Compares a sequence of frames to see if any object moved during that time. 
> Send to success if there is movement, failure otherwise



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #713: MINIFICPP-1119 unify win/posix sockets + clean up issues

2020-02-07 Thread GitBox
szaszm commented on a change in pull request #713: MINIFICPP-1119 unify 
win/posix sockets + clean up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#discussion_r376449122
 
 

 ##
 File path: libminifi/include/io/ClientSocket.h
 ##
 @@ -20,10 +20,19 @@
 
 
 #include 
+#ifdef WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include 
+#include 
+#pragma comment(lib, "Ws2_32.lib")
 
 Review comment:
   I'll try to minimize the includes on windows and see if the `#pragma` is 
necessary after I've verified that my rebase doesn't break tests on Windows.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (NIFI-6856) Support MQTT consumer groups

2020-02-07 Thread Kay-Uwe Moosheimer (Jira)


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

Kay-Uwe Moosheimer commented on NIFI-6856:
--

Please add "expressionLanguageSupported" to clientId in 
AbstractMQTTProcessor.java and change

clientID = context.getProperty(PROP_CLIENTID).getValue();

to

clientID = 
context.getProperty(PROP_CLIENTID).evaluateAttributeExpressions().getValue();

Doing so someone can use ${hostname} as clientId or if someone wants ${UUID()} 
or anything else. And we don't force anyone to use UUID if s/he doesn't want to.

In my opinion, this would be more elegant for monitoring the connections at the 
broker.

> Support MQTT consumer groups
> 
>
> Key: NIFI-6856
> URL: https://issues.apache.org/jira/browse/NIFI-6856
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.11.0
>Reporter: Justin Miller
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Multiple MQTT brokers including HiveMQ and EMQX support MQTT consumer groups, 
> which provide a way of horizontally scaling and load balancing MQTT 
> consumers. This feature is built on the MQTTv5 protocol but all the logic is 
> handled server side, so any MQTT client can take advantage of these features: 
> [https://docs.emqx.io/tutorial/v3/en/advanced/share_subscribe.html.]
> Right now ConsumeMQTT cannot take advantage of this horizontal scaling 
> because client ID is required and does not support expression language. 
> Making the client id optional and defaulting to a uuid along with adding a 
> group id field that sets the consumer to join the consumer group would open 
> up the ability to take advantage of these broker features.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] bakaid commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow files" to PublishKafka

2020-02-07 Thread GitBox
bakaid commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow 
files" to PublishKafka
URL: https://github.com/apache/nifi-minifi-cpp/pull/712#issuecomment-583418312
 
 
   @szaszm moving the make_headers call to the ReadCallback constructor body 
solves the issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and

2020-02-07 Thread GitBox
szaszm commented on a change in pull request #710: MINIFICPP - 1110, - 
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r376419716
 
 

 ##
 File path: libminifi/include/core/state/Value.h
 ##
 @@ -115,6 +125,64 @@ class Value {
   std::type_index type_id;
 };
 
+class UInt32Value : public Value {
+ public:
+  explicit UInt32Value(uint32_t value)
+  : Value(std::to_string(value)),
+value(value) {
+setTypeId();
+  }
+
+  explicit UInt32Value(const std::string )
+  : Value(strvalue),
+value(std::stoul(strvalue)) {
+/**
+ * This is a fundamental change in that we would be changing where this 
error occurs.
+ * We should be prudent about breaking backwards compatibility, but since 
Uint32Value
+ * is only created with a validator and type, we **should** be okay.
+ */
+const auto negative = strvalue.find_first_of('-') != std::string::npos;
+ if (negative){
+   throw std::out_of_range("negative value detected");
+ }
+setTypeId();
+  }
+
+  uint32_t getValue() const {
+return value;
+  }
+ protected:
+
+  virtual bool getValue(uint32_t ) {
+ref = value;
+return true;
+  }
+
+  virtual bool getValue(int ) {
+if (value <= (std::numeric_limits::max)()) {
 
 Review comment:
   My bad, I confused `value` with `ref`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and

2020-02-07 Thread GitBox
nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, - 
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r376420231
 
 

 ##
 File path: libminifi/include/core/state/Value.h
 ##
 @@ -87,6 +88,15 @@ class Value {
 type_id = std::type_index(typeid(T));
   }
 
+  virtual bool getValue(uint32_t ) {
+const auto negative = string_value.find_first_of('-') != std::string::npos;
 
 Review comment:
   Will keep the current impl for now


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and

2020-02-07 Thread GitBox
nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, - 
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r376419000
 
 

 ##
 File path: libminifi/test/integration/IntegrationBase.h
 ##
 @@ -42,6 +42,17 @@ class IntegrationBase {
 configureSecurity();
   }
 
+  // Return the last position and number of occurrences.
+  std::pair countPatInStr(const std::string , const 
std::string ) {
+size_t last_pos = 0;
+unsigned int occurrences = 0;
 
 Review comment:
   Done, @szaszm thanks for the detailed explanation. ^^


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and

2020-02-07 Thread GitBox
nghiaxlee commented on a change in pull request #710: MINIFICPP - 1110, - 
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r376417867
 
 

 ##
 File path: libminifi/include/core/state/Value.h
 ##
 @@ -115,6 +125,64 @@ class Value {
   std::type_index type_id;
 };
 
+class UInt32Value : public Value {
+ public:
+  explicit UInt32Value(uint32_t value)
+  : Value(std::to_string(value)),
+value(value) {
+setTypeId();
+  }
+
+  explicit UInt32Value(const std::string )
+  : Value(strvalue),
+value(std::stoul(strvalue)) {
+/**
+ * This is a fundamental change in that we would be changing where this 
error occurs.
+ * We should be prudent about breaking backwards compatibility, but since 
Uint32Value
+ * is only created with a validator and type, we **should** be okay.
+ */
+const auto negative = strvalue.find_first_of('-') != std::string::npos;
+ if (negative){
+   throw std::out_of_range("negative value detected");
+ }
+setTypeId();
+  }
+
+  uint32_t getValue() const {
+return value;
+  }
+ protected:
+
+  virtual bool getValue(uint32_t ) {
+ref = value;
+return true;
+  }
+
+  virtual bool getValue(int ) {
+if (value <= (std::numeric_limits::max)()) {
 
 Review comment:
   Could you elaborate it?
   This is derived from previous impl of uint64, but I think it makes sense (in 
logic, not sure that's actually what we want).
   From my understanding, this check whether `value`(0..2^32-1) is smaller than 
2^31-1 or not, if it is smaller then we assign to `ref`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] szaszm commented on issue #713: MINIFICPP-1119 unify win/posix sockets + clean up issues

2020-02-07 Thread GitBox
szaszm commented on issue #713: MINIFICPP-1119 unify win/posix sockets + clean 
up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#issuecomment-583407584
 
 
   rebasing to updated master...


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (NIFI-4890) OIDC Token Refresh is not done correctly

2020-02-07 Thread Bruno Salzano (Jira)


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

Bruno Salzano commented on NIFI-4890:
-

Hello,

will be this fixed?

Regards

> OIDC Token Refresh is not done correctly
> 
>
> Key: NIFI-4890
> URL: https://issues.apache.org/jira/browse/NIFI-4890
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.5.0
> Environment: Environment:
> Browser: Chrome / Firefox 
> Configuration of NiFi: 
> - SSL certificate for the server (no client auth) 
> - OIDC configuration including end_session_endpoint (see the link 
> https://auth.s.orchestracities.com/auth/realms/default/.well-known/openid-configuration)
>  
>Reporter: Federico Michele Facca
>Priority: Major
>
> It looks like the NIFI UI is not refreshing the OIDC token in background, and 
> because of that, when the token expires, tells you that your session is 
> expired. and you need to refresh the page, to get a new token.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (MINIFICPP-1148) ClientSocket crashes on Windows after repeated failed connection attempts

2020-02-07 Thread Marton Szasz (Jira)


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

Marton Szasz closed MINIFICPP-1148.
---

> ClientSocket crashes on Windows after repeated failed connection attempts
> -
>
> Key: MINIFICPP-1148
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1148
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Bug
> Environment: Windows
>Reporter: Marton Szasz
>Assignee: Marton Szasz
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> On Windows, when we use {{ClientSocket}} to connect to a remote node that has 
> multiple addresses returned by {{getaddrinfo}} and {{connect}} repeatedly 
> fails for any reason, minifi-cpp may crash due to a use-after-free bug. The 
> bug can not be exploited for any other purposes than crashing minifi.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (MINIFICPP-1148) ClientSocket crashes on Windows after repeated failed connection attempts

2020-02-07 Thread Marton Szasz (Jira)


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

Marton Szasz resolved MINIFICPP-1148.
-
Resolution: Fixed

> ClientSocket crashes on Windows after repeated failed connection attempts
> -
>
> Key: MINIFICPP-1148
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1148
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Bug
> Environment: Windows
>Reporter: Marton Szasz
>Assignee: Marton Szasz
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> On Windows, when we use {{ClientSocket}} to connect to a remote node that has 
> multiple addresses returned by {{getaddrinfo}} and {{connect}} repeatedly 
> fails for any reason, minifi-cpp may crash due to a use-after-free bug. The 
> bug can not be exploited for any other purposes than crashing minifi.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #727: MINIFICPP-1148 ClientSocket: fix addrinfo lifetime

2020-02-07 Thread GitBox
arpadboda closed pull request #727: MINIFICPP-1148 ClientSocket: fix addrinfo 
lifetime
URL: https://github.com/apache/nifi-minifi-cpp/pull/727
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] bakaid commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow files" to PublishKafka

2020-02-07 Thread GitBox
bakaid commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow 
files" to PublishKafka
URL: https://github.com/apache/nifi-minifi-cpp/pull/712#issuecomment-583375672
 
 
   @szaszm Unfortunately I was always preempted by something, but I am building 
your final version right now.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Updated] (MINIFICPP-1047) PublishKafka silently drops 0-byte flowfiles

2020-02-07 Thread Marton Szasz (Jira)


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

Marton Szasz updated MINIFICPP-1047:

Status: Patch Available  (was: In Progress)

> PublishKafka silently drops 0-byte flowfiles
> 
>
> Key: MINIFICPP-1047
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1047
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: Dániel Bakai
>Assignee: Marton Szasz
>Priority: Major
>  Time Spent: 5h 20m
>  Remaining Estimate: 0h
>
> We should think about what the proper solution for this would be.
> 0-byte FlowFiles can bear useful data, if some of their attributes are sent 
> as headers.
> We should either
>  - always send 0-byte FlowFiles
>  - only send 0-byte FlowFiles if we would send headers
>  - don't send 0-byte FlowFiles (but then log something)
>  - make the behaviour configurable



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MINIFICPP-1119) Unify socket implementation of different platforms

2020-02-07 Thread Marton Szasz (Jira)


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

Marton Szasz updated MINIFICPP-1119:

Status: Patch Available  (was: In Progress)

> Unify socket implementation of different platforms
> --
>
> Key: MINIFICPP-1119
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1119
> Project: Apache NiFi MiNiFi C++
>  Issue Type: Improvement
>Affects Versions: 0.7.0
>Reporter: Arpad Boda
>Assignee: Marton Szasz
>Priority: Major
> Fix For: 0.8.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Currently we have different cpp and h files for socket implementations for 
> Win and *nix platforms. 
> As the API is the same at least the latter should go away, we should have as 
> few code copy-pasted as possible. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi-minifi-cpp] szaszm commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow files" to PublishKafka

2020-02-07 Thread GitBox
szaszm commented on issue #712: MINIFICPP-1047 Add property "Drop empty flow 
files" to PublishKafka
URL: https://github.com/apache/nifi-minifi-cpp/pull/712#issuecomment-583369678
 
 
   > Will run tests.
   
   @bakaid Did you run the tests?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] arpadboda commented on issue #713: MINIFICPP-1119 unify win/posix sockets + clean up issues

2020-02-07 Thread GitBox
arpadboda commented on issue #713: MINIFICPP-1119 unify win/posix sockets + 
clean up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#issuecomment-583368571
 
 
   > Can I somehow trigger CI builds again? I believe the fedora failure is a 
rare flicker and the mac ones are frequent flickers not introduced by this PR.
   
   Just force push an empty change. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] szaszm commented on issue #713: MINIFICPP-1119 unify win/posix sockets + clean up issues

2020-02-07 Thread GitBox
szaszm commented on issue #713: MINIFICPP-1119 unify win/posix sockets + clean 
up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#issuecomment-583366816
 
 
   Can I somehow trigger CI builds again? I believe the fedora failure is a 
rare flicker and the mac ones are frequent flickers not introduced by this PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376285952
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
+  hMsobjsDll_ = LoadLibrary((systemDir + 
std::string("\\msobjs.dll")).c_str());
 
 Review comment:
   Having this in onSchedule and `FreeLibrary` in the destructor means that if 
onSchedule is called multiple times (configuration reload, for example), the 
reference counter for this DLL will be incremented multiple times and it won't 
be released when the object is finally destructed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.

2020-02-07 Thread GitBox
bakaid commented on a change in pull request #728: MINIFICPP-1147 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/728#discussion_r376259988
 
 

 ##
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##
 @@ -226,20 +229,32 @@ void ConsumeWindowsEventLog::onSchedule(const 
std::shared_ptrgetProperty(OutputFormat.getName(), mode);
+
+  writeXML_ = (mode == Both || mode == XML);
+
+  writePlainText_ = (mode == Both || mode == Plaintext);
+
+  if (writeXML_) {
+char systemDir[MAX_PATH];
+if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
 
 Review comment:
   Please use the A versions of the Windows API calls.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #726: MINIFICPP-1137 - Update RocksDB to 5.18.3

2020-02-07 Thread GitBox
arpadboda closed pull request #726: MINIFICPP-1137 - Update RocksDB to 5.18.3
URL: https://github.com/apache/nifi-minifi-cpp/pull/726
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services