[jira] [Created] (NIFI-5952) RAW Site-to-Site fails with java.nio.channels.IllegalBlockingModeException

2019-01-10 Thread Koji Kawamura (JIRA)
Koji Kawamura created NIFI-5952:
---

 Summary: RAW Site-to-Site fails with 
java.nio.channels.IllegalBlockingModeException
 Key: NIFI-5952
 URL: https://issues.apache.org/jira/browse/NIFI-5952
 Project: Apache NiFi
  Issue Type: Sub-task
  Components: Core Framework
 Environment: jdk-11.0.1
Reporter: Koji Kawamura
Assignee: Koji Kawamura


During the review cycle of NIFI-5820, I found that while HTTP S2S works without 
issue, RAW S2S is failing with following Exception:
{code:java}
 2018-12-19 16:19:26,811 ERROR [Site-to-Site Listener] org.apache.nifi.NiFi
 java.nio.channels.IllegalBlockingModeException: null
 at 
java.base/sun.nio.ch.ServerSocketAdaptor.accept(ServerSocketAdaptor.java:121)
 at 
org.apache.nifi.remote.SocketRemoteSiteListener$1.run(SocketRemoteSiteListener.java:125)
 at java.base/java.lang.Thread.run(Thread.java:834)
{code}
Despite of the fact that the RAW has been worked with older Java versions, it 
seems current nio usage at RAW S2S is not correct. And JDK 11 starts 
complaining about it.

Here are few things I've discovered with current NiFi and nio SocketChannel:
 - NiFi accepts RAW S2S client connection with SocketRemoteSiteListener, which 
uses ServerSocketChannel as non-blocking manner [1]
 - But SocketRemoteSiteListener doesn't use Selector API to accept incoming 
connection and transfer data with the channel. This is the cause of above 
exception.
 - SocketRemoteSiteListener spawns new thread when it accepts connection. This 
is how connections are handled with a non-nio, standard Socket programming. If 
we want to use non-blocking NIO, we need to use channels with Selector
 - But using non-blocking IO with current NiFi S2S protocol can only add few or 
none benefit by doing so. [2]

To make RAW S2S work with Java 11, we need either:
 A. Stop using nio packages.
 B. Implement correct nio usage, meaning use Selector IO and probably we need 
another thread pool.

I'm going to take the approach A above, because B would take much more 
refactoring.

[1] 
[https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/SocketRemoteSiteListener.java#L120]
 [2] 
[https://stackoverflow.com/questions/12338204/in-java-nio-is-a-selector-useful-for-a-client-socketchannel]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] bednar commented on issue #2743: NIFI-5226: Implement a Record API based PutInfluxDB processor

2019-01-10 Thread GitBox
bednar commented on issue #2743: NIFI-5226: Implement a Record API based 
PutInfluxDB processor
URL: https://github.com/apache/nifi/pull/2743#issuecomment-453393896
 
 
   Hi @joewitt, 
   
   Thanks for your detail information. Is there anything else how we can help 
you (or other reviewers) with review? Do you want some additonal information, 
prepare a testing environment, …?
   
   There is also an option to split this PR to smaller PRs:
   
   1/ **InfluxDBService** for sharing connection settings to InfluxDB
   2/ **InfluxLineProtocolReader** for parsing InfluxDB Line Protocol to Apache 
NiFi Record
   3/ **PutInfluxDBRecord** for put data to InfluxDB by Apache NiFi Record API
   
   It will be helpful for you?
   
   Thanks for your cooperation @joewitt


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (NIFI-5951) PutHiveQL can miss logging error message if rollback-on-failure is enabled

2019-01-10 Thread Koji Kawamura (JIRA)


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

Koji Kawamura updated NIFI-5951:

Status: Patch Available  (was: In Progress)

> PutHiveQL can miss logging error message if rollback-on-failure is enabled
> --
>
> Key: NIFI-5951
> URL: https://issues.apache.org/jira/browse/NIFI-5951
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.2.0
>Reporter: Koji Kawamura
>Assignee: Koji Kawamura
>Priority: Major
>  Labels: extension
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> if rollback-on-failure is enabled and a failure occurred after processing 
> some successful FlowFiles, the input FlowFile caused the failure stays in 
> incoming connection (by routed to SELF) while the succeeded FlowFiles are 
> transferred to 'success' relationship.
> That is expected behavior based on rollback-on-failure spec. However, a error 
> log message should be logged for the Exception. Currently, no error message 
> is logged.
>  
> PutHive3QL, PutSQL and PutHiveStreaming has the same issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5951) PutHiveQL can miss logging error message if rollback-on-failure is enabled

2019-01-10 Thread Koji Kawamura (JIRA)


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

Koji Kawamura updated NIFI-5951:

Description: 
if rollback-on-failure is enabled and a failure occurred after processing some 
successful FlowFiles, the input FlowFile caused the failure stays in incoming 
connection (by routed to SELF) while the succeeded FlowFiles are transferred to 
'success' relationship.

That is expected behavior based on rollback-on-failure spec. However, a error 
log message should be logged for the Exception. Currently, no error message is 
logged.

 

PutHive3QL, PutSQL and PutHiveStreaming has the same issue.

  was:
if rollback-on-failure is enabled and a failure occurred after processing some 
successful FlowFiles, the input FlowFile caused the failure stays in incoming 
connection (by routed to SELF) while the succeeded FlowFiles are transferred to 
'success' relationship.

That is expected behavior based on rollback-on-failure spec. However, a error 
log message should be logged for the Exception. Currently, no error message is 
logged.


> PutHiveQL can miss logging error message if rollback-on-failure is enabled
> --
>
> Key: NIFI-5951
> URL: https://issues.apache.org/jira/browse/NIFI-5951
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.2.0
>Reporter: Koji Kawamura
>Assignee: Koji Kawamura
>Priority: Major
>  Labels: extension
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> if rollback-on-failure is enabled and a failure occurred after processing 
> some successful FlowFiles, the input FlowFile caused the failure stays in 
> incoming connection (by routed to SELF) while the succeeded FlowFiles are 
> transferred to 'success' relationship.
> That is expected behavior based on rollback-on-failure spec. However, a error 
> log message should be logged for the Exception. Currently, no error message 
> is logged.
>  
> PutHive3QL, PutSQL and PutHiveStreaming has the same issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] ijokarumawak opened a new pull request #3264: NIFI-5951 Fix error logging with rollback on failure

2019-01-10 Thread GitBox
ijokarumawak opened a new pull request #3264: NIFI-5951 Fix error logging with 
rollback on failure
URL: https://github.com/apache/nifi/pull/3264
 
 
   Thank you for submitting a contribution to Apache NiFi.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
in the commit message?
   
   - [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
   - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] mans2singh commented on issue #2956: NIFI-5537 Create Neo4J cypher execution processor

2019-01-10 Thread GitBox
mans2singh commented on issue #2956: NIFI-5537 Create Neo4J cypher execution 
processor
URL: https://github.com/apache/nifi/pull/2956#issuecomment-453352680
 
 
   @MikeThomsen - 
   I will check the pointers you've (mongodb, hbase) and will get back to you.  
   Thanks 
   Mans


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Created] (NIFI-5951) PutHiveQL can miss logging error message if rollback-on-failure is enabled

2019-01-10 Thread Koji Kawamura (JIRA)
Koji Kawamura created NIFI-5951:
---

 Summary: PutHiveQL can miss logging error message if 
rollback-on-failure is enabled
 Key: NIFI-5951
 URL: https://issues.apache.org/jira/browse/NIFI-5951
 Project: Apache NiFi
  Issue Type: Bug
Affects Versions: 1.2.0
Reporter: Koji Kawamura
Assignee: Koji Kawamura


if rollback-on-failure is enabled and a failure occurred after processing some 
successful FlowFiles, the input FlowFile caused the failure stays in incoming 
connection (by routed to SELF) while the succeeded FlowFiles are transferred to 
'success' relationship.

That is expected behavior based on rollback-on-failure spec. However, a error 
log message should be logged for the Exception. Currently, no error message is 
logged.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969665
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
+
+  REQUIRE(Property::StringToInt("-1 G", int32_var) == true);
+  REQUIRE(int32_var == -1 * 1000 * 1000 * 1000);
+
+  REQUIRE(Property::StringToInt("-1G", uint32_var) == false);  // Negative to 
uint
 
 Review comment:
   This shouldn't be allowed. Whether this barrier exists here or elsewhere is 
what I think we should discuss. It's about the end to end correctness, so not 
sure if the appropriate action is to fix the signedness issues or correct the 
overall issue that 707 was hoping to look into. I fear that resolving any 
issues like signed values without looking into solving the whole picture takes 
us to an unknown state. Thoughts? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246974404
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
 
 Review comment:
   I realize 710 kind of had a different focus, but your comment on the prior 
PR in which you mentioned this was to open 707 in hopes of opening a discussion 
for better dealing with this. For example, it may be the case where sometimes a 
negative value makes sense AND the conversion make sense. I will do some 
research, as I know these cases exist. In others, that is NOT true. 
   
   While the above test is totally valid from the perspective of 710, the hope 
