[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1532: MINIFICPP-2076 Implement logging metrics publisher

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1532:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1532#discussion_r1159264648


##
docker/test/integration/features/core_functionality.feature:
##
@@ -67,3 +67,9 @@ Feature: Core flow functionalities
 When all instances start up
 Then the peak memory usage of the agent is more than 130 MB in less than 
20 seconds
 And the memory usage of the agent decreases to 70% peak usage in less than 
20 seconds
+
+  Scenario: Metrics can be logged
+Given a GenerateFlowFile processor
+And log metrics publisher is enabled in MiNiFi
+When all instances start up
+Then the Minifi logs contain the following message: 
'{"LogMetrics":{"RepositoryMetrics":{"flowfile":{"running":"true","full":"false","size":"0"},"provenance":{"running":"true","full":"false","size":"0"'
 in less than 30 seconds

Review Comment:
   I meant logging something like an English-like format instead of dumping 
JSON. 
   e.g. `RepositoryMetrics: flowfile: running, size=0; content: running, 
size=0; provenance: not running`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1532: MINIFICPP-2076 Implement logging metrics publisher

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1532:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1532#discussion_r1159264648


##
docker/test/integration/features/core_functionality.feature:
##
@@ -67,3 +67,9 @@ Feature: Core flow functionalities
 When all instances start up
 Then the peak memory usage of the agent is more than 130 MB in less than 
20 seconds
 And the memory usage of the agent decreases to 70% peak usage in less than 
20 seconds
+
+  Scenario: Metrics can be logged
+Given a GenerateFlowFile processor
+And log metrics publisher is enabled in MiNiFi
+When all instances start up
+Then the Minifi logs contain the following message: 
'{"LogMetrics":{"RepositoryMetrics":{"flowfile":{"running":"true","full":"false","size":"0"},"provenance":{"running":"true","full":"false","size":"0"'
 in less than 30 seconds

Review Comment:
   I meant logging something like an English sentence instead of dumping JSON.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (NIFI-5642) QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread ASF subversion and git services (Jira)


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

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

Commit 4f22f0985a58f6e8a36edea9f6c907f758945357 in nifi's branch 
refs/heads/support/nifi-1.x from aglotero
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4f22f0985a ]

NIFI-5642: QueryCassandra processor : output FlowFiles as soon fetch_size is 
reached
NIFI-5642: QueryCassandra processor : output FlowFiles as soon fetch_size is 
reached
Fixed checkstyle error
Delete build.sh
Delete local build file
NIFI-5642 : letting fetch_size to control the Cassandra data flow creating a 
new MAX_ROWS_PER_FLOW_FILE parameter
Fixed checkstyle error: no more import java.util.*
Fixed missing imports
NIFI-5642: added REL_ORIGINAL relationship in order to allow incremental commit
Addressing comments from code review
Adjustments on timestamp datatype formatting
Created the OUTPUT_BATCH_SIZE property
Code review adjustments
NIFI-5642: update after rebase
NIFI-5642: addressing PR comments
NIFI-5642: adding in integration test, fixing race condition
NIFI-5642: remove log4j2

This closes #6848

Signed-off-by: Mike Thomsen 


> QueryCassandra processor : output FlowFiles as soon fetch_size is reached
> -
>
> Key: NIFI-5642
> URL: https://issues.apache.org/jira/browse/NIFI-5642
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.7.1
>Reporter: André Gomes Lamas Otero
>Assignee: Levi Lentz
>Priority: Major
> Fix For: 1.latest, 2.latest
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> When I'm using QueryCassandra alongside with fetch_size parameter I expected 
> that as soon my reader reaches the fetch_size the processor outputs some data 
> to be processed by the next processor, but QueryCassandra reads all the data, 
> then output the flow files.
> I'll start to work on a patch for this situation, I'll appreciate any 
> suggestion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-11390) Renaming versioned process group is not detected as a change

2023-04-05 Thread Nandor Soma Abonyi (Jira)
Nandor Soma Abonyi created NIFI-11390:
-

 Summary: Renaming versioned process group is not detected as a 
change
 Key: NIFI-11390
 URL: https://issues.apache.org/jira/browse/NIFI-11390
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core Framework, NiFi Registry
Affects Versions: 1.21.0
Reporter: Nandor Soma Abonyi


Renaming a versioned process group is not detected as a change. If we modify 
something in the process group, for example, we move a processor, there will be 
one “Position changed” local change. However, if we commit after that, the name 
of the process group will also be changed.

There are two options that I can think of:
 * Treat renaming as a separate local change so it is possible to commit it 
alone.
 * Treat the name of the PG local, but don’t update the name “silently” when 
there are other changes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-11387) Support Configurable Transport Type for Azure Event Hub Components

2023-04-05 Thread David Handermann (Jira)


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

David Handermann updated NIFI-11387:

Fix Version/s: 1.latest
   2.latest
   Status: Patch Available  (was: Open)

> Support Configurable Transport Type for Azure Event Hub Components
> --
>
> Key: NIFI-11387
> URL: https://issues.apache.org/jira/browse/NIFI-11387
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: David Handermann
>Assignee: David Handermann
>Priority: Minor
> Fix For: 1.latest, 2.latest
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Azure Event Hubs supports connectivity using AMQP or AMQP over HTTPS 
> WebSockets as described in the [Azure Event Hubs 
> FAQ|https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-faq#what-ports-do-i-need-to-open-on-the-firewall].
> The Azure Event Hubs SDK for Java supports a configurable Transport Type for 
> Event Hubs Clients, with standard AMQP as the default setting.
> Introducing a new property to configure the Transport Type would provide the 
> same level of flexibility for NiFi Processors, and would also open the 
> possibility of introducing support for HTTP proxies as a separate effort.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] exceptionfactory opened a new pull request, #7126: NIFI-11387 Add Transport Type property to Azure Event Hub Components

2023-04-05 Thread via GitHub


