[nifi] branch master updated (0ae2002 -> fc2e6b3)

2020-01-09 Thread alopresto
This is an automated email from the ASF dual-hosted git repository.

alopresto pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git.


from 0ae2002  NIFI-6978 added code and unit test to throw 
IllegalArgumentException when improper value given
 add fc2e6b3  NIFI-7006 Changed the Kudu controller service test to an 
integration test since it starts a server and is not portable across build 
environments (#3976)

No new revisions were added by this update.

Summary of changes:
 .../kudu/{TestKuduLookupService.java => ITestKuduLookupService.java}| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename 
nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-controller-service/src/test/java/org/apache/nifi/controller/kudu/{TestKuduLookupService.java
 => ITestKuduLookupService.java} (99%)



[nifi] branch master updated: NIFI-6978 added code and unit test to throw IllegalArgumentException when improper value given

2020-01-09 Thread alopresto
This is an automated email from the ASF dual-hosted git repository.

alopresto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
 new 0ae2002  NIFI-6978 added code and unit test to throw 
IllegalArgumentException when improper value given
0ae2002 is described below

commit 0ae200252fb3f02b7659b189eaa6868ac67e0069
Author: mtien 
AuthorDate: Mon Jan 6 15:30:18 2020 -0800

NIFI-6978 added code and unit test to throw IllegalArgumentException when 
improper value given

This closes #3960.

Signed-off-by: Andy LoPresto 
---
 .../nifi/properties/ProtectedNiFiProperties.java   |   2 +
 .../ProtectedNiFiPropertiesGroovyTest.groovy   |  19 
 ...otected_aes_improper_delimiter_value.properties | 126 +
 3 files changed, 147 insertions(+)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/ProtectedNiFiProperties.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/ProtectedNiFiProperties.java
index fc1d722..16fb463 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/ProtectedNiFiProperties.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/ProtectedNiFiProperties.java
@@ -524,6 +524,8 @@ class ProtectedNiFiProperties extends 
StandardNiFiProperties {
 return sensitivePropertyProvider.unprotect(retrievedValue);
 } catch (SensitivePropertyProtectionException e) {
 throw new SensitivePropertyProtectionException("Error 
unprotecting value for " + key, e.getCause());
+} catch (IllegalArgumentException e) {
+throw new SensitivePropertyProtectionException("Error 
unprotecting value for " + key, e);
 }
 }
 return retrievedValue;
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/groovy/org/apache/nifi/properties/ProtectedNiFiPropertiesGroovyTest.groovy
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/groovy/org/apache/nifi/properties/ProtectedNiFiPropertiesGroovyTest.groovy
index 6656867..6be470f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/groovy/org/apache/nifi/properties/ProtectedNiFiPropertiesGroovyTest.groovy
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/groovy/org/apache/nifi/properties/ProtectedNiFiPropertiesGroovyTest.groovy
@@ -857,5 +857,24 @@ class ProtectedNiFiPropertiesGroovyTest extends 
GroovyTestCase {
 assert allKeys == rawProperties.keySet()
 }
 
+@Test
+void testShouldThrowExceptionWhenImproperValueGiven() throws Exception {
+// Arrange
+final String KEYSTORE_PASSWORD_KEY = "nifi.security.keystorePasswd"
+
+ProtectedNiFiProperties properties = 
loadFromFile("/conf/nifi_with_sensitive_properties_protected_aes_improper_delimiter_value.properties")
+
+// Act
+def msg = shouldFail(SensitivePropertyProtectionException) {
+NiFiProperties unprotectedProperties = 
properties.getUnprotectedProperties()
+String retrievedKeystorePassword = 
unprotectedProperties.getProperty(KEYSTORE_PASSWORD_KEY)
+}
+logger.expected(msg)
+
+// Assert
+assert msg =~ "Failed to unprotect key ${KEYSTORE_PASSWORD_KEY}"
+assert msg =~ "The cipher text does not contain the delimiter ||"
+}
+
 // TODO: Add tests for protectPlainProperties
 }
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/resources/conf/nifi_with_sensitive_properties_protected_aes_improper_delimiter_value.properties
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/resources/conf/nifi_with_sensitive_properties_protected_aes_improper_delimiter_value.properties
new file mode 100644
index 000..fc90355
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/test/resources/conf/nifi_with_sensitive_properties_protected_aes_improper_delimiter_value.properties
@@ -0,0 +1,126 @@
+# 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 requi

[nifi] branch master updated (08d0352 -> a6f0498)

2020-01-09 Thread kdoran
This is an automated email from the ASF dual-hosted git repository.

kdoran pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git.


from 08d0352  NIFI-6985 Use correct versioned parameter contexts when child 
process groups are version controlled
 add a6f0498  NIFI-6830 Change code to allow empty KeyPassword.

No new revisions were added by this update.

Summary of changes:
 .../apache/nifi/io/socket/SSLContextFactory.java   |  6 +-
 .../nifi/io/socket/SSLContextFactoryTest.groovy| 24 ++
 2 files changed, 29 insertions(+), 1 deletion(-)



svn commit: r37541 - /dev/nifi/KEYS

2020-01-09 Thread aldrin
Author: aldrin
Date: Thu Jan  9 16:47:01 2020
New Revision: 37541

Log:
Adding Arpad Boda and Dániel Bakai to KEYS file.

Modified:
dev/nifi/KEYS

Modified: dev/nifi/KEYS
==
--- dev/nifi/KEYS (original)
+++ dev/nifi/KEYS Thu Jan  9 16:47:01 2020
@@ -1382,3 +1382,74 @@ TPZj7cC30y/MUdi0zJI=
 =uY8D
 -END PGP PUBLIC KEY BLOCK-
 
+2048 2019-10-24 [SC] [expires: 2021-10-23]
+  EE78BB8A82A7851477AAAD0A390C1B5ADE978835
+uid   [ultimate] Arpad Boda 
+sig 3390C1B5ADE978835 2019-10-24  Arpad Boda 
+sub   rsa2048 2019-10-24 [E] [expires: 2021-10-23]
+sig  390C1B5ADE978835 2019-10-24  Arpad Boda 
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+
+mQENBF2xedcBCADhvZxpFnZ37r3LuC4ZBNJu5OX4ORkXSWOgo7JwGb0pDGWrQlcq
+ZU57fjeGvyciLPF7ICAOKDGCF2YYrRfCG2IhI4S6B+pYpIs9H9XnfoVLUOYgCQAl
+VsugMlMXAnLb5MNNFEV6XLQooqvFkTtsbRcEsES6DogBeYlMoF2koJkY5W/Evpcs
+96nwVH9cTtdahOx0Er3U5vNoflSsWqMXQPK+IRviaJP9f3e+pLnV2179e2TX59PV
+bBwXKGwXAoKq19TFwmLAUjuHDKccynwwWenEzQ5CUiUTwtwxzp85hiVZkG07WWST
+aOyGYIUnYUGRQiis4/ElXoBpS6mmld4zlbV7ABEBAAG0HUFycGFkIEJvZGEgPGFi
+b2RhQGFwYWNoZS5vcmc+iQFUBBMBCgA+FiEE7ni7ioKnhRR3qq0KOQwbWt6XiDUF
+Al2xedcCGwMFCQPCZwAFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQOQwbWt6X
+iDXu/Qf8CS1g3ErUBwUkRPegJTjwTAxTEwyxMz2h8rYZMW2Tx55KWyRIqt0FxVqm
+T7NtEeSoJbkIOcokaaOX673UmM5GJo2SaKqiBOzmYWPDiFYLHnvpfaDV9kDOSJG5
+ohhfSPGQX4x2L2GNO75h9bVSd6gITCSqq9FlyLAoaN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I4BKUXKC5vmnh6woxUa1cSK46/V7fG7px
+GFhmUBV8EYpKyAPy+Vd11VhVc1XOwPfFRf5RdQvJjoR3rIvgTka5ZWFTMHeQaZCp
+31+rNfxiRxG1AeysZjRrph68ylME5YNSLWmShxa025Whqns+FbY/HY04n9V6vgEZ
+IDIStvNSGnFNUgTy+qxPba/Dcdn3ZGECCo/WPWz8rsXnGx4nSflSWrXyLK9jN9Np
+xc9TQMH5TxCxeFyAuuWIsPk4ksZ/EXVBe5IWIHr05h0r81SelGSFWKkkPURGgpLy
+y5xIkFc9QP4aKvHw7nWv3XNrcx7HhibeORNN9Udb5r3qRKIRIFNcdPRvKv8Vdfm8
+a7IMA+ZltuB3zcpu9wPlczutyfZiHILjSG47BV4ZCQ0vN8crAn7rUrzY1h74Qaw/
+VHuDvSQTXSB74ND1z+ESeIgE5S904kz5Ha+vN8WxErOQOl5AfItrS5FMvFvWCc1r
+8zD4EkpSuc9wK9zrhUko0G6nmN1pgWUyWumJp8ICEM5kIYP6kz4rSdevRJBqnOeo
+htWUxbnSlV9LWyhhyRp8X6OrgMvWWKx/7KX791D71WdC5/FNdtWIFWINHWVAQ4bI
+NoiIphYP57Bp
+=dl0g
+-END PGP PUBLIC KEY BLOCK-




[jira] [Assigned] (MINIFI-521) minifi-toolkit-0.5.0: "Connection with id ... has invalid destination id" confused by targetId?

2020-01-09 Thread Aldrin Piri (Jira)


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

Aldrin Piri reassigned MINIFI-521:
--

Assignee: (was: Aldrin Piri)

> minifi-toolkit-0.5.0: "Connection with id ... has invalid destination id" 
> confused by targetId?
> ---
>
> Key: MINIFI-521
> URL: https://issues.apache.org/jira/browse/MINIFI-521
> Project: Apache NiFi MiNiFi
>  Issue Type: Bug
>  Components: Agent Configuration/Installation
>Affects Versions: 0.5.0
> Environment: version: '3'
> services:
>   nifi:
> image: apache/nifi:1:10.0
>   minifi:
> image: apache/nifi-minifi:0.5.0
> minifi-toolkit-0.5.0, Windows
>Reporter: Sebastian Napiorkowski
>Priority: Minor
> Attachments: MiNiFi-buggy.xml, MiNiFi-expected.xml, config-buggy.yml, 
> config-expected.yml
>
>
> I followed this tutorial: [Getting started with 
> MiNiFi|https://nifi.apache.org/minifi/getting-started.html]
> And the problem was that, while transforming the Template to the yml-file, it 
> failed with: "Connection with id 10de7342-41ef-37a5-- has 
> invalid destination id 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd"
> {code:java}
> minifi-toolkit-0.5.0\bin\config.bat transform  MiNiFi-buggy.xml 
> config-buggy.yml
> There are validation errors with the template, still outputting YAML but it 
> will need to be edited.
> Connection with id 10de7342-41ef-37a5-- has invalid 
> destination id 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd
> {code}
> By the help of brosander@github (Thank you, mate!) we discovered that the 
> tool is confused by the targetId property:
> {code:xml}
> 
> 
> 
> 
> 
> 1
> true
> true
> 
> db4d2e20-016e-1000-d3c7-73a67e2b1d67
> 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd
> input_minifi
> 
> dadd7f29-016e-1000-3c91-89495c813674
> false
> false
> false
> 
> 
> {code}
> just by removing the {{targetId}}, the toolkit runs through:
> {code:java}
> minifi-toolkit-0.5.0\bin\config.bat transform   MiNiFi-expected.xml 
> config-expected.yml
> No validation errors found in converted configuration.
> {code}
> The produced files differ:
> {code:java}
> diff config-buggy.yml config-expected.yml
> 101c101
> < - id: dadd7f29-016e-1000-3c91-89495c813674
> ---
> > - id: 9b02eb45-3c2d-3fb4-91cf-880d5038c0cd
> {code}
> -I tested it and NiFi discovers MiNiFi, everything seems fine.-
> EDIT:
> I celebrated to early. Removing the {{targetId}} is *not* a working 
> workaround. The easiest way to get around this issue is to downgrade NiFi 
> from 1.10 to 1.9.2.
> Originally I thought this is a MiNiFi issue, but now I'm thinking that 
> something changed in NiFi from 1.9.2 to 1.10.0 when exporting Templates. The 
> ids are mixed up. This could be a much more critical bug, than I initially 
> thought.



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


[nifi] branch master updated: NIFI-6985 Use correct versioned parameter contexts when child process groups are version controlled

2020-01-09 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
 new 08d0352  NIFI-6985 Use correct versioned parameter contexts when child 
process groups are version controlled
08d0352 is described below

commit 08d0352ac11398f3400e3d23a99ff7d6546261ce
Author: Bryan Bende 
AuthorDate: Tue Jan 7 13:25:27 2020 -0500

NIFI-6985 Use correct versioned parameter contexts when child process 
groups are version controlled

Signed-off-by: Pierre Villard 

This closes #3962.
---
 .../apache/nifi/groups/StandardProcessGroup.java   | 41 --
 1 file changed, 39 insertions(+), 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index fc52ad7..fbcf664 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -128,6 +128,7 @@ import org.apache.nifi.util.FlowDifferenceFilters;
 import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.util.ReflectionUtils;
 import org.apache.nifi.util.SnippetUtils;
+import org.apache.nifi.web.ResourceNotFoundException;
 import org.apache.nifi.web.Revision;
 import org.apache.nifi.web.api.dto.TemplateDTO;
 import org.apache.nifi.web.api.dto.VersionedFlowDTO;
@@ -3781,14 +3782,21 @@ public final class StandardProcessGroup implements 
ProcessGroup {
 final ProcessGroup childGroup = 
childGroupsByVersionedId.get(proposedChildGroup.getIdentifier());
 final VersionedFlowCoordinates childCoordinates = 
proposedChildGroup.getVersionedFlowCoordinates();
 
+// if there is a nested process group that is versioned 
controlled, make sure get the param contexts that go with that snapshot
+// instead of the ones from the parent which would have been 
passed in to this method
+Map childParameterContexts = 
versionedParameterContexts;
+if (childCoordinates != null && updateDescendantVersionedGroups) {
+childParameterContexts = 
getVersionedParameterContexts(childCoordinates);
+}
+
 if (childGroup == null) {
-final ProcessGroup added = addProcessGroup(group, 
proposedChildGroup, componentIdSeed, variablesToSkip, 
versionedParameterContexts);
+final ProcessGroup added = addProcessGroup(group, 
proposedChildGroup, componentIdSeed, variablesToSkip, childParameterContexts);
 flowManager.onProcessGroupAdded(added);
 
added.findAllRemoteProcessGroups().forEach(RemoteProcessGroup::initialize);
 LOG.info("Added {} to {}", added, this);
 } else if (childCoordinates == null || 
updateDescendantVersionedGroups) {
 updateProcessGroup(childGroup, proposedChildGroup, 
componentIdSeed, updatedVersionedComponentIds, true, true, 
updateDescendantVersionedGroups,
-variablesToSkip, versionedParameterContexts);
+variablesToSkip, childParameterContexts);
 LOG.info("Updated {}", childGroup);
 }
 
@@ -4057,6 +4065,35 @@ public final class StandardProcessGroup implements 
ProcessGroup {
 }
 }
 
+private Map 
getVersionedParameterContexts(final VersionedFlowCoordinates 
versionedFlowCoordinates) {
+final FlowRegistryClient flowRegistryClient = 
flowController.getFlowRegistryClient();
+
+final String registryId = 
flowRegistryClient.getFlowRegistryId(versionedFlowCoordinates.getRegistryUrl());
+if (registryId == null) {
+throw new ResourceNotFoundException("Could not find any Flow 
Registry registered with url: " + versionedFlowCoordinates.getRegistryUrl());
+}
+
+final FlowRegistry flowRegistry = 
flowRegistryClient.getFlowRegistry(registryId);
+if (flowRegistry == null) {
+throw new ResourceNotFoundException("Could not find any Flow 
Registry registered with identifier " + registryId);
+}
+
+final String bucketId = versionedFlowCoordinates.getBucketId();
+final String flowId = versionedFlowCoordinates.getFlowId();
+final int flowVersion = versionedFlowCoordinates.getVersion();
+
+try {
+final VersionedFlowSnapshot childSnapshot = 
flowRegistry.getFlowContents(bucketId, flowId, flowVersion, false);
+return  childSnapshot.getParameterContexts();
+} catch (final NiFiRegistryExcep

[nifi] branch master updated: NIFI-6960: Add Provenance Table to MetricsSqlQueryService

2020-01-09 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
 new 8d214f9  NIFI-6960: Add Provenance Table to MetricsSqlQueryService
8d214f9 is described below

commit 8d214f99a4c2f58210279b918ca0d974ef6eb733
Author: Matthew Burgess 
AuthorDate: Thu Dec 19 14:40:06 2019 -0500

NIFI-6960: Add Provenance Table to MetricsSqlQueryService

Signed-off-by: Pierre Villard 

This closes #3945.
---
 .../nifi/reporting/sql/MetricsSqlQueryService.java |   3 +
 .../nifi/reporting/sql/QueryNiFiReportingTask.java |   4 +-
 .../sql/provenance/ProvenanceEnumerator.java   | 191 ++
 .../provenance/ProvenanceProjectTableScanRule.java |  76 
 .../reporting/sql/provenance/ProvenanceTable.java  | 214 +
 .../sql/provenance/ProvenanceTableScan.java|  91 +
 .../nifi/reporting/sql/util/QueryMetricsUtil.java  |   4 +-
 .../additionalDetails.html |  35 +++-
 .../reporting/sql/TestQueryNiFiReportingTask.java  | 117 ++-
 9 files changed, 719 insertions(+), 16 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/MetricsSqlQueryService.java
 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/MetricsSqlQueryService.java
index a267998..cbcf4b2 100644
--- 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/MetricsSqlQueryService.java
+++ 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/MetricsSqlQueryService.java
@@ -33,6 +33,7 @@ import 
org.apache.nifi.reporting.sql.connectionstatuspredictions.ConnectionStatu
 import org.apache.nifi.reporting.sql.metrics.JvmMetricsTable;
 import 
org.apache.nifi.reporting.sql.processgroupstatus.ProcessGroupStatusTable;
 import org.apache.nifi.reporting.sql.processorstatus.ProcessorStatusTable;
+import org.apache.nifi.reporting.sql.provenance.ProvenanceTable;
 import org.apache.nifi.serialization.record.RecordSchema;
 import org.apache.nifi.serialization.record.ResultSetRecordSet;
 import org.apache.nifi.util.db.JdbcCommon;
@@ -163,6 +164,8 @@ public class MetricsSqlQueryService implements 
MetricsQueryService {
 rootSchema.add("JVM_METRICS", jvmMetricsTable);
 final BulletinTable bulletinTable = new BulletinTable(context, 
getLogger());
 rootSchema.add("BULLETINS", bulletinTable);
+final ProvenanceTable provenanceTable = new ProvenanceTable(context, 
getLogger());
+rootSchema.add("PROVENANCE", provenanceTable);
 
 rootSchema.setCacheEnabled(false);
 
diff --git 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
index 6f3aa9e..a97baa8 100644
--- 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
+++ 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
@@ -38,9 +38,9 @@ import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
 
-@Tags({"status", "connection", "processor", "jvm", "metrics", "history", 
"bulletin", "prediction", "process", "group", "record", "sql"})
+@Tags({"status", "connection", "processor", "jvm", "metrics", "history", 
"bulletin", "prediction", "process", "group", "provenance", "record", "sql"})
 @CapabilityDescription("Publishes NiFi status information based on the results 
of a user-specified SQL query. The query may make use of the CONNECTION_STATUS, 
PROCESSOR_STATUS, "
-+ "BULLETINS, PROCESS_GROUP_STATUS, JVM_METRICS, or 
CONNECTION_STATUS_PREDICTIONS tables, and can use any functions or capabilities 
provided by Apache Calcite. Note that the "
++ "BULLETINS, PROCESS_GROUP_STATUS, JVM_METRICS, 
CONNECTION_STATUS_PREDICTIONS, or PROVENANCE tables, and can use any functions 
or capabilities provided by Apache Calcite. Note that the "
 + "CONNECTION_STATUS_PREDICTIONS table is not available for querying 
if analytics are not enabled (see the nifi.analytics.predict.enabled property 
in nifi.properties). Attempting a "
 + "query on the table when the capability is disabled will cause an 
error.")
 public class QueryNiFiReportingTask extends AbstractReportingTask {
diff --git 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/provenance/Prove

[nifi] branch master updated: NIFI-6989: Removed call to cancel() in SiteToSiteReportingSink

2020-01-09 Thread pvillard
This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
 new 28aa155  NIFI-6989: Removed call to cancel() in SiteToSiteReportingSink
28aa155 is described below

commit 28aa155fd43af1eef8ece38cf1ca2581be6c21cf
Author: Matthew Burgess 
AuthorDate: Wed Jan 8 22:42:23 2020 -0500

NIFI-6989: Removed call to cancel() in SiteToSiteReportingSink

Signed-off-by: Pierre Villard 

This closes #3969.
---
 .../org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java   | 2 --
 1 file changed, 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
 
b/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
index 574ebd4..20c501e 100644
--- 
a/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
+++ 
b/nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
@@ -163,8 +163,6 @@ public class SiteToSiteReportingRecordSink extends 
AbstractControllerService imp
 transaction.send(out.toByteArray(), attributes);
 transaction.confirm();
 transaction.complete();
-} else {
-transaction.cancel("No data to send");
 }
 }
 return writeResult;