was that we could discuss and more intelligently handle these cases, perhaps 
with the validators themselves. What is your perspective?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246858533
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Almost all of these are invalid and shouldn't be accepted, though (not the 
changes -- the actual entries like - 2 GB ). This was the point of 
https://issues.apache.org/jira/browse/MINIFICPP-707. I don't want to trounce on 
this PR, but the reason I created the ticket was that some of these SHOULD be 
prevented from being used at all in configs, fail early. Therefore it's not as 
simple as doing what is done here. There needs to be more thought put into 
this, this was the primary reason I created the ticket versus implementing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246858533
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Almost all of these are invalid and shouldn't be accepted, though (not the 
changes -- the actual entries ). This was the point of 
https://issues.apache.org/jira/browse/MINIFICPP-707. I don't want to trounce on 
this PR, but the reason I created the ticket was that some of these SHOULD be 
prevented from being used at all in configs, fail early. Therefore it's not as 
simple as doing what is done here. 710 should be OBE in favor of 707. There 
needs to be more thought put into this, this was the primary reason I created 
the ticket versus implementing. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246976098
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
+int64_t val = base * mult;
+if(val >= std::numeric_limits::min() && val <= 
std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Unsigned
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(uint64_t base, uint64_t mult, T& output) {
+uint64_t val = base * mult;
+if(val <= std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool StringToNum(const char* str_begin, char **str_end, T& output) {
+int64_t val = std::strtoll(str_begin, str_end, 0);
+return AssignIfFits(val, 1, output);
 
 Review comment:
   why have any multiplication at all if it is 1? same with the one, below. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246976098
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
+int64_t val = base * mult;
+if(val >= std::numeric_limits::min() && val <= 
std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Unsigned
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(uint64_t base, uint64_t mult, T& output) {
+uint64_t val = base * mult;
+if(val <= std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool StringToNum(const char* str_begin, char **str_end, T& output) {
+int64_t val = std::strtoll(str_begin, str_end, 0);
+return AssignIfFits(val, 1, output);
 
 Review comment:
   why have any multiplication at all if it is 1?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Comment Edited] (MINIFICPP-710) Fix errors in Property StringToInt conversion

2019-01-10 Thread Mr TheSegfault (JIRA)


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

Mr TheSegfault edited comment on MINIFICPP-710 at 1/11/19 1:04 AM:
---

I've made some comments on the PR. Some parts of it are welcome, but the part 
that's really a defect has been there a while and not something I wanted to 
solve in the work from August, but rather wanted to let 707 tease out and try 
to figure out how we stop values from being set, where negative values don't 
make sense ( 707 is also meant to look at covering some complex types, and I 
wondered if what i mentioned above could be a complex type that we could handle 
).

 

I like the idea of fixing the issues above, but do you think we can do so while 
leaving the current way it works as-is? My thought with this question is, leave 
the defect as-is, and punt the discussion OR discuss and fix with these 
tickets. 

 

I've occasionally run into this with typos, and have always considered it a bug 
( letting time period and data size values be set with invalid markers such as 
the negative sign. ). To open that discussion what do you think is the correct 
approach in these cases? 


was (Author: phrocker):
I've made some comments on the PR. Some parts of it are welcome, but the part 
that's really a defect has been there a while and not something I wanted to 
solve in the work from August, but rather wanted to let 707 tease out and try 
to figure out how we stop - byte values from being set at all. I like the idea 
of fixing the issues above, but do you think we can do so while leaving the 
current way it works as-is? 

 

I've occasionally run into this with typos, and have always considered it a bug 
( letting time period and data size values be set with invalid markers such as 
the negative sign. ). To open that discussion what do you think is the correct 
approach in these cases? 

> Fix errors in Property StringToInt conversion
> -
>
> Key: MINIFICPP-710
> URL: https://issues.apache.org/jira/browse/MINIFICPP-710
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: Arpad Boda
>Assignee: Arpad Boda
>Priority: Minor
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Property StringToInt conversion has some defects:
> -signed/unsigned assignment without checking limits
> -overflows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971930
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   I didn't think my last comment was entirely helpful so I went through and 
tried to parse out the parts that are appropriate and SHOULD be accepted. In 
retrospect I think I was being a bit terse jumping between tasks. Sorry if that 
comment didn't provide much insight into my thought process. 
   
   Hopefully I was more clear on what we can immediately accept and what I 
think needs more discussion. I'm totally okay if that discussion yields pushing 
some of the concerns down the road if it makes sense. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969665
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
+
+  REQUIRE(Property::StringToInt("-1 G", int32_var) == true);
+  REQUIRE(int32_var == -1 * 1000 * 1000 * 1000);
+
+  REQUIRE(Property::StringToInt("-1G", uint32_var) == false);  // Negative to 
uint
 
 Review comment:
   This shouldn't be allowed. Whether this barrier exists here or elsewhere is 
what I think we should discuss. It's about the end to end correctness, so not 
sure if the appropriate action is to fix the signedness issues or correct the 
overall issue that 707 was hoping to look into. Thoughts? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246974404
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
 
 Review comment:
   I realize 710 kind of had a different focus, but your comment on the prior 
PR in which you mentioned this was to open 707 in hopes of opening a discussion 
for better dealing with this. For example, it may be the case where sometimes a 
negative value makes sense AND the conversion make sense. I will do some 
research, as I know these cases exist. In others, that is NOT true. 
   
   While the above test is totally valid from the perspective of 710, the hope 
was that we could discuss and more intelligently handle these cases, perhaps 
with the validators themselves. What is your perspective? Would you rather fix 
the low hanging fruit and move on or discuss alternatives?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246973810
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
 
 Review comment:
   Some of these tests exist in yaml if I recall correctly ( but I didn't write 
them ), if you're interested. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (MINIFICPP-710) Fix errors in Property StringToInt conversion

2019-01-10 Thread Mr TheSegfault (JIRA)


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

Mr TheSegfault commented on MINIFICPP-710:
--

I've made some comments on the PR. Some parts of it are welcome, but the part 
that's really a defect has been there a while and not something I wanted to 
solve in the work from August, but rather wanted to let 707 tease out and try 
to figure out how we stop - byte values from being set at all. I like the idea 
of fixing the issues above, but do you think we can do so while leaving the 
current way it works as-is? 

 

I've occasionally run into this with typos, and have always considered it a bug 
( letting time period and data size values be set with invalid markers such as 
the negative sign. ). To open that discussion what do you think is the correct 
approach in these cases? 

> Fix errors in Property StringToInt conversion
> -
>
> Key: MINIFICPP-710
> URL: https://issues.apache.org/jira/browse/MINIFICPP-710
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: Arpad Boda
>Assignee: Arpad Boda
>Priority: Minor
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Property StringToInt conversion has some defects:
> -signed/unsigned assignment without checking limits
> -overflows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246972159
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
+int64_t val = base * mult;
+if(val >= std::numeric_limits::min() && val <= 
std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
 
 Review comment:
   Appveyor showed that it didn't. Do you have access to windows? I can 
probably help with that since I do. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971930
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   I didn't think my last comment was entirely helpful so I went through and 
tried to parse out the parts that are appropriate and SHOULD be accepted. In 
retrospect I think I was being a bit terse jumping between tasks. Sorry if that 
comment didn't provide much insight into my thought process. 
   
   Hopefully I was more clear on what we can immediately and what we can't 
accept without more discussion. If we can parse this out then we can approve 
and merge the good parts. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971930
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   I didn't think my last comment was entirely helpful so I went through and 
tried to parse out the parts that are appropriate and SHOULD be accepted. 
Hopefully I was more clear on what we can immediately and what we can't accept 
without more discussion. If we can parse this out then we can approve and merge 
the good parts. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971618
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
+int64_t val = base * mult;
+if(val >= std::numeric_limits::min() && val <= 
std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
 
 Review comment:
   Does this code compile in windows? I'm not sure that it will. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971581
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
+int64_t val = base * mult;
+if(val >= std::numeric_limits::min() && val <= 
std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Unsigned
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(uint64_t base, uint64_t mult, T& output) {
+uint64_t val = base * mult;
+if(val <= std::numeric_limits::max()) {
+  output = val;
+  return true;
+}
+return false;
+  }
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool StringToNum(const char* str_begin, char **str_end, T& output) {
+int64_t val = std::strtoll(str_begin, str_end, 0);
+return AssignIfFits(val, 1, output);
+  }
+
+  //Unsigned
+  template::value, 
T>::type* = nullptr>
+  static bool StringToNum(const char* str_begin, char **str_end, T& output) {
+if(str_begin[0] == '-') {
 
 Review comment:
   can't assume that it's zero, and that it's non-empty


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971559
 
 

 ##
 File path: libminifi/src/c2/protocols/RESTProtocol.cpp
 ##
 @@ -129,7 +129,7 @@ const C2Payload RESTProtocol::parseJsonResponse(const 
C2Payload , const
   } catch (...) {
   }
 #endif
-  return std::move(C2Payload(payload.getOperation(), 
state::UpdateState::READ_COMPLETE, true));
 
 Review comment:
   Good catch. I rarely build with clang these days...


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246971275
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -163,7 +204,11 @@ class DataSizeValue : public TransformableValue, public 
state::response::UInt64V
 
 const char *cvalue = input.c_str();
 char *pEnd;
-auto ival = std::strtoll(cvalue, , 0);
+
+T ival = 0;
+if(!StringToNum(cvalue, , ival)) {
 
 Review comment:
   This is only applicable if we reach the null terminator and it is not a byte 
string


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246970833
 
 

 ##
 File path: libminifi/include/core/TypedValues.h
 ##
 @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public 
state::response::UInt6
  * format  .
  */
 class DataSizeValue : public TransformableValue, public 
state::response::UInt64Value {
+private:
+
+  //Signed
+  template::value, 
T>::type* = nullptr>
+  static bool AssignIfFits(int64_t base, uint64_t mult, T& output) {
 
 Review comment:
   These I like and think we should use this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969665
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
+
+  REQUIRE(Property::StringToInt("-1 G", int32_var) == true);
+  REQUIRE(int32_var == -1 * 1000 * 1000 * 1000);
+
+  REQUIRE(Property::StringToInt("-1G", uint32_var) == false);  // Negative to 
uint
 
 Review comment:
   This shouldn't be allowed. Whether this barrier exists here or elsewhere is 
what I think we should discuss. It's about the end to end correctness. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969601
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
 
 Review comment:
   One of the things that the big PR left as a todo was to write tests with 
conversions, so I will readily admit that there may be some cleanup. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969481
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
+
+  REQUIRE(Property::StringToInt("-1 G", int32_var) == true);
 
 Review comment:
   We should almost exclusively not allow signed Byte values in string to int. 
It should always be positive. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246969407
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
+  using org::apache::nifi::minifi::core::Property;
+
+  uint64_t uint64_var = 0;
+  REQUIRE(Property::StringToInt("-2", uint64_var) == false);  // Negative 
shouldn't be converted to uint
+
+  uint32_t uint32_var = 0;
+  REQUIRE(Property::StringToInt("3  GB", uint32_var) == true);  // Test 
skipping of spaces, too
+  uint32_t expected_value = 3u * 1024 * 1024 * 1024;
+  REQUIRE(uint32_var == expected_value);
+
+  int32_t int32_var = 0;
+  REQUIRE(Property::StringToInt("3GB", int32_var) == false);  // Doesn't fit
 
 Review comment:
   I'll have to look at the changes more closely but we shouldn't be worrying 
about int32, we're almost exclusively uint64 and when we're not ( such as 
someone saying a type is int ), we should be okay up-converting. It's possible 
that someone sets a type, but I don't think we can say at this prospect if the 
type fits or doesn't fit


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5841) PutHive3Streaming processor Mem Leak

2019-01-10 Thread Kei Miyauchi (JIRA)


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

Kei Miyauchi commented on NIFI-5841:


[~pvillard] yes, please see https://issues.apache.org/jira/browse/HIVE-20979.

> PutHive3Streaming processor Mem Leak
> 
>
> Key: NIFI-5841
> URL: https://issues.apache.org/jira/browse/NIFI-5841
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.8.0, 1.7.1
> Environment: Hive 3.1.*
>Reporter: Advith Nagappa
>Assignee: Kei Miyauchi
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Nifi versions: 1,7.1 and 1.8.0
>  
> nifi/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/PutHive3Streaming.java**
>  , line 417 seems redundant,
> {code:java}
> ShutdownHookManager.addShutdownHook(hiveStreamingConnection::close, 
> FileSystem.SHUTDOWN_HOOK_PRIORITY + 1){code}
>  
> Whereas Hive 3.0.0 did not add a shutdownhook within connect() method, Hive 
> 3.1.* does:
>  
> hive/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
> {code:java}
> ShutdownHookManager.addShutdownHook(streamingConnection::close, 
> FileSystem.SHUTDOWN_HOOK_PRIORITY + 1);{code}
> This creates two references to the shutdownhook object per transaction out of 
> which only one is ever cleaned; resulting in a slow/fast degradation of heap 
> space depending on the velocity of transactions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] bdesert commented on issue #3261: NIFI-5869 Support Reconnection for JMS

2019-01-10 Thread GitBox
bdesert commented on issue #3261: NIFI-5869 Support Reconnection for JMS
URL: https://github.com/apache/nifi/pull/3261#issuecomment-453304679
 
 
   @mosermw , thanks, good catch. I've tested with ConsumeJMS. I'm going to 
change this now to fix it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso commented on NIFI-5948:
---

Hi!
I checked out nifi-app.log but the action produce no stacktrace there. In 
nifi-user.log this is displayed when I hit the error:

2019-01-10 23:21:52,524 INFO [NiFi Web Server-846] 
o.a.n.w.s.NiFiAuthenticationFilter Attempting request for () GET 
https://localhost:8443/nifi-api/flow/client-id (source ip: 127.0.0.1)
2019-01-10 23:21:52,524 INFO [NiFi Web Server-834] 
o.a.n.w.s.NiFiAuthenticationFilter Attempting request for () GET 
https://localhost:8443/nifi-api/flow/config (source ip: 127.0.0.1)
2019-01-10 23:21:52,524 INFO [NiFi Web Server-846] 
o.a.n.w.s.NiFiAuthenticationFilter Authentication success for jpconver
2019-01-10 23:21:52,525 INFO [NiFi Web Server-834] 
o.a.n.w.s.NiFiAuthenticationFilter Authentication success for jpconver
2019-01-10 23:21:52,526 INFO [NiFi Web Server-826] 
o.a.n.w.s.NiFiAuthenticationFilter Attempting request for () GET 
https://localhost:8443/nifi-api/flow/current-user (source ip: 127.0.0.1)
2019-01-10 23:21:52,527 INFO [NiFi Web Server-826] 
o.a.n.w.s.NiFiAuthenticationFilter Authentication success for jpconver
2019-01-10 23:21:52,593 INFO [NiFi Web Server-846] 
o.a.n.w.s.NiFiAuthenticationFilter Attempting request for () GET 
https://localhost:8443/nifi-api/tenants/user-groups (source ip: 127.0.0.1)
2019-01-10 23:21:52,593 INFO [NiFi Web Server-812] 
o.a.n.w.s.NiFiAuthenticationFilter Attempting request for () GET 
https://localhost:8443/nifi-api/tenants/users (source ip: 127.0.0.1)
2019-01-10 23:21:52,594 INFO [NiFi Web Server-846] 
o.a.n.w.s.NiFiAuthenticationFilter Authentication success for jpconver
2019-01-10 23:21:52,594 INFO [NiFi Web Server-812] 
o.a.n.w.s.NiFiAuthenticationFilter Authentication success for jpconver
2019-01-10 23:21:52,595 INFO [NiFi Web Server-846] 
o.a.n.w.a.c.ResourceNotFoundExceptionMapper 
org.apache.nifi.web.ResourceNotFoundException: Unable to find user with id 
'ae1523b4-1336-3a1c-8283-0a784f5cb017'.. Returning Not Found response.

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Matt Gilman (JIRA)


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

Matt Gilman commented on NIFI-5948:
---

Would you be able to check your logs for a stacktrace? I believe it should be 
in the nf-user.log. Though it's possible that it may be in the nifi-app.log. 
Thanks!

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5950) Error updating flow version if input port has been removed and re-added with the same name.

2019-01-10 Thread Kevin Doran (JIRA)


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

Kevin Doran updated NIFI-5950:
--
Description: 
Originally reported on the users@nifi mailing list on this thread:
 
[https://lists.apache.org/thread.html/cf1206d65109bd35e07dfa9b7a24684a31e0580ddc2d351d2cb6eeaa@%3Cusers.nifi.apache.org%3E]
h2. Steps to reproduce
 # Create a PG. We will call this PG1 in these instructions
 # Add an input port to PG1 named "my port"
 # Start version control on PG1 to save to registry
 # Create a new PG (PG2) by importing PG1 at version 1 from Registry.
 # In PG1, delete the input port named "my port"
 # In PG1, add an input port with the same name as the port you just deleted, 
"my port"
 # Commit a new version of PG1 to registry
 # Change/update PG2 to version 2. This will trigger the failure.

h2. Analysis

During the update, we are attempting to remove an input port and and add an 
input port with the same name (but different IDs). Here is an example diff that 
makes this apparent:
{noformat}
{
  "bucketId": "898c9714-f3fa-456a-ac81-b63b7b0e7ff9",
  "componentDifferenceGroups": [
{
  "componentId": "956f4819-77d3-3044-a6df-cf79c9be0646",
  "componentName": "my port",
  "componentType": "Input Port",
  "differences": [
{
  "changeDescription": "Input Port was added",
  "differenceType": "COMPONENT_ADDED",
  "differenceTypeDescription": "Component Added",
  "valueB": "956f4819-77d3-3044-a6df-cf79c9be0646"
}
  ],
  "processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
},
{
  "componentId": "3434b1ce-e5be-348e-897e-cb8f79fdc42a",
  "componentName": "my port",
  "componentType": "Input Port",
  "differences": [
{
  "changeDescription": "Input Port was removed",
  "differenceType": "COMPONENT_REMOVED",
  "differenceTypeDescription": "Component Removed",
  "valueA": "3434b1ce-e5be-348e-897e-cb8f79fdc42a"
}
  ],
  "processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
}
  ],
  "flowId": "4f5a691c-428d-4439-9013-9a729b5f5d37",
  "versionA": 1,
  "versionB": 2
}
{noformat}

*It is likely that the update flow logic in 
[StandardProcessGroup|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java]
 is attempting to add the new input port before deleting the existing one. As 
input ports are required to have unique names, it fails with the 
exception/message we see in the stack trace.*
h3. Stack trace:
{noformat}
2019-01-10 21:18:38,032 ERROR [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Failed to update flow to new version
java.lang.IllegalStateException: The input port name or identifier is not 
available to be added.
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:512)
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:4142)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateProcessGroup(StandardProcessGroup.java:3597)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateFlow(StandardProcessGroup.java:3367)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO.updateProcessGroupFlow(StandardProcessGroupDAO.java:358)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO$$FastClassBySpringCGLIB$$10a99b47.invoke()
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
  at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
  at 
org.apache.nifi.audit.ProcessGroupAuditor.updateProcessGroupFlowAdvice(ProcessGroupAuditor.java:282)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
  at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
  at 

[jira] [Updated] (NIFI-5944) When NiFi restarts, if a component is expected to be running but is invalid, it never starts, even if becoming valid later

2019-01-10 Thread Mark Payne (JIRA)


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

Mark Payne updated NIFI-5944:
-
Status: Patch Available  (was: Reopened)

> When NiFi restarts, if a component is expected to be running but is invalid, 
> it never starts, even if becoming valid later
> --
>
> Key: NIFI-5944
> URL: https://issues.apache.org/jira/browse/NIFI-5944
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> When NiFi starts up, if a component is expected to be running, NiFi will 
> attempt to start the component. However, if the component is invalid for any 
> reason, instead of starting the component, it throws an Exception and gives 
> up. Instead, it should wait until the component becomes valid and then begin 
> scheduling (or enabling, in the case of a controller service) the component. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5950) Error updating flow version if input port has been removed and re-added with the same name.

2019-01-10 Thread Kevin Doran (JIRA)


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

Kevin Doran updated NIFI-5950:
--
Description: 
Originally reported on the users@nifi mailing list on this thread:
 
[https://lists.apache.org/thread.html/cf1206d65109bd35e07dfa9b7a24684a31e0580ddc2d351d2cb6eeaa@%3Cusers.nifi.apache.org%3E]
h2. Steps to reproduce
 # Create a PG. We will call this PG1 in these instructions
 # Add an input port to PG1 named "my port"
 # Start version control on PG1 to save to registry
 # Create a new PG (PG2) by importing PG1 at version 1 from Registry.
 # In PG1, delete the input port named "my port"
 # In PG1, add an input port with the same name as the port you just deleted, 
"my port"
 # Commit a new version of PG1 to registry
 # Change/update PG2 to version 2. This will trigger the failure.

h2. Analysis

During the update, we are attempting to remove an input port and and add an 
input port with the same name (but different IDs). Here is an example diff that 
makes this apparent:
{noformat}
{
"bucketId": "898c9714-f3fa-456a-ac81-b63b7b0e7ff9",
"componentDifferenceGroups": [
{
"componentId": "956f4819-77d3-3044-a6df-cf79c9be0646",
"componentName": "my port",
"componentType": "Input Port",
"differences": [
{
"changeDescription": "Input Port was added",
"differenceType": "COMPONENT_ADDED",
"differenceTypeDescription": "Component Added",
"valueB": "956f4819-77d3-3044-a6df-cf79c9be0646"
}
],
"processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
},
{
"componentId": "3434b1ce-e5be-348e-897e-cb8f79fdc42a",
"componentName": "my port",
"componentType": "Input Port",
"differences": [
{
"changeDescription": "Input Port was removed",
"differenceType": "COMPONENT_REMOVED",
"differenceTypeDescription": "Component Removed",
"valueA": "3434b1ce-e5be-348e-897e-cb8f79fdc42a"
}
],
"processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
}
],
"flowId": "4f5a691c-428d-4439-9013-9a729b5f5d37",
"versionA": 1,
"versionB": 2
}
{noformat}
*It is likely that the update flow logic in 
[StandardProcessGroup|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java]
 is attempting to add the new input port before deleting the existing one. As 
input ports are required to have unique names, it fails with the 
exception/message we see in the stack trace.*
h3. Stack trace:
{noformat}
2019-01-10 21:18:38,032 ERROR [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Failed to update flow to new version
java.lang.IllegalStateException: The input port name or identifier is not 
available to be added.
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:512)
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:4142)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateProcessGroup(StandardProcessGroup.java:3597)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateFlow(StandardProcessGroup.java:3367)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO.updateProcessGroupFlow(StandardProcessGroupDAO.java:358)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO$$FastClassBySpringCGLIB$$10a99b47.invoke()
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
  at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
  at 
org.apache.nifi.audit.ProcessGroupAuditor.updateProcessGroupFlowAdvice(ProcessGroupAuditor.java:282)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
  at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
  at 

[GitHub] mcgilman commented on issue #3263: NIFI-5944: If processor is no longer scheduled to run after a failed …

2019-01-10 Thread GitBox
mcgilman commented on issue #3263: NIFI-5944: If processor is no longer 
scheduled to run after a failed …
URL: https://github.com/apache/nifi/pull/3263#issuecomment-453264189
 
 
   Good catch, will review...


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5944) When NiFi restarts, if a component is expected to be running but is invalid, it never starts, even if becoming valid later

2019-01-10 Thread Mark Payne (JIRA)


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

Mark Payne commented on NIFI-5944:
--

[~mcgilman] thanks for reviewing. Unfortunately, I found a slight bug so 
re-opened the ticket and will submit another PR.

> When NiFi restarts, if a component is expected to be running but is invalid, 
> it never starts, even if becoming valid later
> --
>
> Key: NIFI-5944
> URL: https://issues.apache.org/jira/browse/NIFI-5944
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> When NiFi starts up, if a component is expected to be running, NiFi will 
> attempt to start the component. However, if the component is invalid for any 
> reason, instead of starting the component, it throws an Exception and gives 
> up. Instead, it should wait until the component becomes valid and then begin 
> scheduling (or enabling, in the case of a controller service) the component. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] markap14 opened a new pull request #3263: NIFI-5944: If processor is no longer scheduled to run after a failed …

2019-01-10 Thread GitBox
markap14 opened a new pull request #3263: NIFI-5944: If processor is no longer 
scheduled to run after a failed …
URL: https://github.com/apache/nifi/pull/3263
 
 
   …trigger of @OnScheduled, ensure that we set scheduled status to STOPPED
   
   Thank you for submitting a contribution to Apache NiFi.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
in the commit message?
   
   - [ ] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
   - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Reopened] (NIFI-5944) When NiFi restarts, if a component is expected to be running but is invalid, it never starts, even if becoming valid later

2019-01-10 Thread Mark Payne (JIRA)


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

Mark Payne reopened NIFI-5944:
--

> When NiFi restarts, if a component is expected to be running but is invalid, 
> it never starts, even if becoming valid later
> --
>
> Key: NIFI-5944
> URL: https://issues.apache.org/jira/browse/NIFI-5944
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> When NiFi starts up, if a component is expected to be running, NiFi will 
> attempt to start the component. However, if the component is invalid for any 
> reason, instead of starting the component, it throws an Exception and gives 
> up. Instead, it should wait until the component becomes valid and then begin 
> scheduling (or enabling, in the case of a controller service) the component. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (NIFI-5950) Error updating flow version if input port has been removed and re-added with the same name.

2019-01-10 Thread Kevin Doran (JIRA)
Kevin Doran created NIFI-5950:
-

 Summary: Error updating flow version if input port has been 
removed and re-added with the same name.
 Key: NIFI-5950
 URL: https://issues.apache.org/jira/browse/NIFI-5950
 Project: Apache NiFi
  Issue Type: Bug
  Components: Flow Versioning
Affects Versions: 1.7.1, 1.8.0, 1.7.0, 1.6.0, 1.5.0
Reporter: Kevin Doran
 Fix For: 1.9.0


Originally reported on the users@nifi mailing list on this thread:
https://lists.apache.org/thread.html/cf1206d65109bd35e07dfa9b7a24684a31e0580ddc2d351d2cb6eeaa@%3Cusers.nifi.apache.org%3E

h2. Steps to reproduce

# Create a PG. We will call this PG1 in these instructions
# Add an input port to PG1 named "my port"
# Start version control on PG1 to save to registry
# Create a new PG (PG2) by importing PG1 at version 1 from Registry.
# In PG1, delete the input port named "my port"
# In PG1, add an input port with the same name as the port you just deleted, 
"my port"
# Commit a new version of PG1 to registry
# Change/update PG2 to version 2. This will trigger the failure.

h2. Analysis

During the update, we are attempting to remove an input port and and add an 
input port with the same name (but different IDs). Here is an example diff that 
makes this apparent:

{noformat}
{
"bucketId": "898c9714-f3fa-456a-ac81-b63b7b0e7ff9",
"componentDifferenceGroups": [
{
"componentId": "956f4819-77d3-3044-a6df-cf79c9be0646",
"componentName": "my port",
"componentType": "Input Port",
"differences": [
{
"changeDescription": "Input Port was added",
"differenceType": "COMPONENT_ADDED",
"differenceTypeDescription": "Component Added",
"valueB": "956f4819-77d3-3044-a6df-cf79c9be0646"
}
],
"processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
},
{
"componentId": "3434b1ce-e5be-348e-897e-cb8f79fdc42a",
"componentName": "my port",
"componentType": "Input Port",
"differences": [
{
"changeDescription": "Input Port was removed",
"differenceType": "COMPONENT_REMOVED",
"differenceTypeDescription": "Component Removed",
"valueA": "3434b1ce-e5be-348e-897e-cb8f79fdc42a"
}
],
"processGroupId": "6cca3284-5caf-3555-9813-48f2dd913782"
}
],
"flowId": "4f5a691c-428d-4439-9013-9a729b5f5d37",
"versionA": 1,
"versionB": 2
}
{noformat}

*It is likely that the update flow logic in 
[StandardProcessGroup|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java]
 is attempting to add the new input port before deleting the existing one. As 
input ports are required to have unique names, it fails with the 
exception/message we see in the stack trace.*

h3. Stack trace:

{noformat}
2019-01-10 21:18:38,032 ERROR [Version Control Update Thread-1] 
org.apache.nifi.web.api.VersionsResource Failed to update flow to new version
java.lang.IllegalStateException: The input port name or identifier is not 
available to be added.
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:512)
  at 
org.apache.nifi.groups.StandardProcessGroup.addInputPort(StandardProcessGroup.java:4142)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateProcessGroup(StandardProcessGroup.java:3597)
  at 
org.apache.nifi.groups.StandardProcessGroup.updateFlow(StandardProcessGroup.java:3367)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO.updateProcessGroupFlow(StandardProcessGroupDAO.java:358)
  at 
org.apache.nifi.web.dao.impl.StandardProcessGroupDAO$$FastClassBySpringCGLIB$$10a99b47.invoke()
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
  at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
  at 
org.apache.nifi.audit.ProcessGroupAuditor.updateProcessGroupFlowAdvice(ProcessGroupAuditor.java:282)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
  at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
  at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
  at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  at 

[GitHub] erichanson5 commented on issue #3248: NIFI-3611: Added ability to set Transaction Isolation Level on Database connections for QueryDatabaseTable processor

2019-01-10 Thread GitBox
erichanson5 commented on issue #3248: NIFI-3611: Added ability to set 
Transaction Isolation Level on Database connections for QueryDatabaseTable 
processor
URL: https://github.com/apache/nifi/pull/3248#issuecomment-453261465
 
 
   Thanks @patricker, I'll create another Jira ticket for that and work on it


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] markap14 opened a new pull request #3262: NIFI-5949: Addressed problematic error handling logic in PutKudu. Als…

2019-01-10 Thread GitBox
markap14 opened a new pull request #3262: NIFI-5949: Addressed problematic 
error handling logic in PutKudu. Als…
URL: https://github.com/apache/nifi/pull/3262
 
 
   …o removed AbstractKudu and moved all logic into PutKudu, as the abstract 
class was clearly designed to be extended only by PutKudu and no other 
processors exist for Kudu
   
   Thank you for submitting a contribution to Apache NiFi.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
in the commit message?
   
   - [ ] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
   - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] markap14 commented on issue #3262: NIFI-5949: Addressed problematic error handling logic in PutKudu. Als…

2019-01-10 Thread GitBox
markap14 commented on issue #3262: NIFI-5949: Addressed problematic error 
handling logic in PutKudu. Als…
URL: https://github.com/apache/nifi/pull/3262#issuecomment-453260165
 
 
   @jtstorck any chance you can take a look at this and make sure that I didn't 
break anything? :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Created] (NIFI-5949) PutKudu Error Handling needs to be cleaned up

2019-01-10 Thread Mark Payne (JIRA)
Mark Payne created NIFI-5949:


 Summary: PutKudu Error Handling needs to be cleaned up
 Key: NIFI-5949
 URL: https://issues.apache.org/jira/browse/NIFI-5949
 Project: Apache NiFi
  Issue Type: Bug
Reporter: Mark Payne
Assignee: Mark Payne


Tried to put data to Kudu but entered the wrong table name. Instead of 
notifying me of this, I get a NullPointer when attempting to put the data to 
Kudu.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3698) Create SSH Processor

2019-01-10 Thread Anthony Mastrean (JIRA)


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

Anthony Mastrean commented on NIFI-3698:


I was _just_ beginning to explore using Apache Nifi for network device 
management and this is a major missing feature. Trying to use the 
ExecuteProcessor to run SSH commands is actually extremely difficult. Ditto the 
Groovy "solution" (I don't have the bandwidth to learn Nifi generally and 
Groovy specifically). I see that the [linked 
PR|https://github.com/apache/nifi/pull/2814#issuecomment-402855171] is closed 
and the author indicates that they'll be opening smaller PRs, but I'm not 
seeing linked tickets/PRs or any relevant open branches.

> Create SSH Processor
> 
>
> Key: NIFI-3698
> URL: https://issues.apache.org/jira/browse/NIFI-3698
> Project: Apache NiFi
>  Issue Type: Sub-task
>Reporter: Joseph Petro
>Assignee: Peter Wicks
>Priority: Minor
>
> We need an ssh processor built in for running external commands on remote 
> servers. Currently, groovy offers a way to do this. It should be implemented 
> into NiFi.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] AnthonyMastrean commented on issue #2814: NIFI-539 and NIFI-3698: Add SCP and SSH Processors

2019-01-10 Thread GitBox
AnthonyMastrean commented on issue #2814: NIFI-539 and  NIFI-3698: Add SCP and 
SSH Processors
URL: https://github.com/apache/nifi/pull/2814#issuecomment-453259003
 
 
   @patricker can you show us the new PRs or branches or whatever you have 
open. I'm really interested in this feature!


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #470: MINIFICPP-706 - RawSiteToSite: remove code duplication

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #470: MINIFICPP-706 - 
RawSiteToSite: remove code duplication
URL: https://github.com/apache/nifi-minifi-cpp/pull/470#discussion_r246921467
 
 

 ##
 File path: libminifi/include/sitetosite/RawSocketProtocol.h
 ##
 @@ -143,21 +140,21 @@ class RawSiteToSiteClient : public 
sitetosite::SiteToSiteClient {
   // tearDown
   virtual void tearDown();
   // write Request Type
-  virtual int writeRequestType(RequestType type);
+  virtual int writeRequestType(RequestType type) {
+return SiteToSiteClient::writeRequestType(type);
 
 Review comment:
   I think the code being in SiteToSiteClient is vestigial. It probably 
shouldn't be there. That also would reduce the risk of any testing. Just remove 
it from the base class. The only other implementation ( and others I have in 
mind ) wouldn't need this. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #470: MINIFICPP-706 - RawSiteToSite: remove code duplication

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #470: MINIFICPP-706 - 
RawSiteToSite: remove code duplication
URL: https://github.com/apache/nifi-minifi-cpp/pull/470#discussion_r246921592
 
 

 ##
 File path: libminifi/src/sitetosite/RawSocketProtocol.cpp
 ##
 @@ -394,98 +394,12 @@ bool 
RawSiteToSiteClient::getPeerList(std::vector ) {
 return false;
   }
 }
-
-int RawSiteToSiteClient::writeRequestType(RequestType type) {
 
 Review comment:
   ^ Same as comments above, This can stay and we can remove the duplicate in 
the base. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] patricker edited a comment on issue #3260: NIFI-5790 removed the last test as it's causing a race condition intermittently

2019-01-10 Thread GitBox
patricker edited a comment on issue #3260: NIFI-5790 removed the last test as 
it's causing a race condition intermittently
URL: https://github.com/apache/nifi/pull/3260#issuecomment-453241832
 
 
   @colindean We went ahead and removed the very last test. This still leaves 
in most of the testing of functionality, but removes the time based portion 
where connections invalidate over some time period.
   
   I looked at the base dbcp2 code, and even they just kind of skip testing on 
this part... it's hard to do good testing on timer based events unless you are 
willing to `sleep` a really long time. Don't sweat not being able to assist 
further, no features have been lost.
   
   **Correction**
   We removed the very last Assert, all of the rest of the tests in that test 
case are still intact. 2 lines removed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] patricker commented on issue #3260: NIFI-5790 removed the last test as it's causing a race condition intermittently

2019-01-10 Thread GitBox
patricker commented on issue #3260: NIFI-5790 removed the last test as it's 
causing a race condition intermittently
URL: https://github.com/apache/nifi/pull/3260#issuecomment-453241832
 
 
   @colindean We went ahead and removed the very last test. This still leaves 
in most of the testing of functionality, but removes the time based portion 
where connections invalidate over some time period.
   
   I looked at the base dbcp2 code, and even they just kind of skip testing on 
this part... it's hard to do good testing on timer based events unless you are 
willing to `sleep` a really long time. Don't sweat not being able to assist 
further, no features have been lost.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5945) Add password based login to kerberos utils in nifi-security-utils

2019-01-10 Thread ASF subversion and git services (JIRA)


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

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

Commit 2bbfb3217be40abe4af7ddb8627808d12d99bb17 in nifi's branch 
refs/heads/master from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2bbfb32 ]

NIFI-5945 Add support for password login to kerberos code in nifi-security-utils

Fixing solr test

Signed-off-by: Matthew Burgess 

This closes #3256


> Add password based login to kerberos utils in nifi-security-utils
> -
>
> Key: NIFI-5945
> URL: https://issues.apache.org/jira/browse/NIFI-5945
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> There is some utility code in nifi-commons security utils to do a kerberos 
> login for a principal using a keytab. It would be helpful to also be able to 
> login with a password.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5945) Add password based login to kerberos utils in nifi-security-utils