exceptionfactory opened a new pull request, #7126:
URL: https://github.com/apache/nifi/pull/7126

   # Summary
   
   [NIFI-11387](https://issues.apache.org/jira/browse/NIFI-11387) Adds a new 
`Transport Type` property to the following Azure Event Hubs components:
   
   - ConsumeAzureEventHub
   - GetAzureEventHub
   - PutAzureEventHub
   - AzureEventHubRecordSink
   
   The new property is required and sets a default value of `AMQP` to align 
with current behavior. The property also allows selection of [AMQP with 
WebSockets](https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-faq#what-ports-do-i-need-to-open-on-the-firewall),
 which supports alternative communication over HTTPS with WebSockets.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-0`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-0`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [X] Build completed using `mvn clean install -P contrib-check`
 - [X] JDK 11
 - [ ] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (NIFI-5642) QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread ASF subversion and git services (Jira)


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

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

Commit d80a19e2308ce630b079b440c7f8452363ee9939 in nifi's branch 
refs/heads/main from aglotero
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d80a19e230 ]

NIFI-5642: QueryCassandra processor : output FlowFiles as soon fetch_size is 
reached
NIFI-5642: QueryCassandra processor : output FlowFiles as soon fetch_size is 
reached
Fixed checkstyle error
Delete build.sh
Delete local build file
NIFI-5642 : letting fetch_size to control the Cassandra data flow creating a 
new MAX_ROWS_PER_FLOW_FILE parameter
Fixed checkstyle error: no more import java.util.*
Fixed missing imports
NIFI-5642: added REL_ORIGINAL relationship in order to allow incremental commit
Addressing comments from code review
Adjustments on timestamp datatype formatting
Created the OUTPUT_BATCH_SIZE property
Code review adjustments
NIFI-5642: update after rebase
NIFI-5642: addressing PR comments
NIFI-5642: adding in integration test, fixing race condition
NIFI-5642: remove log4j2

This closes #6848

Signed-off-by: Mike Thomsen 


> QueryCassandra processor : output FlowFiles as soon fetch_size is reached
> -
>
> Key: NIFI-5642
> URL: https://issues.apache.org/jira/browse/NIFI-5642
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.7.1
>Reporter: André Gomes Lamas Otero
>Assignee: Levi Lentz
>Priority: Major
> Fix For: 1.latest, 2.latest
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> When I'm using QueryCassandra alongside with fetch_size parameter I expected 
> that as soon my reader reaches the fetch_size the processor outputs some data 
> to be processed by the next processor, but QueryCassandra reads all the data, 
> then output the flow files.
> I'll start to work on a patch for this situation, I'll appreciate any 
> suggestion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] asfgit closed pull request #6848: NIFI-5642 QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread via GitHub


asfgit closed pull request #6848: NIFI-5642 QueryCassandra processor : output 
FlowFiles as soon fetch_size is reached
URL: https://github.com/apache/nifi/pull/6848


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (NIFI-5642) QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread Mike Thomsen (Jira)


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

Mike Thomsen resolved NIFI-5642.

  Assignee: Levi Lentz
Resolution: Fixed

> QueryCassandra processor : output FlowFiles as soon fetch_size is reached
> -
>
> Key: NIFI-5642
> URL: https://issues.apache.org/jira/browse/NIFI-5642
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.7.1
>Reporter: André Gomes Lamas Otero
>Assignee: Levi Lentz
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> When I'm using QueryCassandra alongside with fetch_size parameter I expected 
> that as soon my reader reaches the fetch_size the processor outputs some data 
> to be processed by the next processor, but QueryCassandra reads all the data, 
> then output the flow files.
> I'll start to work on a patch for this situation, I'll appreciate any 
> suggestion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-5642) QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread Mike Thomsen (Jira)


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

Mike Thomsen updated NIFI-5642:
---
Fix Version/s: 1.latest
   2.latest

> QueryCassandra processor : output FlowFiles as soon fetch_size is reached
> -
>
> Key: NIFI-5642
> URL: https://issues.apache.org/jira/browse/NIFI-5642
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.7.1
>Reporter: André Gomes Lamas Otero
>Assignee: Levi Lentz
>Priority: Major
> Fix For: 1.latest, 2.latest
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> When I'm using QueryCassandra alongside with fetch_size parameter I expected 
> that as soon my reader reaches the fetch_size the processor outputs some data 
> to be processed by the next processor, but QueryCassandra reads all the data, 
> then output the flow files.
> I'll start to work on a patch for this situation, I'll appreciate any 
> suggestion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] MikeThomsen commented on a diff in pull request #6848: NIFI-5642 QueryCassandra processor : output FlowFiles as soon fetch_size is reached

2023-04-05 Thread via GitHub


MikeThomsen commented on code in PR #6848:
URL: https://github.com/apache/nifi/pull/6848#discussion_r1153850188


##
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/QueryCassandra.java:
##
@@ -217,60 +243,90 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
 final String selectQuery = 
context.getProperty(CQL_SELECT_QUERY).evaluateAttributeExpressions(fileToProcess).getValue();
 final long queryTimeout = 
context.getProperty(QUERY_TIMEOUT).evaluateAttributeExpressions(fileToProcess).asTimePeriod(TimeUnit.MILLISECONDS);
 final String outputFormat = 
context.getProperty(OUTPUT_FORMAT).getValue();
+final long maxRowsPerFlowFile = 
context.getProperty(MAX_ROWS_PER_FLOW_FILE).evaluateAttributeExpressions().asInteger();
+final long outputBatchSize = 
context.getProperty(OUTPUT_BATCH_SIZE).evaluateAttributeExpressions().asInteger();
 final Charset charset = 
Charset.forName(context.getProperty(CHARSET).evaluateAttributeExpressions(fileToProcess).getValue());
 final StopWatch stopWatch = new StopWatch(true);
 