2019-01-10 Thread Matt Burgess (JIRA)


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

Matt Burgess updated NIFI-5945:
---
   Resolution: Fixed
Fix Version/s: 1.9.0
   Status: Resolved  (was: Patch Available)

> Add password based login to kerberos utils in nifi-security-utils
> -
>
> Key: NIFI-5945
> URL: https://issues.apache.org/jira/browse/NIFI-5945
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Bryan Bende
>Assignee: Bryan Bende
>Priority: Minor
> Fix For: 1.9.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> There is some utility code in nifi-commons security utils to do a kerberos 
> login for a principal using a keytab. It would be helpful to also be able to 
> login with a password.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] asfgit closed pull request #3256: NIFI-5945 Add support for password login to kerberos code in nifi-sec…

2019-01-10 Thread GitBox
asfgit closed pull request #3256: NIFI-5945 Add support for password login to 
kerberos code in nifi-sec…
URL: https://github.com/apache/nifi/pull/3256
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/StandardKeytabUser.java
 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/AbstractKerberosUser.java
similarity index 86%
rename from 
nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/StandardKeytabUser.java
rename to 
nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/AbstractKerberosUser.java
index 7302ee00eb..32eb9bb3d9 100644
--- 
a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/StandardKeytabUser.java
+++ 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/AbstractKerberosUser.java
@@ -23,7 +23,6 @@
 import javax.security.auth.Subject;
 import javax.security.auth.kerberos.KerberosPrincipal;
 import javax.security.auth.kerberos.KerberosTicket;
-import javax.security.auth.login.Configuration;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 import java.security.PrivilegedAction;
@@ -34,14 +33,9 @@
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-/**
- * Used to authenticate and execute actions when Kerberos is enabled and a 
keytab is being used.
- *
- * Some of the functionality in this class is adapted from Hadoop's 
UserGroupInformation.
- */
-public class StandardKeytabUser implements KeytabUser {
+public abstract class AbstractKerberosUser implements KerberosUser {
 
-private static final Logger LOGGER = 
LoggerFactory.getLogger(StandardKeytabUser.class);
+private static final Logger LOGGER = 
LoggerFactory.getLogger(AbstractKerberosUser.class);
 
 static final String DATE_FORMAT = "-MM-dd'T'HH:mm:ss'Z'";
 
@@ -50,18 +44,15 @@
  */
 static final float TICKET_RENEW_WINDOW = 0.80f;
 
-private final String principal;
-private final String keytabFile;
-private final AtomicBoolean loggedIn = new AtomicBoolean(false);
+protected final String principal;
+protected final AtomicBoolean loggedIn = new AtomicBoolean(false);
 
-private Subject subject;
-private LoginContext loginContext;
+protected Subject subject;
+protected LoginContext loginContext;
 
-public StandardKeytabUser(final String principal, final String keytabFile) 
{
+public AbstractKerberosUser(final String principal) {
 this.principal = principal;
-this.keytabFile = keytabFile;
-Validate.notBlank(principal);
-Validate.notBlank(keytabFile);
+Validate.notBlank(this.principal);
 }
 
 /**
@@ -80,19 +71,19 @@ public synchronized void login() throws LoginException {
 if (loginContext == null) {
 LOGGER.debug("Initializing new login context...");
 this.subject = new Subject();
-
-final Configuration config = new 
KeytabConfiguration(principal, keytabFile);
-this.loginContext = new LoginContext("KeytabConf", subject, 
null, config);
+this.loginContext = createLoginContext(subject);
 }
 
 loginContext.login();
 loggedIn.set(true);
 LOGGER.debug("Successful login for {}", new Object[]{principal});
 } catch (LoginException le) {
-throw new LoginException("Unable to login with " + principal + " 
and " + keytabFile + " due to: " + le.getMessage());
+throw new LoginException("Unable to login with " + principal + " 
due to: " + le.getMessage());
 }
 }
 
+protected abstract LoginContext createLoginContext(final Subject subject) 
throws LoginException;
+
 /**
  * Performs a logout of the current user.
  *
@@ -244,14 +235,6 @@ public String getPrincipal() {
 return principal;
 }
 
-/**
- * @return the keytab file for this user
- */
-@Override
-public String getKeytabFile() {
-return keytabFile;
-}
-
 // Visible for testing
 Subject getSubject() {
 return this.subject;
diff --git 
a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/ConfigurationUtil.java
 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/ConfigurationUtil.java
new file mode 100644
index 00..131ff2233a
--- /dev/null
+++ 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/krb/ConfigurationUtil.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. 

[GitHub] mattyb149 commented on issue #3256: NIFI-5945 Add support for password login to kerberos code in nifi-sec…

2019-01-10 Thread GitBox
mattyb149 commented on issue #3256: NIFI-5945 Add support for password login to 
kerberos code in nifi-sec…
URL: https://github.com/apache/nifi/pull/3256#issuecomment-453234815
 
 
   Travis builds failed for other reasons not related to this PR. I ran the 
relevant unit and integration tests, all looks good. Thanks for the 
improvement! This should come in handy in other places such as if we add 
Kerberos support for JDBC drivers :) Merging to master


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] colindean commented on issue #3260: NIFI-5790 removed the last test as it's causing a race condition intermittently

2019-01-10 Thread GitBox
colindean commented on issue #3260: NIFI-5790 removed the last test as it's 
causing a race condition intermittently
URL: https://github.com/apache/nifi/pull/3260#issuecomment-453234007
 
 
   I unfortunately won't have bandwidth to investigate for the foreseeable 
future.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5790) DBCPConnectionPool configuration should expose underlying connection idle and eviction configuration

2019-01-10 Thread ASF subversion and git services (JIRA)


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

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

Commit cf7ab0ce180ecfdeaf1758e896540b58036896b0 in nifi's branch 
refs/heads/master from SavtechSolutions
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=cf7ab0c ]