-if (fileToProcess == null) {
-fileToProcess = session.create();
-}
-
 try {
 // The documentation for the driver recommends the session remain 
open the entire time the processor is running
 // and states that it is thread-safe. This is why 
connectionSession is not in a try-with-resources.
 final Session connectionSession = cassandraSession.get();
-final ResultSetFuture queryFuture = 
connectionSession.executeAsync(selectQuery);
+final ResultSet resultSet;
+
+if (queryTimeout > 0) {
+resultSet = connectionSession.execute(selectQuery, 
queryTimeout, TimeUnit.MILLISECONDS);
+}else{
+resultSet = connectionSession.execute(selectQuery);
+}
 final AtomicLong nrOfRows = new AtomicLong(0L);
 
-fileToProcess = session.write(fileToProcess, new 
OutputStreamCallback() {
-@Override
-public void process(final OutputStream rawOut) throws 
IOException {
-try (final OutputStream out = new 
BufferedOutputStream(rawOut)) {
-logger.debug("Executing CQL query {}", new 
Object[]{selectQuery});
-final ResultSet resultSet;
-if (queryTimeout > 0) {
-resultSet = 
queryFuture.getUninterruptibly(queryTimeout, TimeUnit.MILLISECONDS);
-if (AVRO_FORMAT.equals(outputFormat)) {
-nrOfRows.set(convertToAvroStream(resultSet, 
out, queryTimeout, TimeUnit.MILLISECONDS));
-} else if (JSON_FORMAT.equals(outputFormat)) {
-
nrOfRows.set(convertToJsonStream(Optional.of(context), resultSet, out, charset, 
queryTimeout, TimeUnit.MILLISECONDS));
-}
-} else {
-resultSet = queryFuture.getUninterruptibly();
-if (AVRO_FORMAT.equals(outputFormat)) {
-nrOfRows.set(convertToAvroStream(resultSet, 
out, 0, null));
-} else if (JSON_FORMAT.equals(outputFormat)) {
-
nrOfRows.set(convertToJsonStream(Optional.of(context), resultSet, out, charset, 
0, null));
+long flowFileCount = 0;
+
+if(fileToProcess == null) {
+fileToProcess = session.create();
+}
+
+while(true) {
+
+fileToProcess = session.write(fileToProcess, new 
OutputStreamCallback() {
+@Override
+public void process(final OutputStream out) throws 
IOException {
+try {
+logger.debug("Executing CQL query {}", new 
Object[]{selectQuery});
+if (queryTimeout > 0) {
+if (AVRO_FORMAT.equals(outputFormat)) {
+
nrOfRows.set(convertToAvroStream(resultSet, maxRowsPerFlowFile,
+out, queryTimeout, 
TimeUnit.MILLISECONDS));
+} else if (JSON_FORMAT.equals(outputFormat)) {
+
nrOfRows.set(convertToJsonStream(resultSet, maxRowsPerFlowFile,
+out, charset, queryTimeout, 
TimeUnit.MILLISECONDS));
+}
+} else {
+if (AVRO_FORMAT.equals(outputFormat)) {
+
nrOfRows.set(convertToAvroStream(resultSet, maxRowsPerFlowFile,
+out, 

[GitHub] [nifi] bejancsaba commented on a diff in pull request #7125: NIFI-11366 Proxy aware C2 communication

2023-04-05 Thread via GitHub


bejancsaba commented on code in PR #7125:
URL: https://github.com/apache/nifi/pull/7125#discussion_r1158870015


##
c2/c2-client-bundle/c2-client-api/src/main/java/org/apache/nifi/c2/client/api/C2Client.java:
##
@@ -57,4 +57,14 @@ public interface C2Client {
  * @return optional error message if any issues occurred
  */
 Optional uploadBundle(String callbackUrl, byte[] bundle);
+
+/**
+ * Creates a callback URL according to proxy aware C2 settings
+ *
+ * @param absoluteUrl absolute url sent by C2 server
+ * @param relativeUrl relative url sent by C2 server
+ * @return finalised callback url
+ * @throws Exception when the callback url can not be created as per the 
current configuration and parameters
+ */
+String getCallbackUrl(String absoluteUrl, String relativeUrl) throws 
Exception;

Review Comment:
   Would it be possible to retrun optional similarly to the other functions 
here (this way not requiring exception to be thrown) or there are downstream 
constraints why this approach wouldn't fit?



##
c2/c2-client-bundle/c2-client-http/src/main/java/org/apache/nifi/c2/client/http/url/C2UrlProvider.java:
##
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.c2.client.http.url;
+
+public interface C2UrlProvider {
+
+String getHeartbeatUrl();

Review Comment:
   Could you please add short Javadoc for the functions in the interface?



##
c2/c2-client-bundle/c2-client-http/src/main/java/org/apache/nifi/c2/client/http/url/C2UrlProviderFactory.java:
##
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.c2.client.http.url;
+
+import static org.apache.commons.lang3.StringUtils.isNoneBlank;
+
+import org.apache.nifi.c2.client.C2ClientConfig;
+
+public class C2UrlProviderFactory {
+
+private final C2ClientConfig clientConfig;
+
+public C2UrlProviderFactory(C2ClientConfig clientConfig) {
+this.clientConfig = clientConfig;
+}
+
+public C2UrlProvider create() {
+if (isNoneBlank(clientConfig.getC2RestApi(), 
clientConfig.getC2RestPathHeartbeat(), 
clientConfig.getC2RestPathAcknowledge())) {
+return new ProxyAwareC2UrlProvider(clientConfig.getC2RestApi(), 
clientConfig.getC2RestPathHeartbeat(), clientConfig.getC2RestPathAcknowledge());
+} else if (isNoneBlank(clientConfig.getC2Url(), 
clientConfig.getC2AckUrl())) {
+return new LegacyC2UrlProvider(clientConfig.getC2Url(), 
clientConfig.getC2AckUrl());
+} else {
+throw new IllegalArgumentException("Incorrect configuration. 
Please configure legacy or proxy aware C2 URL properties");

Review Comment:
   I think it would make sense to provide a little more information here I 
don't think all users would understand what legacy / proxy aware C2 URL 
properties means. Listing explicitly all the properties for legacy and for 
proxy aware would be a big help I suppose. What do you think?



##
minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/conf/bootstrap.conf:
##
@@ -134,8 +134,13 @@ java.arg.14=-Djava.awt.headless=true
 # Enabling C2 Uncomment each of the following options
 #c2.enable=true
 ## define protocol parameters
+# legacy properties
 #c2.rest.url=
 #c2.rest.url.ack=
+# new c2 properties
+#c2.rest.api=

Review Comment:
   Naming 

[GitHub] [nifi] mtien-apache commented on pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

2023-04-05 Thread via GitHub


mtien-apache commented on PR #7117:
URL: https://github.com/apache/nifi/pull/7117#issuecomment-1498006364

   Thanks for reviewing, @exceptionfactory! I fixed the syntax errors and 
addressed your comments. Would you look again? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

2023-04-05 Thread via GitHub


mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1158927643


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##
@@ -2001,6 +2021,43 @@
 propertyData.setItems([]);
 };
 
+/**
+ * Gets all the referenced parameters from the {parameterContext} based on 
the value of {parameterReference} with matching {sensitive} property
+ *
+ * @param {string} parameterReference
+ * @param {ParameterContextEntity} parameterContext
+ * @param {boolean} sensitive
+ * @returns {ParameterEntity[]}
+ */
+var getExistingParametersReferenced = function (parameterReference, 
parameterContext, sensitive) {
+var parameters = _.get(parameterContext.component, 'parameters', []);
+var existingParametersReferenced = [];
+
+if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+// can't use from common/constants because we are modifying the 
lastIndex below
+var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   @exceptionfactory It's not necessary to define a separate capturing group 
for `'`. I updated this block of code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (NIFI-11389) Controller Services's link to referencing Controller Services components not always working

2023-04-05 Thread Nissim Shiman (Jira)
Nissim Shiman created NIFI-11389:


 Summary: Controller Services's link to referencing Controller 
Services components not always working
 Key: NIFI-11389
 URL: https://issues.apache.org/jira/browse/NIFI-11389
 Project: Apache NiFi
  Issue Type: Bug
Reporter: Nissim Shiman


Controller Services' Setting tab has a _Referencing Components_ section on the 
right side.

There are hyperlinks to the Processors and/or Controller Services which 
reference this controller service.  These links do not always work when 
referencing controller services.

To reproduce:

Create StandardRestrictedSSLContextService on top level nifi graph (i.e. right 
click top level grid -> Configure -> Controller Services)

Create Process Group
Inside Process Group create DistributedMapCacheServer
and point _SSL Context Service_ to StandardRestrictedSSLContextService just 
created

Go to StandardRestrictedSSLContextService's Setting's tab and verify 
DistributedMapCacheServer appears in the _Referencing Components_ section.

Clicking on the link to DistributedMapCacheServer will not take us to that 
controller service.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (NIFI-11230) Log Warnings on Startup for OS Best Practices

2023-04-05 Thread Emilio Setiadarma (Jira)


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

Emilio Setiadarma reassigned NIFI-11230:


Assignee: Emilio Setiadarma

> Log Warnings on Startup for OS Best Practices
> -
>
> Key: NIFI-11230
> URL: https://issues.apache.org/jira/browse/NIFI-11230
> Project: Apache NiFi
>  Issue Type: New Feature
>Reporter: David Handermann
>Assignee: Emilio Setiadarma
>Priority: Minor
>
> The Administrator's Guide outlines several [best 
> practices|https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#configuration-best-practices]
>  for optimal configuration of the Linux operating system to run NiFi.
> Not following these best practices can lead to confusing errors at runtime, 
> such when NiFi does not have enough file handles or enough TCP sockets.
> Adding evaluation of these properties on startup and logging warnings for 
> less-than-optimal settings would help avoid some runtime troubleshooting 
> challenges.
> The initial implementation should cover the Linux platform, be should be 
> designed using interfaces to gather the platform information, which would 
> support extending similar checks to macOS.
> The implementation should check and warn for the following settings:
> # Maximum File Handles
> # Maximum Forked Processes
> # Maximum local TCP socket ports
> # Maximum TCP socket time wait interval
> # Swappiness enabled



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] briansolo1985 opened a new pull request, #7125: NIFI-11366 Proxy aware C2 communication

2023-04-05 Thread via GitHub


briansolo1985 opened a new pull request, #7125:
URL: https://github.com/apache/nifi/pull/7125

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-11366](https://issues.apache.org/jira/browse/NIFI-11366)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-0`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-0`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [] Build completed using `mvn clean install -P contrib-check`
 - [] JDK 11
 - [ ] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Nissim Shiman (Jira)


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

Nissim Shiman commented on NIFI-11388:
--

Thank you [~joewitt] and [~pvillard] for your responses.

I noticed this when testing the current 1.21.0 RC2, but the queue did always 
stop after a moment ot two anyway so the basic idea of queues having 
backpressure is certainly working.

Thank you for letting me know the current way it is working is by design.  This 
works for me.
Thank You! 

> Backpressure queue settings loosely followed
> 
>
> Key: NIFI-11388
> URL: https://issues.apache.org/jira/browse/NIFI-11388
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Nissim Shiman
>Priority: Major
>
> The backpressure settings on connections between processors are only loosely 
> followed.  More flowfiles can end up on queues than configured via 
> backpressure setting.
> For example, set up flow:
> GenerateFlowFile -> UpdateAttribute -> (some processor)
> where 
> GenerateFlowFile has _Custom Text_ set to be _hello_
> and Run Schedule is set to be _0 min_
> and 
> the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
> set to be _100_
> Start GenerateFlowFile.
> Wait a few moments until outgoing connection fills up.
> Start UpdateAttribute
> OutGoing conection will have more than 100 flowfiles on it
> (I had over 1000 on mine when running these steps) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Pierre Villard (Jira)


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

Pierre Villard edited comment on NIFI-11388 at 4/5/23 5:40 PM:
---

I believe it would also highly depend on how your "(some processor)" is working.

-I don't believe you can have the same observation just with a flow like GFF -> 
UpdateAttribute -> UpdateAttribute -> UpdateAttribute.-


was (Author: pvillard):
I believe it would also highly depend on how your "(some processor)" is working.

I don't believe you can have the same observation just with a flow like GFF -> 
UpdateAttribute -> UpdateAttribute -> UpdateAttribute.

> Backpressure queue settings loosely followed
> 
>
> Key: NIFI-11388
> URL: https://issues.apache.org/jira/browse/NIFI-11388
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Nissim Shiman
>Priority: Major
>
> The backpressure settings on connections between processors are only loosely 
> followed.  More flowfiles can end up on queues than configured via 
> backpressure setting.
> For example, set up flow:
> GenerateFlowFile -> UpdateAttribute -> (some processor)
> where 
> GenerateFlowFile has _Custom Text_ set to be _hello_
> and Run Schedule is set to be _0 min_
> and 
> the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
> set to be _100_
> Start GenerateFlowFile.
> Wait a few moments until outgoing connection fills up.
> Start UpdateAttribute
> OutGoing conection will have more than 100 flowfiles on it
> (I had over 1000 on mine when running these steps) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Joe Witt (Jira)


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

Joe Witt commented on NIFI-11388:
-

Any processor could exceed the limit by basically any amount.  It is not a hard 
cap.  It purely is used to restrict giving threads to the processor in most 
cases before it could even be scheduled.  Or, it is also available to 
processors to check during their processing if they should do more.  The 
fundamentals are there but we deliberately did not *force* the hard limit but 
doing things such as failing a session if it would result in exceeding the back 
pressure value. 

> Backpressure queue settings loosely followed
> 
>
> Key: NIFI-11388
> URL: https://issues.apache.org/jira/browse/NIFI-11388
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Nissim Shiman
>Priority: Major
>
> The backpressure settings on connections between processors are only loosely 
> followed.  More flowfiles can end up on queues than configured via 
> backpressure setting.
> For example, set up flow:
> GenerateFlowFile -> UpdateAttribute -> (some processor)
> where 
> GenerateFlowFile has _Custom Text_ set to be _hello_
> and Run Schedule is set to be _0 min_
> and 
> the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
> set to be _100_
> Start GenerateFlowFile.
> Wait a few moments until outgoing connection fills up.
> Start UpdateAttribute
> OutGoing conection will have more than 100 flowfiles on it
> (I had over 1000 on mine when running these steps) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Pierre Villard (Jira)


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

Pierre Villard commented on NIFI-11388:
---

I believe it would also highly depend on how your "(some processor)" is working.

I don't believe you can have the same observation just with a flow like GFF -> 
UpdateAttribute -> UpdateAttribute -> UpdateAttribute.

> Backpressure queue settings loosely followed
> 
>
> Key: NIFI-11388
> URL: https://issues.apache.org/jira/browse/NIFI-11388
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Nissim Shiman
>Priority: Major
>
> The backpressure settings on connections between processors are only loosely 
> followed.  More flowfiles can end up on queues than configured via 
> backpressure setting.
> For example, set up flow:
> GenerateFlowFile -> UpdateAttribute -> (some processor)
> where 
> GenerateFlowFile has _Custom Text_ set to be _hello_
> and Run Schedule is set to be _0 min_
> and 
> the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
> set to be _100_
> Start GenerateFlowFile.
> Wait a few moments until outgoing connection fills up.
> Start UpdateAttribute
> OutGoing conection will have more than 100 flowfiles on it
> (I had over 1000 on mine when running these steps) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Joe Witt (Jira)


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

Joe Witt commented on NIFI-11388:
-

Hello

This is true and by design.  It was never meant as a hard limit.  The core 
reason is that we use this to prevent a processor from being scheduled if any 
possible destination is already full by default but we dont want to prevent it 
from completing its work once given threads/having a session.

I am pretty sure our documentation also speaks about this.



> Backpressure queue settings loosely followed
> 
>
> Key: NIFI-11388
> URL: https://issues.apache.org/jira/browse/NIFI-11388
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Nissim Shiman
>Priority: Major
>
> The backpressure settings on connections between processors are only loosely 
> followed.  More flowfiles can end up on queues than configured via 
> backpressure setting.
> For example, set up flow:
> GenerateFlowFile -> UpdateAttribute -> (some processor)
> where 
> GenerateFlowFile has _Custom Text_ set to be _hello_
> and Run Schedule is set to be _0 min_
> and 
> the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
> set to be _100_
> Start GenerateFlowFile.
> Wait a few moments until outgoing connection fills up.
> Start UpdateAttribute
> OutGoing conection will have more than 100 flowfiles on it
> (I had over 1000 on mine when running these steps) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-11388) Backpressure queue settings loosely followed

2023-04-05 Thread Nissim Shiman (Jira)
Nissim Shiman created NIFI-11388:


 Summary: Backpressure queue settings loosely followed
 Key: NIFI-11388
 URL: https://issues.apache.org/jira/browse/NIFI-11388
 Project: Apache NiFi
  Issue Type: Improvement
Reporter: Nissim Shiman


The backpressure settings on connections between processors are only loosely 
followed.  More flowfiles can end up on queues than configured via backpressure 
setting.

For example, set up flow:
GenerateFlowFile -> UpdateAttribute -> (some processor)
where 
GenerateFlowFile has _Custom Text_ set to be _hello_
and Run Schedule is set to be _0 min_
and 
the connection following UpdateAttribute has _Back Pressure Object Threshold_ 
set to be _100_

Start GenerateFlowFile.
Wait a few moments until outgoing connection fills up.
Start UpdateAttribute
OutGoing conection will have more than 100 flowfiles on it
(I had over 1000 on mine when running these steps) 




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-11387) Support Configurable Transport Type for Azure Event Hub Components

2023-04-05 Thread David Handermann (Jira)
David Handermann created NIFI-11387:
---

 Summary: Support Configurable Transport Type for Azure Event Hub 
Components
 Key: NIFI-11387
 URL: https://issues.apache.org/jira/browse/NIFI-11387
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Extensions
Reporter: David Handermann
Assignee: David Handermann


Azure Event Hubs supports connectivity using AMQP or AMQP over HTTPS WebSockets 
as described in the [Azure Event Hubs 
FAQ|https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-faq#what-ports-do-i-need-to-open-on-the-firewall].

The Azure Event Hubs SDK for Java supports a configurable Transport Type for 
Event Hubs Clients, with standard AMQP as the default setting.

Introducing a new property to configure the Transport Type would provide the 
same level of flexibility for NiFi Processors, and would also open the 
possibility of introducing support for HTTP proxies as a separate effort.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi-minifi-cpp] fgerlits commented on a diff in pull request #1549: MINIFICPP-2093 Update default features/extensions

2023-04-05 Thread via GitHub


fgerlits commented on code in PR #1549:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1549#discussion_r1158723619


##
.github/workflows/ci.yml:
##


Review Comment:
   It came up recently in another PR that SFTP is not enabled in the 
`ubuntu_20_04_clang` job.  Everything that can be enabled should be enabled in 
that job, because otherwise the `clang-tidy` job will fail if a file in a 
disabled extension has been modified. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (NIFI-11342) HDFS processors fail to get ClassloaderIsolationKey at startup

2023-04-05 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on NIFI-11342:


Commit 79097835a6df718bf4b6756963e4eececd7b5694 in nifi's branch 
refs/heads/support/nifi-1.x from Mark Bathori
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=79097835a6 ]

NIFI-11342: HDFS processors fail to get ClassloaderIsolationKey at startup

This closes #7121.

Signed-off-by: Peter Turcsanyi 


> HDFS processors fail to get ClassloaderIsolationKey at startup
> --
>
> Key: NIFI-11342
> URL: https://issues.apache.org/jira/browse/NIFI-11342
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Mark Bathori
>Assignee: Mark Bathori
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> At the start of NiFi, the HDFS processors fail to get ClassloaderIsolationKey 
> when only KerberosUserService is provided. The processor tries the get the 
> isolation key by calling the createKerberosUser method on the service but it 
> fails because at the time of method call the controller service is in 
> Disabled state.
> https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java#L224
>  Error message:
> {code:java}
> Failed to determine ClassLoader Isolation Key for 
> PutHDFS[id=192e8080-0187-1000-ee4f-a7100d9d7dbb]. This could result in 
> unexpected behavior by this processor.: 
> org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot 
> invoke method public abstract org.apache.nifi.security.krb.KerberosUser 
> org.apache.nifi.kerberos.KerberosUserService.createKerberosUser() on 
> Controller Service with identifier 0e84e32e-0187-1000-5e37-8cd7279916f6 
> because the Controller Service's State is currently DISABLED{code}
> The problem only occurs after NiFi restart. Adding a new HDFS processor to 
> the canvas and setting the Kerberos UserService can properly get the 
> isolation key.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (NIFI-11342) HDFS processors fail to get ClassloaderIsolationKey at startup

2023-04-05 Thread Peter Turcsanyi (Jira)


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

Peter Turcsanyi resolved NIFI-11342.

Fix Version/s: 2.0.0
   1.22.0
   Resolution: Fixed

> HDFS processors fail to get ClassloaderIsolationKey at startup
> --
>
> Key: NIFI-11342
> URL: https://issues.apache.org/jira/browse/NIFI-11342
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Mark Bathori
>Assignee: Mark Bathori
>Priority: Major
> Fix For: 2.0.0, 1.22.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> At the start of NiFi, the HDFS processors fail to get ClassloaderIsolationKey 
> when only KerberosUserService is provided. The processor tries the get the 
> isolation key by calling the createKerberosUser method on the service but it 
> fails because at the time of method call the controller service is in 
> Disabled state.
> https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java#L224
>  Error message:
> {code:java}
> Failed to determine ClassLoader Isolation Key for 
> PutHDFS[id=192e8080-0187-1000-ee4f-a7100d9d7dbb]. This could result in 
> unexpected behavior by this processor.: 
> org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot 
> invoke method public abstract org.apache.nifi.security.krb.KerberosUser 
> org.apache.nifi.kerberos.KerberosUserService.createKerberosUser() on 
> Controller Service with identifier 0e84e32e-0187-1000-5e37-8cd7279916f6 
> because the Controller Service's State is currently DISABLED{code}
> The problem only occurs after NiFi restart. Adding a new HDFS processor to 
> the canvas and setting the Kerberos UserService can properly get the 
> isolation key.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-11342) HDFS processors fail to get ClassloaderIsolationKey at startup

2023-04-05 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on NIFI-11342:


Commit d15eeb445bf38905166dc50a012dcd2787f62646 in nifi's branch 
refs/heads/main from Mark Bathori
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d15eeb445b ]

NIFI-11342: HDFS processors fail to get ClassloaderIsolationKey at startup

This closes #7121.

Signed-off-by: Peter Turcsanyi 


> HDFS processors fail to get ClassloaderIsolationKey at startup
> --
>
> Key: NIFI-11342
> URL: https://issues.apache.org/jira/browse/NIFI-11342
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Mark Bathori
>Assignee: Mark Bathori
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> At the start of NiFi, the HDFS processors fail to get ClassloaderIsolationKey 
> when only KerberosUserService is provided. The processor tries the get the 
> isolation key by calling the createKerberosUser method on the service but it 
> fails because at the time of method call the controller service is in 
> Disabled state.
> https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java#L224
>  Error message:
> {code:java}
> Failed to determine ClassLoader Isolation Key for 
> PutHDFS[id=192e8080-0187-1000-ee4f-a7100d9d7dbb]. This could result in 
> unexpected behavior by this processor.: 
> org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot 
> invoke method public abstract org.apache.nifi.security.krb.KerberosUser 
> org.apache.nifi.kerberos.KerberosUserService.createKerberosUser() on 
> Controller Service with identifier 0e84e32e-0187-1000-5e37-8cd7279916f6 
> because the Controller Service's State is currently DISABLED{code}
> The problem only occurs after NiFi restart. Adding a new HDFS processor to 
> the canvas and setting the Kerberos UserService can properly get the 
> isolation key.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] asfgit closed pull request #7121: NIFI-11342: HDFS processors fail to get ClassloaderIsolationKey at startup

2023-04-05 Thread via GitHub


asfgit closed pull request #7121: NIFI-11342: HDFS processors fail to get 
ClassloaderIsolationKey at startup
URL: https://github.com/apache/nifi/pull/7121


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (NIFI-11386) Add "resource" and "audience" support for StandardOauth2AccessTokenProvider

2023-04-05 Thread Tamas Palfy (Jira)
Tamas Palfy created NIFI-11386:
--

 Summary: Add "resource" and "audience" support for 
StandardOauth2AccessTokenProvider
 Key: NIFI-11386
 URL: https://issues.apache.org/jira/browse/NIFI-11386
 Project: Apache NiFi
  Issue Type: Improvement
Reporter: Tamas Palfy
Assignee: Tamas Palfy






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi-minifi-cpp] szaszm opened a new pull request, #1549: MINIFICPP-2093 Update default features/extensions

2023-04-05 Thread via GitHub


szaszm opened a new pull request, #1549:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1549

   ...and disable kubernetes on windows, to avoid a cmake error
   ---
   
   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:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
   
   - [x] Does your PR title start with MINIFICPP- 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 main)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] 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)?
   - [x] If applicable, have you updated the LICENSE file?
   - [x] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [x] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI 
results 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 to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (MINIFICPP-2093) Update default features/extensions

2023-04-05 Thread Marton Szasz (Jira)
Marton Szasz created MINIFICPP-2093:
---

 Summary: Update default features/extensions
 Key: MINIFICPP-2093
 URL: https://issues.apache.org/jira/browse/MINIFICPP-2093
 Project: Apache NiFi MiNiFi C++
  Issue Type: Improvement
Reporter: Marton Szasz


...and disable kubernetes on windows, to avoid a cmake error



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-11385) Expose JMX metrics from NiFi JVM

2023-04-05 Thread Timea Barna (Jira)


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

Timea Barna updated NIFI-11385:
---
Status: Patch Available  (was: In Progress)

> Expose JMX metrics from NiFi JVM
> 
>
> Key: NIFI-11385
> URL: https://issues.apache.org/jira/browse/NIFI-11385
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Timea Barna
>Assignee: Timea Barna
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Most of the NiFi processors use external libraries which may register JMX 
> Beans like Kafka processors. Exposing such metrics can help with problem 
> solving.
> The information available depends on the registered Beans and usually related 
> to performance indicators such as request/response rate, latency, request 
> size, request counts or tool specific ones like commit rate or sync/join time 
> for Kafka. 
> Goals
> Have an REST endpoint with a list of JMX Bean attributes.
> Expose data in a secure way.
> Have some kind of filtering.
> Non-Goals
> Listing or executing supported operations of JMX Beans.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] timeabarna commented on pull request #7124: NIFI-11385 Expose JMX metrics from NiFi JVM

2023-04-05 Thread via GitHub


timeabarna commented on PR #7124:
URL: https://github.com/apache/nifi/pull/7124#issuecomment-1497427717

   Hello @exceptionfactory,
   
   Can you please review this PR?
   
   Thanks in advance for your help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi] timeabarna opened a new pull request, #7124: NIFI-11385 Expose JMX metrics from NiFi JVM

2023-04-05 Thread via GitHub


timeabarna opened a new pull request, #7124:
URL: https://github.com/apache/nifi/pull/7124

   # Summary
   Most of the NiFi processors use external libraries which may register JMX 
Beans like Kafka processors. Exposing such metrics can help with problem 
solving.
   
   The information available depends on the registered Beans and usually 
related to performance indicators such as request/response rate, latency, 
request size, request counts or tool specific ones like commit rate or 
sync/join time for Kafka.
   
   Goals
   Have an REST endpoint with a list of JMX Bean attributes.
   Expose data in a secure way.
   Have some kind of filtering.
   
   Non-Goals
   Listing or executing supported operations of JMX Beans.
   
   [NIFI-11385](https://issues.apache.org/jira/browse/NIFI-11385)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-0`
   - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-0`
   
   ### Pull Request Formatting
   
   - [ ] Pull Request based on current revision of the `main` branch
   - [ ] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 11
 - [ ] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1543: MINIFICPP-2074 Fix time-period/integer validated properties during lo…

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1158428649


##
libminifi/include/utils/StringUtils.h:
##
@@ -88,7 +87,15 @@ class StringUtils {
*/
   static std::optional toBool(const std::string& input);
 
-  static std::string toLower(std::string_view str);
+  static inline std::string toLower(std::string_view str) {
+const auto tolower = [](auto c) { return std::tolower(static_cast(c)); };
+return str | ranges::views::transform(tolower) | ranges::to();
+  }
+
+  static inline std::string toUpper(std::string_view str)  {
+const auto toupper = [](auto c) { return std::toupper(static_cast(c)); };
+return str | ranges::views::transform(toupper) | ranges::to();
+  }

Review Comment:
   The dumber version of taking a `std::string` by value, and doing in-place 
transform would be more efficient, because it allows NRVO, and better 
optimization
   demonstration: https://godbolt.org/z/q5qWqGbnx
   above version: 3 allocations, 1 copy
   std::string version: 1 allocation (of the passed-in string)
   
   We need 1 allocation either way, to construct the result, but by taking a 
std::string by value, we push this responsibility to the caller, who may be 
able to avoid it by reusing an existing std::string object. If the string is 
moved in from an existing object, the resulting assembly is basically 
equivalent to passing in a pointer to the string, and doing an in-place 
transform, with no extra allocation, but the interface keeps the 
value-semantics, and falls back to copy when necessary.
   
   ```suggestion
 static inline std::string toLower(std::string str) {
   const auto tolower = [](auto c) { return 
std::tolower(static_cast(c)); };
   std::transform(std::begin(str), std::end(str), std::begin(str), tolower);
   return str;
 }
   
 static inline std::string toUpper(std::string str)  {
   const auto toupper = [](auto c) { return 
std::toupper(static_cast(c)); };
   std::transform(std::begin(str), std::end(str), std::begin(str), toupper);
   return str;
 }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1543: MINIFICPP-2074 Fix time-period/integer validated properties during lo…

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1158385546


##
extensions/standard-processors/tests/unit/ConfigurationTests.cpp:
##
@@ -53,4 +54,130 @@ TEST_CASE("Configuration can validate values to be assigned 
to specific properti
   REQUIRE(Configuration::validatePropertyValue("random.property", 
"random_value"));
 }
 
+TEST_CASE("Configuration can fix misconfigured timeperiod<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "nifi.c2.agent.heartbeat.period=1min" << std::endl;
+properties_file << "nifi.administrative.yield.duration=3" << std::endl;
+properties_file.close();
+  }

Review Comment:
   ```suggestion
 std::ofstream{properties_path}
 << "nifi.c2.agent.heartbeat.period=1min\n"
 << "nifi.administrative.yield.duration=3\n";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1543: MINIFICPP-2074 Fix time-period/integer validated properties during lo…

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1158383457


##
extensions/standard-processors/tests/unit/ConfigurationTests.cpp:
##
@@ -53,4 +54,130 @@ TEST_CASE("Configuration can validate values to be assigned 
to specific properti
   REQUIRE(Configuration::validatePropertyValue("random.property", 
"random_value"));
 }
 
+TEST_CASE("Configuration can fix misconfigured timeperiod<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "nifi.c2.agent.heartbeat.period=1min" << std::endl;
+properties_file << "nifi.administrative.yield.duration=3" << std::endl;
+properties_file.close();
+  }
+  auto properties_file_time_after_creation = 
std::filesystem::last_write_time(properties_path);
+  const std::shared_ptr configure = 
std::make_shared();
+
+  configure->loadConfigureFile(properties_path);
+  CHECK(configure->get("nifi.c2.agent.heartbeat.period") == "6");
+  CHECK(configure->get("nifi.administrative.yield.duration") == "3 ms");
+
+  {
+CHECK(properties_file_time_after_creation == 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+std::string second_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(std::getline(properties_file, second_line));
+CHECK(first_line == "nifi.c2.agent.heartbeat.period=1min");
+CHECK(second_line == "nifi.administrative.yield.duration=3");
+  }
+
+  CHECK(configure->commitChanges());
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+std::string second_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(std::getline(properties_file, second_line));
+CHECK(first_line == "nifi.c2.agent.heartbeat.period=6");
+CHECK(second_line == "nifi.administrative.yield.duration=3 ms");
+  }
+}
+
+TEST_CASE("Configuration can fix misconfigured datasize<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "appender.rolling.max_file_size=6000" << std::endl;
+properties_file.close();
+  }
+  auto properties_file_time_after_creation = 
std::filesystem::last_write_time(properties_path);
+  const std::shared_ptr configure = 
std::make_shared();
+
+  configure->loadConfigureFile(properties_path, "nifi.log.");
+  CHECK(configure->get("appender.rolling.max_file_size") == "6000 B");
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(first_line == "appender.rolling.max_file_size=6000");
+  }
+
+  CHECK(configure->commitChanges());
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(first_line == "appender.rolling.max_file_size=6000 B");
+  }
+}
+
+
+TEST_CASE("Configuration can fix misconfigured validated properties within 
environmental variables") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  CHECK(minifi::utils::Environment::setEnvironmentVariable("SOME_VARIABLE", 
"4000"));
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "compression.cached.log.max.size=${SOME_VARIABLE}" << 
std::endl;
+properties_file << "compression.compressed.log.max.size=3000" << std::endl;
+properties_file.close();
+  }

Review Comment:
   `std::endl` flushes the stream. I think it's not necessary, but certainly 
not twice.
   ```suggestion
 std::ofstream{properties_path}
 << "compression.cached.log.max.size=${SOME_VARIABLE}\n"
 << "compression.compressed.log.max.size=3000\n";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1543: MINIFICPP-2074 Fix time-period/integer validated properties during lo…

2023-04-05 Thread via GitHub


szaszm commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1158383457


##
extensions/standard-processors/tests/unit/ConfigurationTests.cpp:
##
@@ -53,4 +54,130 @@ TEST_CASE("Configuration can validate values to be assigned 
to specific properti
   REQUIRE(Configuration::validatePropertyValue("random.property", 
"random_value"));
 }
 
+TEST_CASE("Configuration can fix misconfigured timeperiod<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "nifi.c2.agent.heartbeat.period=1min" << std::endl;
+properties_file << "nifi.administrative.yield.duration=3" << std::endl;
+properties_file.close();
+  }
+  auto properties_file_time_after_creation = 
std::filesystem::last_write_time(properties_path);
+  const std::shared_ptr configure = 
std::make_shared();
+
+  configure->loadConfigureFile(properties_path);
+  CHECK(configure->get("nifi.c2.agent.heartbeat.period") == "6");
+  CHECK(configure->get("nifi.administrative.yield.duration") == "3 ms");
+
+  {
+CHECK(properties_file_time_after_creation == 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+std::string second_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(std::getline(properties_file, second_line));
+CHECK(first_line == "nifi.c2.agent.heartbeat.period=1min");
+CHECK(second_line == "nifi.administrative.yield.duration=3");
+  }
+
+  CHECK(configure->commitChanges());
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+std::string second_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(std::getline(properties_file, second_line));
+CHECK(first_line == "nifi.c2.agent.heartbeat.period=6");
+CHECK(second_line == "nifi.administrative.yield.duration=3 ms");
+  }
+}
+
+TEST_CASE("Configuration can fix misconfigured datasize<->integer validated 
properties") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "appender.rolling.max_file_size=6000" << std::endl;
+properties_file.close();
+  }
+  auto properties_file_time_after_creation = 
std::filesystem::last_write_time(properties_path);
+  const std::shared_ptr configure = 
std::make_shared();
+
+  configure->loadConfigureFile(properties_path, "nifi.log.");
+  CHECK(configure->get("appender.rolling.max_file_size") == "6000 B");
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(first_line == "appender.rolling.max_file_size=6000");
+  }
+
+  CHECK(configure->commitChanges());
+
+  {
+CHECK(properties_file_time_after_creation <= 
std::filesystem::last_write_time(properties_path));
+std::ifstream properties_file(properties_path);
+std::string first_line;
+CHECK(std::getline(properties_file, first_line));
+CHECK(first_line == "appender.rolling.max_file_size=6000 B");
+  }
+}
+
+
+TEST_CASE("Configuration can fix misconfigured validated properties within 
environmental variables") {
+  LogTestController::getInstance().setInfo();
+  LogTestController::getInstance().setInfo();
+  auto properties_path = std::filesystem::temp_directory_path() /  
"test.properties";
+
+  CHECK(minifi::utils::Environment::setEnvironmentVariable("SOME_VARIABLE", 
"4000"));
+
+  {
+std::ofstream properties_file(properties_path);
+properties_file << "compression.cached.log.max.size=${SOME_VARIABLE}" << 
std::endl;
+properties_file << "compression.compressed.log.max.size=3000" << std::endl;
+properties_file.close();
+  }

Review Comment:
   `std::endl` flushes the stream. I think it's not necessary, but certainly 
not twice.
   ```suggestion
   std::ofstream{properties_path}
   << "compression.cached.log.max.size=${SOME_VARIABLE}\n"
   << "compression.compressed.log.max.size=3000\n";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (NIFI-11379) Upgrade jgit version used by NiFi Registry

2023-04-05 Thread Pierre Villard (Jira)


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

Pierre Villard updated NIFI-11379:
--
Fix Version/s: 2.0.0
   (was: 2.latest)
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> Upgrade jgit version used by NiFi Registry
> --
>
> Key: NIFI-11379
> URL: https://issues.apache.org/jira/browse/NIFI-11379
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: NiFi Registry
>Reporter: Chris Sampson
>Assignee: Chris Sampson
>Priority: Minor
> Fix For: 2.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> With the uplift of NiFi components to a Java 11 minimum baseline,  NiFi 
> Registry can now use the jgit 6.x release line (6.0.0 requires java 11+).
> Latest release at time of writing is 
> [6.5.0|https://projects.eclipse.org/projects/technology.jgit/releases/6.5.0]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-11379) Upgrade jgit version used by NiFi Registry

2023-04-05 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on NIFI-11379:


Commit b4e1e07d1d90611f19c56f3d9a2e8d127cb8a6cd in nifi's branch 
refs/heads/main from Chris Sampson
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b4e1e07d1d ]

NIFI-11379 upgrade jgit for NiFi Registry GitFlowPersistence

Signed-off-by: Pierre Villard 

This closes #7123.


> Upgrade jgit version used by NiFi Registry
> --
>
> Key: NIFI-11379
> URL: https://issues.apache.org/jira/browse/NIFI-11379
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: NiFi Registry
>Reporter: Chris Sampson
>Assignee: Chris Sampson
>Priority: Minor
> Fix For: 2.latest
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the uplift of NiFi components to a Java 11 minimum baseline,  NiFi 
> Registry can now use the jgit 6.x release line (6.0.0 requires java 11+).
> Latest release at time of writing is 
> [6.5.0|https://projects.eclipse.org/projects/technology.jgit/releases/6.5.0]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] asfgit closed pull request #7123: NIFI-11379 upgrade jgit to 6.5.0 for NiFi Registry GitFlowPersistenceProvider

2023-04-05 Thread via GitHub


asfgit closed pull request #7123: NIFI-11379 upgrade jgit to 6.5.0 for NiFi 
Registry GitFlowPersistenceProvider
URL: https://github.com/apache/nifi/pull/7123


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (NIFI-11385) Expose JMX metrics from NiFi JVM

2023-04-05 Thread Timea Barna (Jira)
Timea Barna created NIFI-11385:
--

 Summary: Expose JMX metrics from NiFi JVM
 Key: NIFI-11385
 URL: https://issues.apache.org/jira/browse/NIFI-11385
 Project: Apache NiFi
  Issue Type: Improvement
Reporter: Timea Barna


Most of the NiFi processors use external libraries which may register JMX Beans 
like Kafka processors. Exposing such metrics can help with problem solving.

The information available depends on the registered Beans and usually related 
to performance indicators such as request/response rate, latency, request size, 
request counts or tool specific ones like commit rate or sync/join time for 
Kafka. 

Goals
Have an REST endpoint with a list of JMX Bean attributes.
Expose data in a secure way.
Have some kind of filtering.

Non-Goals
Listing or executing supported operations of JMX Beans.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (NIFI-11385) Expose JMX metrics from NiFi JVM

2023-04-05 Thread Timea Barna (Jira)


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

Timea Barna reassigned NIFI-11385:
--

Assignee: Timea Barna

> Expose JMX metrics from NiFi JVM
> 
>
> Key: NIFI-11385
> URL: https://issues.apache.org/jira/browse/NIFI-11385
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Timea Barna
>Assignee: Timea Barna
>Priority: Major
>
> Most of the NiFi processors use external libraries which may register JMX 
> Beans like Kafka processors. Exposing such metrics can help with problem 
> solving.
> The information available depends on the registered Beans and usually related 
> to performance indicators such as request/response rate, latency, request 
> size, request counts or tool specific ones like commit rate or sync/join time 
> for Kafka. 
> Goals
> Have an REST endpoint with a list of JMX Bean attributes.
> Expose data in a secure way.
> Have some kind of filtering.
> Non-Goals
> Listing or executing supported operations of JMX Beans.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [nifi] mark-bathori commented on a diff in pull request #7121: NIFI-11342: HDFS processors fail to get ClassloaderIsolationKey at startup

2023-04-05 Thread via GitHub


mark-bathori commented on code in PR #7121:
URL: https://github.com/apache/nifi/pull/7121#discussion_r1158162517


##
nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java:
##
@@ -211,18 +211,22 @@ public String getClassloaderIsolationKey(final 
PropertyContext context) {
 return explicitKerberosPrincipal;
 }
 
-final KerberosCredentialsService credentialsService = 
context.getProperty(KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
-if (credentialsService != null) {
-final String credentialsServicePrincipal = 
credentialsService.getPrincipal();
-if (credentialsServicePrincipal != null) {
-return credentialsServicePrincipal;
+try {
+final KerberosCredentialsService credentialsService = 
context.getProperty(KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class);
+if (credentialsService != null) {
+final String credentialsServicePrincipal = 
credentialsService.getPrincipal();
+if (credentialsServicePrincipal != null) {
+return credentialsServicePrincipal;
+}
 }
-}
 
-final KerberosUserService kerberosUserService = 
context.getProperty(KERBEROS_USER_SERVICE).asControllerService(KerberosUserService.class);
-if (kerberosUserService != null) {
-final KerberosUser kerberosUser = 
kerberosUserService.createKerberosUser();
-return kerberosUser.getPrincipal();
+final KerberosUserService kerberosUserService = 
context.getProperty(KERBEROS_USER_SERVICE).asControllerService(KerberosUserService.class);
+if (kerberosUserService != null) {
+final KerberosUser kerberosUser = 
kerberosUserService.createKerberosUser();
+return kerberosUser.getPrincipal();
+}
+} catch (Exception e) {

Review Comment:
   Thanks @turcsanyip for the review. I originally wanted to use 
`ControllerServiceDisabledException` but faced with the same issue that it is 
not visible there, that's why I used `Exception` but using 
`IllegalStateException` is a good idea.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (NIFI-11384) PutAzureBlob not appending new data to file

2023-04-05 Thread shrikant belan (Jira)
shrikant belan created NIFI-11384:
-

 Summary: PutAzureBlob not appending new data to file
 Key: NIFI-11384
 URL: https://issues.apache.org/jira/browse/NIFI-11384
 Project: Apache NiFi
  Issue Type: Bug
Affects Versions: nifi-nar-maven-plugin-1.4.0
Reporter: shrikant belan


Hi,

We are using PutAzureBlobStorage (1.16.0.2.1.4.1000-5) to push data to azure. 
We found by default it create block blob and keep overwriting files instead if 
append. We tried with append blob and getting below exception while writing to 
blob from nifi.

 

java.io.IOException: The blob type is invalid for this operation. Please see 
the cause for further information.
    at 
com.microsoft.azure.storage.core.Utility.initIOException(Utility.java:768)
    at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.writeBlock(BlobOutputStreamInternal.java:475)
    at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.access$000(BlobOutputStreamInternal.java:47)
    at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal$1.call(BlobOutputStreamInternal.java:419)
    at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal$1.call(BlobOutputStreamInternal.java:416)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.microsoft.azure.storage.StorageException: The blob type is 
invalid for this operation.
    at 
com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87)
    at 
com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
    at 
com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:196)
    at 
com.microsoft.azure.storage.blob.CloudBlockBlob.uploadBlockInternal(CloudBlockBlob.java:1254)
    at 
com.microsoft.azure.storage.blob.CloudBlockBlob.uploadBlock(CloudBlockBlob.java:1226)
    at 
com.microsoft.azure.storage.blob.BlobOutputStreamInternal.writeBlock(BlobOutputStreamInternal.java:469)
    ... 9 common frames omitted



--
This message was sent by Atlassian Jira
(v8.20.10#820010)