NIFI-5790 removed the last test as it's causing a race condition intermittently 
(#3260)

Signed-off-by: Peter Wicks 

> DBCPConnectionPool configuration should expose underlying connection idle and 
> eviction configuration
> 
>
> Key: NIFI-5790
> URL: https://issues.apache.org/jira/browse/NIFI-5790
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: 1.8.0
>Reporter: Colin Dean
>Priority: Major
>  Labels: DBCP, database
> Fix For: 1.9.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> While investigating a fix for NIFI-5789, I noticed in the [DBCPConnectionPool 
> documentation|https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.8.0/org.apache.nifi.dbcp.DBCPConnectionPool/index.html]
>  that NiFi appears _not_ to have controller service configuration options 
> associated with [Apache 
> Commons-DBCP|https://commons.apache.org/proper/commons-dbcp/configuration.html]
>  {{BasicDataSource}} parameters like {{minIdle}} and {{maxIdle}}, which I 
> think should be both set to 0 in my particular use case. 
> Alternatively, I think I could set {{maxConnLifetimeMillis}} to something 
> even in the minutes range and satisfy my use case (a connection need not be 
> released _immediately_ but within a reasonable period of time), but this 
> option is also not available.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] patricker closed pull request #3260: NIFI-5790 removed the last test as it's causing a race condition intermittently

2019-01-10 Thread GitBox
patricker closed pull request #3260: NIFI-5790 removed the last test as it's 
causing a race condition intermittently
URL: https://github.com/apache/nifi/pull/3260
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
index 4d32b33675..2714e2e78a 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java
@@ -237,9 +237,6 @@ public void testIdle() throws InitializationException, 
SQLException, Interrupted
 Assert.assertEquals(4, service.getDataSource().getNumIdle());
 Assert.assertEquals(0, service.getDataSource().getNumActive());
 
-Thread.sleep(500);
-Assert.assertEquals(1, service.getDataSource().getNumIdle());
-
 service.getDataSource().close();
 }
 


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-707) Should explore extending TypedValues for other types

2019-01-10 Thread Mr TheSegfault (JIRA)


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

Mr TheSegfault updated MINIFICPP-707:
-
Description: We need to look at how this can and will impact configuration 
of the client. MINIFICPP-710 was created after this but results in some of the 
same overlapping changes. This ticket will contain the discussion of the impact 
of configurations. First need to determine the bounds for the NiFi Validators 
to see what we'll need. 

> Should explore extending TypedValues for other types
> 
>
> Key: MINIFICPP-707
> URL: https://issues.apache.org/jira/browse/MINIFICPP-707
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>
> We need to look at how this can and will impact configuration of the client. 
> MINIFICPP-710 was created after this but results in some of the same 
> overlapping changes. This ticket will contain the discussion of the impact of 
> configurations. First need to determine the bounds for the NiFi Validators to 
> see what we'll need. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] asfgit closed pull request #467: MINIFICPP-703 - UUID generation in C

2019-01-10 Thread GitBox
asfgit closed pull request #467: MINIFICPP-703 - UUID generation in C
URL: https://github.com/apache/nifi-minifi-cpp/pull/467
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nanofi/CMakeLists.txt b/nanofi/CMakeLists.txt
index bd2d952c..34e0942e 100644
--- a/nanofi/CMakeLists.txt
+++ b/nanofi/CMakeLists.txt
@@ -32,7 +32,7 @@ else()
 include_directories(../libminifi/opsys/posix)
 endif()
 
-file(GLOB NANOFI_SOURCES  "src/api/*.cpp" "src/cxx/*.cpp" )
+file(GLOB NANOFI_SOURCES  "src/api/*.cpp" "src/core/*.cpp" "src/cxx/*.cpp")
 
 file(GLOB NANOFI_EXAMPLES_SOURCES  "examples/*.c" )
 
diff --git a/nanofi/include/core/cuuid.h b/nanofi/include/core/cuuid.h
new file mode 100644
index ..d4f6dea8
--- /dev/null
+++ b/nanofi/include/core/cuuid.h
@@ -0,0 +1,34 @@
+/**
+ *
+ * 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 NIFI_MINIFI_CPP_CUUID_H
+#define NIFI_MINIFI_CPP_CUUID_H
+
+#include "uuid/uuid.h"
+
+#define CUUID_TIME_IMPL 0
+#define CUUID_RANDOM_IMPL 1
+#define CUUID_DEFAULT_IMPL 2
+
+typedef struct CIDGenerator {
+  int implementation_;
+} CIDGenerator;
+
+void generate_uuid(const CIDGenerator * generator, char * out);
+
+#endif //NIFI_MINIFI_CPP_CUUID_H
diff --git a/nanofi/src/core/cuuid.cpp b/nanofi/src/core/cuuid.cpp
new file mode 100644
index ..7f3f3723
--- /dev/null
+++ b/nanofi/src/core/cuuid.cpp
@@ -0,0 +1,35 @@
+/**
+ *
+ * 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 "core/cuuid.h"
+
+void generate_uuid(const CIDGenerator * generator, char * out) {
+  UUID_FIELD output;
+  switch (generator->implementation_) {
+case CUUID_RANDOM_IMPL:
+  uuid_generate_random(output);
+  break;
+case CUUID_DEFAULT_IMPL:
+  uuid_generate(output);
+  break;
+default:
+  uuid_generate_time(output);
+  break;
+  }
+  uuid_unparse_lower(output, out);
+}
diff --git a/nanofi/tests/CUUIDTests.cpp b/nanofi/tests/CUUIDTests.cpp
new file mode 100644
index ..3a3ed4bb
--- /dev/null
+++ b/nanofi/tests/CUUIDTests.cpp
@@ -0,0 +1,50 @@
+/**
+ *
+ * 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 "TestBase.h"
+#include "core/cuuid.h"
+
+bool verify_uuid(const char * uuid) {
+  std::string uuid_str(uuid, 36);
+  if(uuid_str.length() != 36) {
+return false;
+  }
+  for(int i = 0; i < uuid_str.length(); ++i) {
+if(i % 5 == 3 && i > 5 && i < 25) {
+  if (uuid_str[i] != '-') {
+return false;
+  }
+} else {
+  

[GitHub] phrocker commented on issue #467: MINIFICPP-703 - UUID generation in C

2019-01-10 Thread GitBox
phrocker commented on issue #467: MINIFICPP-703 - UUID generation in C
URL: https://github.com/apache/nifi-minifi-cpp/pull/467#issuecomment-453203763
 
 
   reviewing


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] asfgit closed pull request #471: MINIFICPP-709: Add timeout

2019-01-10 Thread GitBox
asfgit closed pull request #471: MINIFICPP-709: Add timeout
URL: https://github.com/apache/nifi-minifi-cpp/pull/471
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/libminifi/src/RemoteProcessorGroupPort.cpp 
b/libminifi/src/RemoteProcessorGroupPort.cpp
index cbc0412f..54329f8b 100644
--- a/libminifi/src/RemoteProcessorGroupPort.cpp
+++ b/libminifi/src/RemoteProcessorGroupPort.cpp
@@ -292,6 +292,9 @@ std::pair 
RemoteProcessorGroupPort::refreshRemoteSite2SiteInfo
   }
   client = 
std::unique_ptr(dynamic_cast(client_ptr));
   client->initialize("GET", loginUrl.str(), ssl_service);
+  // use a connection timeout. if this times out we will simply attempt 
re-connection
+  // so no need for configuration parameter that isn't already defined in 
Processor
+  client->setConnectionTimeout(10);
 
   token = utils::get_token(client.get(), this->rest_user_name_, 
this->rest_password_);
   logger_->log_debug("Token from NiFi REST Api endpoint %s,  %s", 
loginUrl.str(), token);
@@ -307,6 +310,9 @@ std::pair 
RemoteProcessorGroupPort::refreshRemoteSite2SiteInfo
 int siteTosite_port_ = -1;
 client = 
std::unique_ptr(dynamic_cast(client_ptr));
 client->initialize("GET", fullUrl.str().c_str(), ssl_service);
+// use a connection timeout. if this times out we will simply attempt 
re-connection
+// so no need for configuration parameter that isn't already defined in 
Processor
+client->setConnectionTimeout(10);
 if (!proxy_.host.empty()) {
   client->setHTTPProxy(proxy_);
 }


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-709) RPG should use connection timeout

2019-01-10 Thread Aldrin Piri (JIRA)


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

Aldrin Piri resolved MINIFICPP-709.
---
   Resolution: Fixed
Fix Version/s: 0.6.0

> RPG should use connection timeout
> -
>
> Key: MINIFICPP-709
> URL: https://issues.apache.org/jira/browse/MINIFICPP-709
> Project: NiFi MiNiFi C++
>  Issue Type: Bug
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
> Fix For: 0.6.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Because a connection timeout is not set, we will block startup in perpetuity



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso edited comment on NIFI-5948 at 1/10/19 6:17 PM:


Thanks for the message!
Yes I'm using the LDAP provider to list users and the file-based provider to 
define groups.
The reason for this configuration is that we want the IT department to give 
determine which users will have access to Nifi and then we want to define 
groups inside Nifi to determine which user will have access to which features.
I've uploaded my current configuration files in the JIRA (authorizers.xml, 
login-identity-providers.xml and nifi.properties)


was (Author: jpconver):
Thanks for the message!
Yes I'm using the LDAP provider to list users and the file-based provider to 
define groups.
The reason of this configuration is that we want the IT department to give 
access or not to Nifi and then we want to define groups inside Nifi to 
determine which user will have access to which features.
I've uploaded my current configuration files in the JIRA (authorizers.xml, 
login-identity-providers.xml and nifi.properties)

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso edited comment on NIFI-5948 at 1/10/19 6:17 PM:


Thanks for the message!
Yes I'm using the LDAP provider to list users and the file-based provider to 
define groups.
The reason for this configuration is that we want the IT department to 
determine which users will have access to Nifi and then we want to define 
groups inside Nifi to determine which user will have access to which features.
I've uploaded my current configuration files in the JIRA (authorizers.xml, 
login-identity-providers.xml and nifi.properties)


was (Author: jpconver):
Thanks for the message!
Yes I'm using the LDAP provider to list users and the file-based provider to 
define groups.
The reason for this configuration is that we want the IT department to give 
determine which users will have access to Nifi and then we want to define 
groups inside Nifi to determine which user will have access to which features.
I've uploaded my current configuration files in the JIRA (authorizers.xml, 
login-identity-providers.xml and nifi.properties)

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso commented on NIFI-5948:
---

Thanks for the message!
Yes I'm using the LDAP provider to list users and the file-based provider to 
define groups.
The reason of this configuration is that we want the IT department to give 
access or not to Nifi and then we want to define groups inside Nifi to 
determine which user will have access to which features.
I've uploaded my current configuration files in the JIRA (authorizers.xml, 
login-identity-providers.xml and nifi.properties)

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso updated NIFI-5948:
--
Attachment: nifi.properties
login-identity-providers.xml
authorizers.xml

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: authorizers.xml, error.png, 
> login-identity-providers.xml, nifi.properties
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Matt Gilman (JIRA)


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

Matt Gilman commented on NIFI-5948:
---

[~jpconver] Thanks for filing the JIRA. Can you please provide some more 
details on your configuration? You mentioned both the LDAP provider and the 
file-based provider. Are you loading users from LDAP, but creating groups 
within the file-based provider?

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: error.png
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso updated NIFI-5948:
--
Description: 
I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
created groups and associated some LDAP users to the groups.

This worked fine until a user was deleted in LDAP, when this happened when I 
tried to list users using the "burgerMenu -> Users" option the error: "Unable 
to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.

The only way to fix this problem was to delete the association of the user to 
the group in the file: users.xml.

I think that when a user is deleted from LDAP and Nifi refreshes the user list 
it should check also for deleted users in order to remove them from user/groups 
associations as well to prevent this problem.

I've provided in this report a screenshot of the error.

  was:
I configured Nifi to use LDAP to provide users. Then in Nifi using the UI I 
created groups and associate LDAP users to groups.

This works fine until a user is deleted in LDAP, when this happens if I try to 
list users using the "burgerMenu -> Users" option the error: "Unable to find 
user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." is displayed.

The only way to fix this problem is to delete the association of the user to 
the group in the file: users.xml.

I think that when a user is deleted from LDAP and Nifi refreshes the user list 
it should check also for deleted users in order to remove them from user/groups 
associations as well to prevent this problem.

I've provided in this report a screenshot of the error.



> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: error.png
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso updated NIFI-5948:
--
Priority: Major  (was: Blocker)

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: error.png
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso updated NIFI-5948:
--
Priority: Blocker  (was: Major)

> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Blocker
> Attachments: error.png
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi, using the UI, I 
> created groups and associated some LDAP users to the groups.
> This worked fine until a user was deleted in LDAP, when this happened when I 
> tried to list users using the "burgerMenu -> Users" option the error: "Unable 
> to find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." was displayed.
> The only way to fix this problem was to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246858533
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Almost all of these are invalid and shouldn't be accepted, though. This was 
the point of https://issues.apache.org/jira/browse/MINIFICPP-707. I don't want 
to trounce on this PR, but the reason I created the ticket was that some of 
these SHOULD be prevented from being used at all in configs, fail early. 
Therefore it's not as simple as doing what is done here. 710 should be OBE in 
favor of 707. There needs to be more thought put into this, this was the 
primary reason I created the ticket versus implementing. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246858533
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Almost all of these are invalid and shouldn't be accepted, though. This was 
the point of https://issues.apache.org/jira/browse/MINIFICPP-707. I don't want 
to trounce on this PR, but the reason I created the ticket was that some of 
these SHOULD be prevented from being used at all in configs, fail early. 
Therefore it's not as simple as doing what is done here. 710 should be OBE in 
favor of 707. There needs to be more thought put into this. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors 
in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246858533
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Almost all of these are invalid and shouldn't be accepted, though. This was 
the point of https://issues.apache.org/jira/browse/MINIFICPP-707. I don't want 
to trounce on this PR, but the reason I created the ticket was that some of 
these SHOULD be prevented from being used at all in configs, fail early. 
Therefore it's not as simple as doing what is done here. 710 should be OBE in 
favor of 707. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)


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

Juan Pablo Converso updated NIFI-5948:
--
Description: 
I configured Nifi to use LDAP to provide users. Then in Nifi using the UI I 
created groups and associate LDAP users to groups.

This works fine until a user is deleted in LDAP, when this happens if I try to 
list users using the "burgerMenu -> Users" option the error: "Unable to find 
user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." is displayed.

The only way to fix this problem is to delete the association of the user to 
the group in the file: users.xml.

I think that when a user is deleted from LDAP and Nifi refreshes the user list 
it should check also for deleted users in order to remove them from user/groups 
associations as well to prevent this problem.

I've provided in this report a screenshot of the error.


  was:
I configured Nifi to use LDAP to provide users. Then in Nifi using the UI I 
created groups and associate LDAP users to groups.

This works fine until a user is deleted in LDAP, when this happens if I try to 
list users using the "burgerMenu -> Users" option the error: "Unable to find 
user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." is displayed.

The only way to fix this problem is to delete the association of the user to 
the group in the file: users.xml.

I think that when a user is deleted from LDAP and Nifi refresh the user list it 
should check also for deleted users to remove them from user/groups 
associations as well to prevent this problem.

I've provided in this report a screenshot of the error



> Cannot list users when a ldap user that belongs to a group is deleted
> -
>
> Key: NIFI-5948
> URL: https://issues.apache.org/jira/browse/NIFI-5948
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core UI
>Affects Versions: 1.8.0
>Reporter: Juan Pablo Converso
>Priority: Major
> Attachments: error.png
>
>
> I configured Nifi to use LDAP to provide users. Then in Nifi using the UI I 
> created groups and associate LDAP users to groups.
> This works fine until a user is deleted in LDAP, when this happens if I try 
> to list users using the "burgerMenu -> Users" option the error: "Unable to 
> find user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." is displayed.
> The only way to fix this problem is to delete the association of the user to 
> the group in the file: users.xml.
> I think that when a user is deleted from LDAP and Nifi refreshes the user 
> list it should check also for deleted users in order to remove them from 
> user/groups associations as well to prevent this problem.
> I've provided in this report a screenshot of the error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (NIFI-5948) Cannot list users when a ldap user that belongs to a group is deleted

2019-01-10 Thread Juan Pablo Converso (JIRA)
Juan Pablo Converso created NIFI-5948:
-

 Summary: Cannot list users when a ldap user that belongs to a 
group is deleted
 Key: NIFI-5948
 URL: https://issues.apache.org/jira/browse/NIFI-5948
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core UI
Affects Versions: 1.8.0
Reporter: Juan Pablo Converso
 Attachments: error.png

I configured Nifi to use LDAP to provide users. Then in Nifi using the UI I 
created groups and associate LDAP users to groups.

This works fine until a user is deleted in LDAP, when this happens if I try to 
list users using the "burgerMenu -> Users" option the error: "Unable to find 
user with id 'ae1523b4-1336-3a1c-8283-0a784f5cb017'." is displayed.

The only way to fix this problem is to delete the association of the user to 
the group in the file: users.xml.

I think that when a user is deleted from LDAP and Nifi refresh the user list it 
should check also for deleted users to remove them from user/groups 
associations as well to prevent this problem.

I've provided in this report a screenshot of the error




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] MAliNaqvi commented on issue #144: NIFIREG-209 Rebuild metadata DB from FlowPersistenceProvider when emp…

2019-01-10 Thread GitBox
MAliNaqvi commented on issue #144: NIFIREG-209 Rebuild metadata DB from 
FlowPersistenceProvider when emp…
URL: https://github.com/apache/nifi-registry/pull/144#issuecomment-453185968
 
 
   @bbende Thanks, I was able to use the REST endpoint to compute the diff.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] arpadboda commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
arpadboda commented on a change in pull request #472: MINIFICPP-710 - Fix 
errors in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246847908
 
 

 ##
 File path: libminifi/src/c2/protocols/RESTProtocol.cpp
 ##
 @@ -129,7 +129,7 @@ const C2Payload RESTProtocol::parseJsonResponse(const 
C2Payload , const
   } catch (...) {
   }
 #endif
-  return std::move(C2Payload(payload.getOperation(), 
state::UpdateState::READ_COMPLETE, true));
 
 Review comment:
   These generated copy-elision warnings in clang, so removed. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] arpadboda commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
arpadboda commented on a change in pull request #472: MINIFICPP-710 - Fix 
errors in Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246847713
 
 

 ##
 File path: libminifi/test/unit/PropertyTests.cpp
 ##
 @@ -107,3 +107,28 @@ TEST_CASE("Test Trimmer Left", "[testTrims]") {
   REQUIRE(test.c_str()[1] == ' ');
 }
 
+TEST_CASE("Test int conversion", "[testStringToInt]") {
 
 Review comment:
   Most of these would fail without this change.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] arpadboda opened a new pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion

2019-01-10 Thread GitBox
arpadboda opened a new pull request #472: MINIFICPP-710 - Fix errors in 
Property StringToInt conversion
URL: https://github.com/apache/nifi-minifi-cpp/pull/472
 
 
   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 MINIFICPP- 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.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Created] (MINIFICPP-710) Fix errors in Property StringToInt conversion

2019-01-10 Thread Arpad Boda (JIRA)
Arpad Boda created MINIFICPP-710:


 Summary: Fix errors in Property StringToInt conversion
 Key: MINIFICPP-710
 URL: https://issues.apache.org/jira/browse/MINIFICPP-710
 Project: NiFi MiNiFi C++
  Issue Type: Bug
Reporter: Arpad Boda
Assignee: Arpad Boda


Property StringToInt conversion has some defects:

-signed/unsigned assignment without checking limits

-overflows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (MINIFICPP-709) RPG should use connection timeout

2019-01-10 Thread Mr TheSegfault (JIRA)
Mr TheSegfault created MINIFICPP-709:


 Summary: RPG should use connection timeout
 Key: MINIFICPP-709
 URL: https://issues.apache.org/jira/browse/MINIFICPP-709
 Project: NiFi MiNiFi C++
  Issue Type: Bug
Reporter: Mr TheSegfault
Assignee: Mr TheSegfault


Because a connection timeout is not set, we will block startup in perpetuity



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] phrocker opened a new pull request #471: MINIFICPP-709: Add timeout

2019-01-10 Thread GitBox
phrocker opened a new pull request #471: MINIFICPP-709: Add timeout
URL: https://github.com/apache/nifi-minifi-cpp/pull/471
 
 
   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 MINIFICPP- 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.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (NIFI-5869) JMS Connection Fails After JMS servers Change behind JNDI

2019-01-10 Thread Ed Berezitsky (JIRA)


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

Ed Berezitsky updated NIFI-5869:

Fix Version/s: (was: 1.8.0)
   Attachment: 3261.patch.txt
   Status: Patch Available  (was: In Progress)

> JMS Connection Fails After JMS servers Change behind JNDI
> -
>
> Key: NIFI-5869
> URL: https://issues.apache.org/jira/browse/NIFI-5869
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.8.0
>Reporter: Ed Berezitsky
>Assignee: Ed Berezitsky
>Priority: Major
> Attachments: 3261.patch.txt, JNDI_JMS_Exception.txt
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> JMS Connection Fails After JMS servers Change behind JNDI.
> Reproduce:
>  # Define and enable JNDI Controller Service
>  # Create a flow with ConsumeJMS or PublishJMS processors with controller 
> service defined in #1.
>  # Consume and publish at least one message to ensure the connectivity can be 
> established.
>  # Change JNDI configuration for the same connection factory to point to new 
> JMS servers.
>  # Stop JMS service on previous servers
>  # Observe failure in ConsumeJMS/PublishJMS (Caused by: 
> javax.jms.JMSException: Failed to connect to any server at: 
> tcp://jms_server1:12345)
>  
> Work Around:
>  # Disable JNDI Controller Service
>  # Enable JNDI Controller Service and dependent processors.
>  
> Possible Issue/Fix:
>  * AbstractJMSProcessor has a method "buildTargetResource", in which 
> connection factory is instantiated and then cached in workerPool in onTrigger 
> .
>  * Issue: Once cached, it will be reused forever.
>  * Fix: on connectivity failure there should be an attempt to rebuild the 
> worker. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] bdesert opened a new pull request #3261: NIFI-5869 Support Reconnection for JMS

2019-01-10 Thread GitBox
bdesert opened a new pull request #3261: NIFI-5869 Support Reconnection for JMS
URL: https://github.com/apache/nifi/pull/3261
 
 
   Resets worker if it doesn't work anymore for any reason. this will add 
"reconnect" capabilities. Will solve issues for following use cases:
   - authentication changed after successful connection
   - JNDI mapping changed and requires recaching.
   - JMS server isn't available anymore or restarted.
   ---
   Thank you for submitting a contribution to Apache NiFi.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
in the commit message?
   
   - [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
   - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Created] (NIFI-5947) Elasticsearch lookup service that can work with LookupAttribute

2019-01-10 Thread Alex Savitsky (JIRA)
Alex Savitsky created NIFI-5947:
---

 Summary: Elasticsearch lookup service that can work with 
LookupAttribute
 Key: NIFI-5947
 URL: https://issues.apache.org/jira/browse/NIFI-5947
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Extensions
Affects Versions: 1.8.0
Reporter: Alex Savitsky


Create an Elasticsearch-backed lookup service that can be used in a 
LookupAttribute processor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] patricker commented on issue #3248: NIFI-3611: Added ability to set Transaction Isolation Level on Database connections for QueryDatabaseTable processor

2019-01-10 Thread GitBox
patricker commented on issue #3248: NIFI-3611: Added ability to set Transaction 
Isolation Level on Database connections for QueryDatabaseTable processor
URL: https://github.com/apache/nifi/pull/3248#issuecomment-453160029
 
 
   This sounds like a good general feature for a few SQL processors, like 
ExecuteSQL, maybe GenerateTableFetch.
   
   I'm OK with limiting the scope to QDB for now, but what about putting the 
allowed values and property definition in `AbstractDatabaseFetchProcessor` so 
it's ready for use in other processors?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (NIFI-5944) When NiFi restarts, if a component is expected to be running but is invalid, it never starts, even if becoming valid later

2019-01-10 Thread Matt Gilman (JIRA)


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

Matt Gilman updated NIFI-5944:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> When NiFi restarts, if a component is expected to be running but is invalid, 
> it never starts, even if becoming valid later
> --
>
> Key: NIFI-5944
> URL: https://issues.apache.org/jira/browse/NIFI-5944
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> When NiFi starts up, if a component is expected to be running, NiFi will 
> attempt to start the component. However, if the component is invalid for any 
> reason, instead of starting the component, it throws an Exception and gives 
> up. Instead, it should wait until the component becomes valid and then begin 
> scheduling (or enabling, in the case of a controller service) the component. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] erichanson5 commented on issue #3248: NIFI-3611: Added ability to set Transaction Isolation Level on Database connections for QueryDatabaseTable processor

2019-01-10 Thread GitBox
erichanson5 commented on issue #3248: NIFI-3611: Added ability to set 
Transaction Isolation Level on Database connections for QueryDatabaseTable 
processor
URL: https://github.com/apache/nifi/pull/3248#issuecomment-453155820
 
 
   @ijokarumawak thanks for the assistance.  I updated the branch


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] mcgilman commented on issue #3259: NIFI-5944: When components are started on NiFi startup, if they are i…

2019-01-10 Thread GitBox
mcgilman commented on issue #3259: NIFI-5944: When components are started on 
NiFi startup, if they are i…
URL: https://github.com/apache/nifi/pull/3259#issuecomment-453155662
 
 
   Thanks @markap14! Verified behavior with local cluster. Code looks good. 
Merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5944) When NiFi restarts, if a component is expected to be running but is invalid, it never starts, even if becoming valid later

2019-01-10 Thread ASF subversion and git services (JIRA)


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

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

Commit 706cf7dcff1eddaf86e6dd7496734ec637d31810 in nifi's branch 
refs/heads/master from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=706cf7d ]

NIFI-5944: When components are started on NiFi startup, if they are invalid, 
don't fail immediately and give up. Instead, keep attempting to start the 
component when it becomes valid.

This closes #3259


> When NiFi restarts, if a component is expected to be running but is invalid, 
> it never starts, even if becoming valid later
> --
>
> Key: NIFI-5944
> URL: https://issues.apache.org/jira/browse/NIFI-5944
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Major
> Fix For: 1.9.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When NiFi starts up, if a component is expected to be running, NiFi will 
> attempt to start the component. However, if the component is invalid for any 
> reason, instead of starting the component, it throws an Exception and gives 
> up. Instead, it should wait until the component becomes valid and then begin 
> scheduling (or enabling, in the case of a controller service) the component. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] asfgit closed pull request #3259: NIFI-5944: When components are started on NiFi startup, if they are i…

2019-01-10 Thread GitBox
asfgit closed pull request #3259: NIFI-5944: When components are started on 
NiFi startup, if they are i…
URL: https://github.com/apache/nifi/pull/3259
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
index f3ae41fc1e..e17682eeed 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
@@ -373,9 +373,8 @@ public String toString() {
 }
 
 @Override
-public final void performValidation() {
-boolean replaced = false;
-do {
+public final ValidationStatus performValidation() {
+while (true) {
 final ValidationState validationState = getValidationState();
 
 final ValidationContext validationContext = getValidationContext();
@@ -391,8 +390,11 @@ public final void performValidation() {
 
 final ValidationStatus status = results.isEmpty() ? 
ValidationStatus.VALID : ValidationStatus.INVALID;
 final ValidationState updatedState = new ValidationState(status, 
results);
-replaced = replaceValidationState(validationState, updatedState);
-} while (!replaced);
+final boolean replaced = replaceValidationState(validationState, 
updatedState);
+if (replaced) {
+return status;
+}
+}
 }
 
 protected Collection computeValidationErrors(final 
ValidationContext validationContext) {
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ComponentNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ComponentNode.java
index d0ed572515..2357d41cd0 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ComponentNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ComponentNode.java
@@ -179,7 +179,7 @@ public default void setProperties(Map 
properties) {
 /**
  * Asynchronously begins the validation process
  */
-public abstract void performValidation();
+public abstract ValidationStatus performValidation();
 
 /**
  * Returns a {@link List} of all {@link PropertyDescriptor}s that this
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ProcessorNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ProcessorNode.java
index 6e8206eb71..12eeb88f23 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ProcessorNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/ProcessorNode.java
@@ -17,6 +17,7 @@
 package org.apache.nifi.controller;
 
 import org.apache.nifi.annotation.behavior.InputRequirement.Requirement;
+import org.apache.nifi.components.validation.ValidationStatus;
 import org.apache.nifi.components.validation.ValidationTrigger;
 import org.apache.nifi.connectable.Connectable;
 import org.apache.nifi.controller.scheduling.LifecycleState;
@@ -144,7 +145,13 @@ public ProcessorNode(final String id,
 public ScheduledState getScheduledState() {
 ScheduledState sc = this.scheduledState.get();
 if (sc == ScheduledState.STARTING) {
-return ScheduledState.RUNNING;
+final ValidationStatus validationStatus = getValidationStatus();
+
+if (validationStatus == ValidationStatus.INVALID) {
+return ScheduledState.STOPPED;
+} else {
+return ScheduledState.RUNNING;
+}
 } else if (sc == ScheduledState.STOPPING) {
 return ScheduledState.STOPPED;
 }
@@ -240,4 +247,12 @@ public abstract void start(ScheduledExecutorService 
scheduler, long administrati
  * will result in the WARN message if processor can not be enabled.
  */
 public abstract void disable();
+
+/**
+ * Returns the 

[GitHub] bbende commented on issue #3256: NIFI-5945 Add support for password login to kerberos code in nifi-sec…

2019-01-10 Thread GitBox
bbende commented on issue #3256: NIFI-5945 Add support for password login to 
kerberos code in nifi-sec…
URL: https://github.com/apache/nifi/pull/3256#issuecomment-453152151
 
 
   @mattyb149 good catch, pushed up a commit to fix


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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-5941) LogMessage routes to nonexistent failure when log level is below logback allowed

2019-01-10 Thread Michael Moser (JIRA)


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

Michael Moser commented on NIFI-5941:
-

You're correct [~coffeethulhu], it's not a good user experience to require a 
logback.xml change in order to log DEBUG or TRACE level messages from this 
processor.  I would recommend in this case that we change the default 
[logback.xml|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/logback.xml#L89]
 to allow TRACE level messages from both LogMessage and LogAttribute.

> LogMessage routes to nonexistent failure when log level is below logback 
> allowed
> 
>
> Key: NIFI-5941
> URL: https://issues.apache.org/jira/browse/NIFI-5941
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.7.0, 1.8.0, 1.7.1
>Reporter: Matthew Dinep
>Priority: Major
>
> When using the LogMessage processor, if a message is configured to log at a 
> level that is below what is set in logback.xml (for example logging at "info" 
> when the default log level is "warn"), the message doesn't get logged and an 
> error is thrown because the flowfile is unable to be routed to failure (the 
> only available route on the processor is Success). Since this is a user 
> configurable log level for a specific case, the level for the message should 
> be able to override the global log level in logback.xml so as to avoid this 
> behavior.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] mattyb149 commented on issue #3256: NIFI-5945 Add support for password login to kerberos code in nifi-sec…

2019-01-10 Thread GitBox
mattyb149 commented on issue #3256: NIFI-5945 Add support for password login to 
kerberos code in nifi-sec…
URL: https://github.com/apache/nifi/pull/3256#issuecomment-453143186
 
 
   Getting a Solr unit test error now:
   
   ```[ERROR] Tests run: 18, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
6.414 s <<< FAILURE! - in 
org.apache.nifi.processors.solr.TestPutSolrContentStream
   [ERROR] 
testBasicAuthAndKerberosNotAllowedTogether(org.apache.nifi.processors.solr.TestPutSolrContentStream)
  Time elapsed: 0.246 s  <<< FAILURE!
   java.lang.AssertionError: expected: but was:
at 
org.apache.nifi.processors.solr.TestPutSolrContentStream.testBasicAuthAndKerberosNotAllowedTogether(TestPutSolrContentStream.java:457)
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] joewitt commented on issue #2743: NIFI-5226: Implement a Record API based PutInfluxDB processor

2019-01-10 Thread GitBox
joewitt commented on issue #2743: NIFI-5226: Implement a Record API based 
PutInfluxDB processor
URL: https://github.com/apache/nifi/pull/2743#issuecomment-453142531
 
 
   @zisisp the challenge with integrations like this is having people familiar 
with the source/target system which in this case is InfluxDB and who also have 
commit privileges to conduct a review.  As we bring things into the system 
we're taking on license/notice/dependency/code management burden and for things 
which we dont have an easy path to test with it can be tough.  To me, this is a 
perfect example of an integration which is best held/supported/promoted by the 
vendor and the NiFi community could then link to it but not include it in our 
apache distro.  I'm just sharing a personal thought - this isn't a community 
statement.  But am being honest about what makes these tough - even though this 
seems super useful.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] mcgilman commented on issue #3259: NIFI-5944: When components are started on NiFi startup, if they are i…

2019-01-10 Thread GitBox
mcgilman commented on issue #3259: NIFI-5944: When components are started on 
NiFi startup, if they are i…
URL: https://github.com/apache/nifi/pull/3259#issuecomment-453136706
 
 
   Will review...


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] cemeyer2 commented on issue #3253: NIFI-5938: Added ability to infer record schema on read from JsonTree…

2019-01-10 Thread GitBox
cemeyer2 commented on issue #3253: NIFI-5938: Added ability to infer record 
schema on read from JsonTree…
URL: https://github.com/apache/nifi/pull/3253#issuecomment-453135878
 
 
   Hi @markap14 
   
   I have a use case that this might cover and wanted to get feedback to see if 
this PR would helpI have a flow where i have flowfiles that contain 
arbitrary json (no fixed schema) as their contents and i need to add a field to 
each json object that has a value that is computed as a function of fields from 
the variable registry and attributes on the incoming flowfile. Right now that 
is being done with a custom processor, but ideally it would be great to use 
only bundled components. Thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


  1   2   >