You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2025/11/12 22:15:47 UTC
(nifi) branch main updated: NIFI-15165 Standardized property names in Standad Services (#10515)
This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new f0fdb199ac NIFI-15165 Standardized property names in Standad Services (#10515)
f0fdb199ac is described below
commit f0fdb199ac96cd1f01efd325289850bf04af48ef
Author: dan-s1 <ds...@gmail.com>
AuthorDate: Wed Nov 12 17:15:40 2025 -0500
NIFI-15165 Standardized property names in Standad Services (#10515)
Signed-off-by: David Handermann <ex...@apache.org>
---
.../nifi/processors/aws/AbstractAwsProcessor.java | 2 +
.../record/TestKinesisRecordProcessorRecord.java | 2 +-
.../aws/ml/polly/GetAwsPollyStatusTest.java | 5 +-
.../aws/ml/polly/StartAwsPollyJobTest.java | 5 +-
.../ml/textract/GetAwsTextractJobStatusTest.java | 5 +-
.../ml/textract/StartAwsTextractJobStatusTest.java | 5 +-
.../transcribe/GetAwsTranscribeJobStatusTest.java | 5 +-
.../ml/transcribe/StartAwsTranscribeJobTest.java | 5 +-
.../ml/translate/GetAwsTranslateJobStatusTest.java | 5 +-
.../aws/ml/translate/StartAwsTranslateJobTest.java | 5 +-
.../processors/PublishKafkaLargePayloadIT.java | 2 +-
.../producer/convert/KafkaRecordConverterTest.java | 2 +-
.../sink/SiteToSiteReportingRecordSink.java | 1 +
.../nifi/services/slack/SlackRecordSink.java | 1 +
.../service/SnowflakeComputingConnectionPool.java | 1 +
.../nifi/record/sink/db/DatabaseRecordSink.java | 46 +++++++++--------
.../apache/nifi/dbcp/HikariCPConnectionPool.java | 49 ++++++++++--------
.../cache/server/AbstractCacheServer.java | 9 +++-
.../service/StandardFileResourceService.java | 9 +++-
.../apache/nifi/dbcp/HadoopDBCPConnectionPool.java | 4 +-
.../key/service/StandardPrivateKeyService.java | 17 ++++---
.../nifi/lookup/AbstractCSVLookupService.java | 17 ++++---
.../lookup/DistributedMapCacheLookupService.java | 13 +++--
.../org/apache/nifi/lookup/RestLookupService.java | 50 ++++++++++---------
.../nifi/lookup/SimpleCsvFileLookupService.java | 10 +++-
.../CommonsConfigurationLookupService.java | 8 ++-
.../lookup/db/AbstractDatabaseLookupService.java | 25 ++++++----
.../lookup/db/DatabaseRecordLookupService.java | 5 +-
.../lookup/db/SimpleDatabaseLookupService.java | 10 +++-
.../nifi/lookup/maxmind/IPLookupService.java | 29 ++++++-----
.../oauth2/StandardOauth2AccessTokenProvider.java | 2 +
.../nifi/proxy/ProxyConfigurationService.java | 10 +++-
.../proxy/StandardProxyConfigurationService.java | 30 ++++++-----
.../nifi/schema/inference/SchemaInferenceUtil.java | 15 +++---
.../main/java/org/apache/nifi/avro/AvroReader.java | 10 +++-
.../org/apache/nifi/avro/AvroRecordSetWriter.java | 18 ++++---
.../main/java/org/apache/nifi/cef/CEFReader.java | 28 +++++++----
.../main/java/org/apache/nifi/csv/CSVReader.java | 4 +-
.../org/apache/nifi/csv/CSVRecordSetWriter.java | 4 +-
.../main/java/org/apache/nifi/grok/GrokReader.java | 18 ++++---
.../org/apache/nifi/json/JsonRecordSetWriter.java | 17 ++++---
.../java/org/apache/nifi/json/JsonTreeReader.java | 20 +++++---
.../nifi/schema/inference/VolatileSchemaCache.java | 9 +++-
.../org/apache/nifi/syslog/Syslog5424Reader.java | 10 +++-
.../java/org/apache/nifi/syslog/SyslogReader.java | 10 +++-
.../main/java/org/apache/nifi/xml/XMLReader.java | 37 ++++++++------
.../org/apache/nifi/xml/XMLRecordSetWriter.java | 34 +++++++------
.../serialization/TestRecordReaderProcessor.java | 3 +-
.../TestRecordSetWriterProcessor.java | 3 +-
.../apache/nifi/xml/TestXMLRecordSetWriter.java | 4 +-
.../apache/nifi/record/sink/RecordSinkService.java | 9 +++-
.../apache/nifi/record/sink/EmailRecordSink.java | 58 ++++++++++++----------
.../apache/nifi/record/sink/LoggingRecordSink.java | 10 +++-
.../nifi/record/sink/event/UDPEventRecordSink.java | 18 ++++---
.../ssl/StandardRestrictedSSLContextService.java | 36 +++++++-------
.../apache/nifi/ssl/StandardSSLContextService.java | 13 +++--
.../service/StandardWebClientServiceProvider.java | 1 +
57 files changed, 493 insertions(+), 290 deletions(-)
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAwsProcessor.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAwsProcessor.java
index a9f96048fa..4ff0097195 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAwsProcessor.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAwsProcessor.java
@@ -38,6 +38,7 @@ import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.processors.aws.credentials.provider.AwsCredentialsProviderService;
import org.apache.nifi.proxy.ProxyConfiguration;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.proxy.ProxySpec;
import org.apache.nifi.ssl.SSLContextProvider;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
@@ -188,6 +189,7 @@ public abstract class AbstractAwsProcessor<C extends AwsClient, B extends AwsCli
config.renameProperty("aws-region", REGION.getName());
migrateAuthenticationProperties(config);
ProxyServiceMigration.migrateProxyProperties(config, PROXY_CONFIGURATION_SERVICE, OBSOLETE_PROXY_HOST, OBSOLETE_PROXY_PORT, OBSOLETE_PROXY_USERNAME, OBSOLETE_PROXY_PASSWORD);
+ config.renameProperty(ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, PROXY_CONFIGURATION_SERVICE.getName());
}
private void migrateAuthenticationProperties(final PropertyConfiguration config) {
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/kinesis/stream/record/TestKinesisRecordProcessorRecord.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/kinesis/stream/record/TestKinesisRecordProcessorRecord.java
index fa8377b346..d0ba226a6c 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/kinesis/stream/record/TestKinesisRecordProcessorRecord.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/kinesis/stream/record/TestKinesisRecordProcessorRecord.java
@@ -109,7 +109,7 @@ public class TestKinesisRecordProcessorRecord {
runner.addControllerService("record-writer", writer);
runner.setProperty(writer, SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, SchemaAccessUtils.INHERIT_RECORD_SCHEMA.getValue());
- runner.setProperty(writer, "output-grouping", "output-oneline");
+ runner.setProperty(writer, JsonRecordSetWriter.OUTPUT_GROUPING, "output-oneline");
runner.enableControllerService(writer);
runner.setProperty(ConsumeKinesisStream.RECORD_WRITER, "record-writer");
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/GetAwsPollyStatusTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/GetAwsPollyStatusTest.java
index 6355d15070..e133ebc401 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/GetAwsPollyStatusTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/GetAwsPollyStatusTest.java
@@ -18,7 +18,9 @@
package org.apache.nifi.processors.aws.ml.polly;
import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.PropertyMigrationResult;
@@ -139,7 +141,8 @@ public class GetAwsPollyStatusTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
- "awsTaskId", TASK_ID.getName());
+ "awsTaskId", TASK_ID.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/StartAwsPollyJobTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/StartAwsPollyJobTest.java
index 3d0578ba5c..805b949782 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/StartAwsPollyJobTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/polly/StartAwsPollyJobTest.java
@@ -22,8 +22,10 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.ml.AbstractAwsMachineLearningJobStarter;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.PropertyMigrationResult;
import org.apache.nifi.util.TestRunner;
@@ -163,7 +165,8 @@ public class StartAwsPollyJobTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
- "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName());
+ "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/GetAwsTextractJobStatusTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/GetAwsTextractJobStatusTest.java
index 8f09059444..7cb6bc4fa6 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/GetAwsTextractJobStatusTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/GetAwsTextractJobStatusTest.java
@@ -19,7 +19,9 @@ package org.apache.nifi.processors.aws.ml.textract;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.PropertyMigrationResult;
import org.apache.nifi.util.TestRunner;
@@ -151,7 +153,8 @@ public class GetAwsTextractJobStatusTest {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
"awsTaskId", TASK_ID.getName(),
- "textract-type", GetAwsTextractJobStatus.TEXTRACT_TYPE.getName());
+ "textract-type", GetAwsTextractJobStatus.TEXTRACT_TYPE.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/StartAwsTextractJobStatusTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/StartAwsTextractJobStatusTest.java
index 4e9f051263..f6096808c2 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/StartAwsTextractJobStatusTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/textract/StartAwsTextractJobStatusTest.java
@@ -22,8 +22,10 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.ml.AbstractAwsMachineLearningJobStarter;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.PropertyMigrationResult;
import org.apache.nifi.util.TestRunner;
@@ -324,7 +326,8 @@ public class StartAwsTextractJobStatusTest {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
"json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName(),
- "textract-type", StartAwsTextractJob.TEXTRACT_TYPE.getName());
+ "textract-type", StartAwsTextractJob.TEXTRACT_TYPE.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/GetAwsTranscribeJobStatusTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/GetAwsTranscribeJobStatusTest.java
index aab104265c..4c36b41b1a 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/GetAwsTranscribeJobStatusTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/GetAwsTranscribeJobStatusTest.java
@@ -19,7 +19,9 @@ package org.apache.nifi.processors.aws.ml.transcribe;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.PropertyMigrationResult;
@@ -141,7 +143,8 @@ public class GetAwsTranscribeJobStatusTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
- "awsTaskId", TASK_ID.getName());
+ "awsTaskId", TASK_ID.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/StartAwsTranscribeJobTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/StartAwsTranscribeJobTest.java
index 7b723e6956..18a5417d48 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/StartAwsTranscribeJobTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/transcribe/StartAwsTranscribeJobTest.java
@@ -22,8 +22,10 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.ml.AbstractAwsMachineLearningJobStarter;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.PropertyMigrationResult;
import org.apache.nifi.util.TestRunner;
@@ -159,7 +161,8 @@ public class StartAwsTranscribeJobTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
- "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName());
+ "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/GetAwsTranslateJobStatusTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/GetAwsTranslateJobStatusTest.java
index a9745d0c7a..c427fc9fa8 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/GetAwsTranslateJobStatusTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/GetAwsTranslateJobStatusTest.java
@@ -19,7 +19,9 @@ package org.apache.nifi.processors.aws.ml.translate;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.PropertyMigrationResult;
@@ -153,7 +155,8 @@ public class GetAwsTranslateJobStatusTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", REGION.getName(),
- "awsTaskId", TASK_ID.getName());
+ "awsTaskId", TASK_ID.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/StartAwsTranslateJobTest.java b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/StartAwsTranslateJobTest.java
index 4614a11867..7ca204aec2 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/StartAwsTranslateJobTest.java
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/ml/translate/StartAwsTranslateJobTest.java
@@ -22,9 +22,11 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processors.aws.AbstractAwsProcessor;
import org.apache.nifi.processors.aws.ml.AbstractAwsMachineLearningJobStarter;
import org.apache.nifi.processors.aws.region.RegionUtil;
import org.apache.nifi.processors.aws.testutil.AuthUtils;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.PropertyMigrationResult;
import org.apache.nifi.util.TestRunner;
@@ -159,7 +161,8 @@ public class StartAwsTranslateJobTest {
void testMigration() {
final PropertyMigrationResult propertyMigrationResult = runner.migrateProperties();
final Map<String, String> expected = Map.of("aws-region", RegionUtil.REGION.getName(),
- "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName());
+ "json-payload", AbstractAwsMachineLearningJobStarter.JSON_PAYLOAD.getName(),
+ ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, AbstractAwsProcessor.PROXY_CONFIGURATION_SERVICE.getName());
assertEquals(expected, propertyMigrationResult.getPropertiesRenamed());
}
diff --git a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaLargePayloadIT.java b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaLargePayloadIT.java
index c0a22a9cae..7d162766e3 100644
--- a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaLargePayloadIT.java
+++ b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaLargePayloadIT.java
@@ -66,7 +66,7 @@ public class PublishKafkaLargePayloadIT extends AbstractPublishKafkaIT {
runner.addControllerService("jsonRecordSetWriter", jsonRecordSetWriter);
runner.setProperty(jsonRecordSetWriter, SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, SchemaAccessUtils.INHERIT_RECORD_SCHEMA);
- runner.setProperty(jsonRecordSetWriter, "output-grouping", "output-oneline");
+ runner.setProperty(jsonRecordSetWriter, JsonRecordSetWriter.OUTPUT_GROUPING, "output-oneline");
runner.enableControllerService(jsonRecordSetWriter);
runner.setValidateExpressionUsage(false);
diff --git a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/kafka/processors/producer/convert/KafkaRecordConverterTest.java b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/kafka/processors/producer/convert/KafkaRecordConverterTest.java
index b3ecaebcce..bdb92d6fc5 100644
--- a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/kafka/processors/producer/convert/KafkaRecordConverterTest.java
+++ b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/kafka/processors/producer/convert/KafkaRecordConverterTest.java
@@ -67,7 +67,7 @@ class KafkaRecordConverterTest {
runner.addControllerService("jsonRecordSetWriter", jsonRecordSetWriter);
runner.setProperty(jsonRecordSetWriter, SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, SchemaAccessUtils.INHERIT_RECORD_SCHEMA);
- runner.setProperty(jsonRecordSetWriter, "output-grouping", "output-oneline");
+ runner.setProperty(jsonRecordSetWriter, JsonRecordSetWriter.OUTPUT_GROUPING, "output-oneline");
runner.enableControllerService(jsonRecordSetWriter);
ComponentLog mockLog = mock(ComponentLog.class);
diff --git a/nifi-extension-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-extension-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
index 5cf5454c70..cc9104237a 100644
--- a/nifi-extension-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-extension-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/sink/SiteToSiteReportingRecordSink.java
@@ -79,6 +79,7 @@ public class SiteToSiteReportingRecordSink extends AbstractControllerService imp
@Override
public void migrateProperties(final PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
ProxyServiceMigration.migrateProxyProperties(config, SiteToSiteUtils.PROXY_CONFIGURATION_SERVICE,
SiteToSiteUtils.OBSOLETE_PROXY_HOST, SiteToSiteUtils.OBSOLETE_PROXY_PORT, SiteToSiteUtils.OBSOLETE_PROXY_USERNAME, SiteToSiteUtils.OBSOLETE_PROXY_PASSWORD);
config.renameProperty(SiteToSiteUtils.OBSOLETE_TRANSPORT_PROTOCOL, SiteToSiteUtils.TRANSPORT_PROTOCOL.getName());
diff --git a/nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/services/slack/SlackRecordSink.java b/nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/services/slack/SlackRecordSink.java
index 9342d4c397..9560cf80c5 100644
--- a/nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/services/slack/SlackRecordSink.java
+++ b/nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/services/slack/SlackRecordSink.java
@@ -118,6 +118,7 @@ public class SlackRecordSink extends AbstractControllerService implements Record
@Override
public void migrateProperties(PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
config.renameProperty("api-url", API_URL.getName());
config.renameProperty("access-token", ACCESS_TOKEN.getName());
config.renameProperty("channel-id", CHANNEL_ID.getName());
diff --git a/nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-services/src/main/java/org/apache/nifi/snowflake/service/SnowflakeComputingConnectionPool.java b/nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-services/src/main/java/org/apache/nifi/snowflake/service/SnowflakeComputingConnectionPool.java
index 2c60edebd5..e2ee69104b 100644
--- a/nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-services/src/main/java/org/apache/nifi/snowflake/service/SnowflakeComputingConnectionPool.java
+++ b/nifi-extension-bundles/nifi-snowflake-bundle/nifi-snowflake-services/src/main/java/org/apache/nifi/snowflake/service/SnowflakeComputingConnectionPool.java
@@ -217,6 +217,7 @@ public class SnowflakeComputingConnectionPool extends AbstractDBCPConnectionPool
config.renameProperty(DBCPProperties.OLD_EVICTION_RUN_PERIOD_PROPERTY_NAME, EVICTION_RUN_PERIOD.getName());
config.renameProperty(DBCPProperties.OLD_MIN_EVICTABLE_IDLE_TIME_PROPERTY_NAME, MIN_EVICTABLE_IDLE_TIME.getName());
config.renameProperty(DBCPProperties.OLD_SOFT_MIN_EVICTABLE_IDLE_TIME_PROPERTY_NAME, SOFT_MIN_EVICTABLE_IDLE_TIME.getName());
+ config.renameProperty(ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, ProxyConfigurationService.PROXY_CONFIGURATION_SERVICE.getName());
}
@Override
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/record/sink/db/DatabaseRecordSink.java b/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/record/sink/db/DatabaseRecordSink.java
index ae18e5ce89..87112dbb24 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/record/sink/db/DatabaseRecordSink.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/record/sink/db/DatabaseRecordSink.java
@@ -27,6 +27,7 @@ import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.dbcp.DBCPService;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.record.sink.RecordSinkService;
import org.apache.nifi.serialization.WriteResult;
@@ -74,16 +75,14 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
"A flow will fail if any column in the database that does not have a field in the document. An error will be logged");
static final PropertyDescriptor DBCP_SERVICE = new PropertyDescriptor.Builder()
- .name("db-record-sink-dcbp-service")
- .displayName("Database Connection Pooling Service")
+ .name("Database Connection Pooling Service")
.description("The Controller Service that is used to obtain a connection to the database for sending records.")
.required(true)
.identifiesControllerService(DBCPService.class)
.build();
static final PropertyDescriptor CATALOG_NAME = new PropertyDescriptor.Builder()
- .name("db-record-sink-catalog-name")
- .displayName("Catalog Name")
+ .name("Catalog Name")
.description("The name of the catalog that the statement should update. This may not apply for the database that you are updating. In this case, leave the field empty")
.required(false)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -91,8 +90,7 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
.build();
static final PropertyDescriptor SCHEMA_NAME = new PropertyDescriptor.Builder()
- .name("db-record-sink-schema-name")
- .displayName("Schema Name")
+ .name("Schema Name")
.description("The name of the schema that the table belongs to. This may not apply for the database that you are updating. In this case, leave the field empty")
.required(false)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -100,8 +98,7 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
.build();
static final PropertyDescriptor TABLE_NAME = new PropertyDescriptor.Builder()
- .name("db-record-sink-table-name")
- .displayName("Table Name")
+ .name("Table Name")
.description("The name of the table that the statement should affect.")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -109,8 +106,7 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
.build();
static final PropertyDescriptor TRANSLATE_FIELD_NAMES = new PropertyDescriptor.Builder()
- .name("db-record-sink-translate-field-names")
- .displayName("Translate Field Names")
+ .name("Translate Field Names")
.description("If true, the Processor will attempt to translate field names into the appropriate column names for the table specified. "
+ "If false, the field names must match the column names exactly, or the column will not be updated")
.allowableValues("true", "false")
@@ -118,40 +114,35 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
.build();
static final PropertyDescriptor UNMATCHED_FIELD_BEHAVIOR = new PropertyDescriptor.Builder()
- .name("db-record-sink-unmatched-field-behavior")
- .displayName("Unmatched Field Behavior")
+ .name("Unmatched Field Behavior")
.description("If an incoming record has a field that does not map to any of the database table's columns, this property specifies how to handle the situation")
.allowableValues(IGNORE_UNMATCHED_FIELD, FAIL_UNMATCHED_FIELD)
.defaultValue(IGNORE_UNMATCHED_FIELD.getValue())
.build();
static final PropertyDescriptor UNMATCHED_COLUMN_BEHAVIOR = new PropertyDescriptor.Builder()
- .name("db-record-sink-unmatched-column-behavior")
- .displayName("Unmatched Column Behavior")
+ .name("Unmatched Column Behavior")
.description("If an incoming record does not have a field mapping for all of the database table's columns, this property specifies how to handle the situation")
.allowableValues(IGNORE_UNMATCHED_COLUMN, WARNING_UNMATCHED_COLUMN, FAIL_UNMATCHED_COLUMN)
.defaultValue(FAIL_UNMATCHED_COLUMN.getValue())
.build();
static final PropertyDescriptor QUOTED_IDENTIFIERS = new PropertyDescriptor.Builder()
- .name("db-record-sink-quoted-identifiers")
- .displayName("Quote Column Identifiers")
+ .name("Quote Column Identifiers")
.description("Enabling this option will cause all column names to be quoted, allowing you to use reserved words as column names in your tables.")
.allowableValues("true", "false")
.defaultValue("false")
.build();
static final PropertyDescriptor QUOTED_TABLE_IDENTIFIER = new PropertyDescriptor.Builder()
- .name("db-record-sink-quoted-table-identifiers")
- .displayName("Quote Table Identifiers")
+ .name("Quote Table Identifiers")
.description("Enabling this option will cause the table name to be quoted to support the use of special characters in the table name.")
.allowableValues("true", "false")
.defaultValue("false")
.build();
static final PropertyDescriptor QUERY_TIMEOUT = new PropertyDescriptor.Builder()
- .name("db-record-sink-query-timeout")
- .displayName("Max Wait Time")
+ .name("Max Wait Time")
.description("The maximum amount of time allowed for a running SQL statement "
+ ", zero means there is no limit. Max time less than 1 second will be equal to zero.")
.defaultValue("0 seconds")
@@ -301,6 +292,21 @@ public class DatabaseRecordSink extends AbstractControllerService implements Rec
return writeResult;
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
+ config.renameProperty("db-record-sink-dcbp-service", DBCP_SERVICE.getName());
+ config.renameProperty("db-record-sink-catalog-name", CATALOG_NAME.getName());
+ config.renameProperty("db-record-sink-schema-name", SCHEMA_NAME.getName());
+ config.renameProperty("db-record-sink-table-name", TABLE_NAME.getName());
+ config.renameProperty("db-record-sink-translate-field-names", TRANSLATE_FIELD_NAMES.getName());
+ config.renameProperty("db-record-sink-unmatched-field-behavior", UNMATCHED_FIELD_BEHAVIOR.getName());
+ config.renameProperty("db-record-sink-unmatched-column-behavior", UNMATCHED_COLUMN_BEHAVIOR.getName());
+ config.renameProperty("db-record-sink-quoted-identifiers", QUOTED_IDENTIFIERS.getName());
+ config.renameProperty("db-record-sink-quoted-table-identifiers", QUOTED_TABLE_IDENTIFIER.getName());
+ config.renameProperty("db-record-sink-query-timeout", QUERY_TIMEOUT.getName());
+ }
+
private static String normalizeColumnName(final String colName, final boolean translateColumnNames) {
return colName == null ? null : (translateColumnNames ? colName.toUpperCase().replace("_", "") : colName);
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java b/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java
index 58e65c7aff..3c51c2a2eb 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java
@@ -42,6 +42,7 @@ import org.apache.nifi.expression.AttributeExpression;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.kerberos.KerberosUserService;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.security.krb.KerberosAction;
@@ -93,8 +94,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
private static final int DEFAULT_MIN_VALIDATION_TIMEOUT = 250;
public static final PropertyDescriptor DATABASE_URL = new PropertyDescriptor.Builder()
- .name("hikaricp-connection-url")
- .displayName("Database Connection URL")
+ .name("Database Connection URL")
.description("A database connection URL used to connect to a database. May contain database system name, host, port, database name and some parameters."
+ " The exact syntax of a database connection URL is specified by your DBMS.")
.addValidator(new ConnectionUrlValidator())
@@ -103,8 +103,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor DB_DRIVERNAME = new PropertyDescriptor.Builder()
- .name("hikaricp-driver-classname")
- .displayName("Database Driver Class Name")
+ .name("Database Driver Class Name")
.description("The fully-qualified class name of the JDBC driver. Example: com.mysql.jdbc.Driver")
.required(true)
.addValidator(new DriverClassValidator())
@@ -112,8 +111,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor DB_DRIVER_LOCATION = new PropertyDescriptor.Builder()
- .name("hikaricp-driver-locations")
- .displayName("Database Driver Location(s)")
+ .name("Database Driver Locations")
.description("Comma-separated list of files/folders and/or URLs containing the driver JAR and its dependencies (if any). For example '/var/tmp/mariadb-java-client-1.1.7.jar'")
.required(false)
.identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL)
@@ -122,16 +120,14 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor DB_USER = new PropertyDescriptor.Builder()
- .name("hikaricp-username")
- .displayName("Database User")
+ .name("Database User")
.description("Database user name")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
public static final PropertyDescriptor DB_PASSWORD = new PropertyDescriptor.Builder()
- .name("hikaricp-password")
- .displayName("Password")
+ .name("Password")
.description("The password for the database user")
.required(false)
.sensitive(true)
@@ -140,8 +136,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor MAX_WAIT_TIME = new PropertyDescriptor.Builder()
- .name("hikaricp-max-wait-time")
- .displayName("Max Wait Time")
+ .name("Max Wait Time")
.description("The maximum amount of time that the pool will wait (when there are no available connections) "
+ " for a connection to be returned before failing, or 0 <time units> to wait indefinitely. ")
.defaultValue("500 millis")
@@ -152,8 +147,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor MAX_TOTAL_CONNECTIONS = new PropertyDescriptor.Builder()
- .name("hikaricp-max-total-conns")
- .displayName("Max Total Connections")
+ .name("Max Total Connections")
.description("This property controls the maximum size that the pool is allowed to reach, including both idle and in-use connections. Basically this value will determine the "
+ "maximum number of actual connections to the database backend. A reasonable value for this is best determined by your execution environment. When the pool reaches "
+ "this size, and no idle connections are available, the service will block for up to connectionTimeout milliseconds before timing out.")
@@ -165,8 +159,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor VALIDATION_QUERY = new PropertyDescriptor.Builder()
- .name("hikaricp-validation-query")
- .displayName("Validation Query")
+ .name("Validation Query")
.description("Validation Query used to validate connections before returning them. "
+ "When connection is invalid, it gets dropped and new valid connection will be returned. "
+ "NOTE: Using validation might have some performance penalty.")
@@ -176,8 +169,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor MIN_IDLE = new PropertyDescriptor.Builder()
- .name("hikaricp-min-idle-conns")
- .displayName("Minimum Idle Connections")
+ .name("Minimum Idle Connections")
.description("This property controls the minimum number of idle connections that HikariCP tries to maintain in the pool. If the idle connections dip below this value and total "
+ "connections in the pool are less than 'Max Total Connections', HikariCP will make a best effort to add additional connections quickly and efficiently. It is recommended "
+ "that this property to be set equal to 'Max Total Connections'.")
@@ -188,8 +180,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor MAX_CONN_LIFETIME = new PropertyDescriptor.Builder()
- .name("hikaricp-max-conn-lifetime")
- .displayName("Max Connection Lifetime")
+ .name("Max Connection Lifetime")
.description("The maximum lifetime of a connection. After this time is exceeded the " +
"connection will fail the next activation, passivation or validation test. A value of zero or less " +
"means the connection has an infinite lifetime.")
@@ -200,8 +191,7 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
.build();
public static final PropertyDescriptor KERBEROS_USER_SERVICE = new PropertyDescriptor.Builder()
- .name("hikaricp-kerberos-user-service")
- .displayName("Kerberos User Service")
+ .name("Kerberos User Service")
.description("Specifies the Kerberos User Controller Service that should be used for authenticating with Kerberos")
.identifiesControllerService(KerberosUserService.class)
.required(false)
@@ -398,6 +388,21 @@ public class HikariCPConnectionPool extends AbstractControllerService implements
return results;
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("hikaricp-connection-url", DATABASE_URL.getName());
+ config.renameProperty("hikaricp-driver-classname", DB_DRIVERNAME.getName());
+ config.renameProperty("hikaricp-driver-locations", DB_DRIVER_LOCATION.getName());
+ config.renameProperty("hikaricp-username", DB_USER.getName());
+ config.renameProperty("hikaricp-password", DB_PASSWORD.getName());
+ config.renameProperty("hikaricp-max-wait-time", MAX_WAIT_TIME.getName());
+ config.renameProperty("hikaricp-max-total-conns", MAX_TOTAL_CONNECTIONS.getName());
+ config.renameProperty("hikaricp-validation-query", VALIDATION_QUERY.getName());
+ config.renameProperty("hikaricp-min-idle-conns", MIN_IDLE.getName());
+ config.renameProperty("hikaricp-max-conn-lifetime", MAX_CONN_LIFETIME.getName());
+ config.renameProperty("hikaricp-kerberos-user-service", KERBEROS_USER_SERVICE.getName());
+ }
+
protected void configureDataSource(final ConfigurationContext context, final HikariDataSource dataSource) {
final String driverName = context.getProperty(DB_DRIVERNAME).evaluateAttributeExpressions().getValue();
final String user = context.getProperty(DB_USER).evaluateAttributeExpressions().getValue();
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java b/nifi-extension-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java
index 26b99cbcad..45b09be390 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/java/org/apache/nifi/distributed/cache/server/AbstractCacheServer.java
@@ -26,6 +26,7 @@ import org.apache.nifi.annotation.lifecycle.OnShutdown;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.ssl.SSLContextProvider;
@@ -70,8 +71,7 @@ public abstract class AbstractCacheServer extends AbstractControllerService {
.addValidator(StandardValidators.createDirectoryExistsValidator(true, true))
.build();
public static final PropertyDescriptor MAX_READ_SIZE = new PropertyDescriptor.Builder()
- .name("maximum-read-size")
- .displayName("Maximum Read Size")
+ .name("Maximum Read Size")
.description("The maximum number of network bytes to read for a single cache item")
.required(false)
.addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
@@ -116,5 +116,10 @@ public abstract class AbstractCacheServer extends AbstractControllerService {
return cacheServer == null ? -1 : cacheServer.getPort();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("maximum-read-size", MAX_READ_SIZE.getName());
+ }
+
protected abstract CacheServer createCacheServer(ConfigurationContext context);
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-file-resource-service-bundle/nifi-file-resource-service/src/main/java/org/apache/nifi/fileresource/service/StandardFileResourceService.java b/nifi-extension-bundles/nifi-standard-services/nifi-file-resource-service-bundle/nifi-file-resource-service/src/main/java/org/apache/nifi/fileresource/service/StandardFileResourceService.java
index 2d5a5eca69..14cf4adca3 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-file-resource-service-bundle/nifi-file-resource-service/src/main/java/org/apache/nifi/fileresource/service/StandardFileResourceService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-file-resource-service-bundle/nifi-file-resource-service/src/main/java/org/apache/nifi/fileresource/service/StandardFileResourceService.java
@@ -33,6 +33,7 @@ import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.fileresource.service.api.FileResource;
import org.apache.nifi.fileresource.service.api.FileResourceService;
import org.apache.nifi.controller.AbstractControllerService;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
@@ -55,8 +56,7 @@ import java.util.Map;
public class StandardFileResourceService extends AbstractControllerService implements FileResourceService {
public static final PropertyDescriptor FILE_PATH = new PropertyDescriptor.Builder()
- .name("file-path")
- .displayName("File Path")
+ .name("File Path")
.description("Path to a file that can be accessed locally.")
.identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -109,4 +109,9 @@ public class StandardFileResourceService extends AbstractControllerService imple
throw new ProcessException("File cannot be read: " + file.getAbsolutePath(), e);
}
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("file-path", FILE_PATH.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java b/nifi-extension-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java
index 0a99f1e7b5..f3550b3470 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java
@@ -102,8 +102,7 @@ public class HadoopDBCPConnectionPool extends AbstractDBCPConnectionPool {
.build();
public static final PropertyDescriptor HADOOP_CONFIGURATION_RESOURCES = new PropertyDescriptor.Builder()
- .name("hadoop-config-resources")
- .displayName("Hadoop Configuration Resources")
+ .name("Hadoop Configuration Resources")
.description("A file, or comma separated list of files, which contain the Hadoop configuration (core-site.xml, etc.). Without this, Hadoop "
+ "will search the classpath, or will revert to a default configuration. Note that to enable authentication with Kerberos, "
+ "the appropriate properties must be set in the configuration files.")
@@ -143,6 +142,7 @@ public class HadoopDBCPConnectionPool extends AbstractDBCPConnectionPool {
config.removeProperty("Kerberos Password");
config.removeProperty("Kerberos Keytab");
config.removeProperty("kerberos-credentials-service");
+ config.renameProperty("hadoop-config-resources", HADOOP_CONFIGURATION_RESOURCES.getName());
config.renameProperty(DBCPProperties.OLD_DB_DRIVER_LOCATION_PROPERTY_NAME, DB_DRIVER_LOCATION.getName());
config.renameProperty(DBCPProperties.OLD_VALIDATION_QUERY_PROPERTY_NAME, VALIDATION_QUERY.getName());
config.renameProperty(DBCPProperties.OLD_MIN_IDLE_PROPERTY_NAME, MIN_IDLE.getName());
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-key-service-bundle/nifi-key-service/src/main/java/org/apache/nifi/key/service/StandardPrivateKeyService.java b/nifi-extension-bundles/nifi-standard-services/nifi-key-service-bundle/nifi-key-service/src/main/java/org/apache/nifi/key/service/StandardPrivateKeyService.java
index ba6d612da4..af9e042745 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-key-service-bundle/nifi-key-service/src/main/java/org/apache/nifi/key/service/StandardPrivateKeyService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-key-service-bundle/nifi-key-service/src/main/java/org/apache/nifi/key/service/StandardPrivateKeyService.java
@@ -32,6 +32,7 @@ import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.key.service.api.PrivateKeyService;
import org.apache.nifi.key.service.reader.BouncyCastlePrivateKeyReader;
import org.apache.nifi.key.service.reader.PrivateKeyReader;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.reporting.InitializationException;
@@ -54,16 +55,14 @@ import java.util.concurrent.atomic.AtomicReference;
@CapabilityDescription("Private Key Service provides access to a Private Key loaded from configured sources")
public class StandardPrivateKeyService extends AbstractControllerService implements PrivateKeyService {
public static final PropertyDescriptor KEY_FILE = new PropertyDescriptor.Builder()
- .name("key-file")
- .displayName("Key File")
+ .name("Key File")
.description("File path to Private Key structured using PKCS8 and encoded as PEM")
.required(false)
.identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE)
.build();
public static final PropertyDescriptor KEY = new PropertyDescriptor.Builder()
- .name("key")
- .displayName("Key")
+ .name("Key")
.description("Private Key structured using PKCS8 and encoded as PEM")
.required(false)
.sensitive(true)
@@ -71,8 +70,7 @@ public class StandardPrivateKeyService extends AbstractControllerService impleme
.build();
public static final PropertyDescriptor KEY_PASSWORD = new PropertyDescriptor.Builder()
- .name("key-password")
- .displayName("Key Password")
+ .name("Key Password")
.description("Password used for decrypting Private Keys")
.required(false)
.sensitive(true)
@@ -134,6 +132,13 @@ public class StandardPrivateKeyService extends AbstractControllerService impleme
keyReference.set(null);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("key-file", KEY_FILE.getName());
+ config.renameProperty("key", KEY.getName());
+ config.renameProperty("key-password", KEY_PASSWORD.getName());
+ }
+
/**
* Get Supported Property Descriptors
*
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/AbstractCSVLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/AbstractCSVLookupService.java
index d7233882fc..506984b594 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/AbstractCSVLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/AbstractCSVLookupService.java
@@ -26,6 +26,7 @@ import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.controller.ControllerServiceInitializationContext;
import org.apache.nifi.csv.CSVUtils;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.file.monitor.LastModifiedMonitor;
@@ -49,8 +50,7 @@ public abstract class AbstractCSVLookupService extends AbstractControllerService
public static final PropertyDescriptor CSV_FILE =
new PropertyDescriptor.Builder()
- .name("csv-file")
- .displayName("CSV File")
+ .name("CSV File")
.description("Path to a CSV File in which the key value pairs can be looked up.")
.required(true)
.identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE)
@@ -76,8 +76,7 @@ public abstract class AbstractCSVLookupService extends AbstractControllerService
public static final PropertyDescriptor LOOKUP_KEY_COLUMN =
new PropertyDescriptor.Builder()
- .name("lookup-key-column")
- .displayName("Lookup Key Column")
+ .name("Lookup Key Column")
.description("The field in the CSV file that will serve as the lookup key. " +
"This is the field that will be matched against the property specified in the lookup processor.")
.required(true)
@@ -87,8 +86,7 @@ public abstract class AbstractCSVLookupService extends AbstractControllerService
public static final PropertyDescriptor IGNORE_DUPLICATES =
new PropertyDescriptor.Builder()
- .name("ignore-duplicates")
- .displayName("Ignore Duplicates")
+ .name("Ignore Duplicates")
.description("Ignore duplicate keys for records in the CSV file.")
.addValidator(StandardValidators.BOOLEAN_VALIDATOR)
.allowableValues("true", "false")
@@ -148,5 +146,12 @@ public abstract class AbstractCSVLookupService extends AbstractControllerService
this.ignoreDuplicates = context.getProperty(IGNORE_DUPLICATES).asBoolean();
this.watcher = new SynchronousFileWatcher(Paths.get(csvFile), new LastModifiedMonitor(), 30000L);
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("csv-file", CSV_FILE.getName());
+ config.renameProperty("lookup-key-column", LOOKUP_KEY_COLUMN.getName());
+ config.renameProperty("ignore-duplicates", IGNORE_DUPLICATES.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
index e13e9effb3..c1c590ea81 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
@@ -40,6 +40,7 @@ import org.apache.nifi.distributed.cache.client.DistributedMapCacheClient;
import org.apache.nifi.distributed.cache.client.Serializer;
import org.apache.nifi.distributed.cache.client.exception.DeserializationException;
import org.apache.nifi.distributed.cache.client.exception.SerializationException;
+import org.apache.nifi.migration.PropertyConfiguration;
@Tags({"lookup", "enrich", "key", "value", "map", "cache", "distributed"})
@CapabilityDescription("Allows to choose a distributed map cache client to retrieve the value associated to a key. "
@@ -63,16 +64,14 @@ public class DistributedMapCacheLookupService extends AbstractControllerService
private final Deserializer<String> valueDeserializer = new StringDeserializer();
public static final PropertyDescriptor PROP_DISTRIBUTED_CACHE_SERVICE = new PropertyDescriptor.Builder()
- .name("distributed-map-cache-service")
- .displayName("Distributed Cache Service")
+ .name("Distributed Cache Service")
.description("The Controller Service that is used to get the cached values.")
.required(true)
.identifiesControllerService(DistributedMapCacheClient.class)
.build();
public static final PropertyDescriptor CHARACTER_ENCODING = new PropertyDescriptor.Builder()
- .name("character-encoding")
- .displayName("Character Encoding")
+ .name("Character Encoding")
.description("Specifies a character encoding to use.")
.required(true)
.allowableValues(getStandardCharsetNames())
@@ -94,6 +93,12 @@ public class DistributedMapCacheLookupService extends AbstractControllerService
charset = Charset.forName(context.getProperty(CHARACTER_ENCODING).getValue());
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("distributed-map-cache-service", PROP_DISTRIBUTED_CACHE_SERVICE.getName());
+ config.renameProperty("character-encoding", CHARACTER_ENCODING.getName());
+ }
+
@Override
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
return PROPERTY_DESCRIPTORS;
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java
index 5d76857dbc..fa93c75364 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java
@@ -90,8 +90,7 @@ import static org.apache.commons.lang3.StringUtils.trimToEmpty;
})
public class RestLookupService extends AbstractControllerService implements RecordLookupService {
static final PropertyDescriptor URL = new PropertyDescriptor.Builder()
- .name("rest-lookup-url")
- .displayName("URL")
+ .name("URL")
.description("The URL for the REST endpoint. Expression language is evaluated against the lookup key/value pairs, " +
"not flowfile attributes.")
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -100,8 +99,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
static final PropertyDescriptor RECORD_READER = new PropertyDescriptor.Builder()
- .name("rest-lookup-record-reader")
- .displayName("Record Reader")
+ .name("Record Reader")
.description("The record reader to use for loading the payload and handling it as a record set.")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.identifiesControllerService(RecordReaderFactory.class)
@@ -109,8 +107,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
static final PropertyDescriptor RECORD_PATH = new PropertyDescriptor.Builder()
- .name("rest-lookup-record-path")
- .displayName("Record Path")
+ .name("Record Path")
.description("An optional record path that can be used to define where in a record to get the real data to merge " +
"into the record set to be enriched. See documentation for examples of when this might be useful.")
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -119,8 +116,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder()
- .name("rest-lookup-ssl-context-service")
- .displayName("SSL Context Service")
+ .name("SSL Context Service")
.description("The SSL Context Service used to provide client certificate information for TLS/SSL "
+ "connections.")
.required(false)
@@ -128,8 +124,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor AUTHENTICATION_STRATEGY = new PropertyDescriptor.Builder()
- .name("rest-lookup-authentication-strategy")
- .displayName("Authentication Strategy")
+ .name("Authentication Strategy")
.description("Authentication strategy to use with REST service.")
.required(true)
.allowableValues(AuthenticationStrategy.class)
@@ -137,8 +132,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor OAUTH2_ACCESS_TOKEN_PROVIDER = new PropertyDescriptor.Builder()
- .name("rest-lookup-oauth2-access-token-provider")
- .displayName("OAuth2 Access Token Provider")
+ .name("OAuth2 Access Token Provider")
.description("Enables managed retrieval of OAuth2 Bearer Token applied to HTTP requests using the Authorization Header.")
.identifiesControllerService(OAuth2AccessTokenProvider.class)
.required(true)
@@ -146,8 +140,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor PROP_BASIC_AUTH_USERNAME = new PropertyDescriptor.Builder()
- .name("rest-lookup-basic-auth-username")
- .displayName("Basic Authentication Username")
+ .name("Basic Authentication Username")
.description("The username to be used by the client to authenticate against the Remote URL. Cannot include control characters (0-31), ':', or DEL (127).")
.required(false)
.dependsOn(AUTHENTICATION_STRATEGY, AuthenticationStrategy.BASIC)
@@ -156,8 +149,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor PROP_BASIC_AUTH_PASSWORD = new PropertyDescriptor.Builder()
- .name("rest-lookup-basic-auth-password")
- .displayName("Basic Authentication Password")
+ .name("Basic Authentication Password")
.description("The password to be used by the client to authenticate against the Remote URL.")
.required(false)
.dependsOn(AUTHENTICATION_STRATEGY, AuthenticationStrategy.BASIC)
@@ -167,8 +159,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor PROP_DIGEST_AUTH = new PropertyDescriptor.Builder()
- .name("rest-lookup-digest-auth")
- .displayName("Use Digest Authentication")
+ .name("Use Digest Authentication")
.description("Whether to communicate with the website using Digest Authentication. 'Basic Authentication Username' and 'Basic Authentication Password' are used "
+ "for authentication.")
.required(false)
@@ -178,8 +169,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor PROP_CONNECT_TIMEOUT = new PropertyDescriptor.Builder()
- .name("rest-lookup-connection-timeout")
- .displayName("Connection Timeout")
+ .name("Connection Timeout")
.description("Max wait time for connection to remote service.")
.required(true)
.defaultValue("5 secs")
@@ -187,8 +177,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor PROP_READ_TIMEOUT = new PropertyDescriptor.Builder()
- .name("rest-lookup-read-timeout")
- .displayName("Read Timeout")
+ .name("Read Timeout")
.description("Max wait time for response from remote service.")
.required(true)
.defaultValue("15 secs")
@@ -196,8 +185,7 @@ public class RestLookupService extends AbstractControllerService implements Reco
.build();
public static final PropertyDescriptor RESPONSE_HANDLING_STRATEGY = new PropertyDescriptor.Builder()
- .name("rest-lookup-response-handling-strategy")
- .displayName("Response Handling Strategy")
+ .name("Response Handling Strategy")
.description("Whether to return all responses or throw errors for unsuccessful HTTP status codes.")
.required(true)
.defaultValue(ResponseHandlingStrategy.RETURNED)
@@ -399,6 +387,20 @@ public class RestLookupService extends AbstractControllerService implements Reco
if (config.isPropertySet(PROP_BASIC_AUTH_USERNAME)) {
config.setProperty(AUTHENTICATION_STRATEGY, AuthenticationStrategy.BASIC.getValue());
}
+
+ config.renameProperty("rest-lookup-url", URL.getName());
+ config.renameProperty("rest-lookup-record-reader", RECORD_READER.getName());
+ config.renameProperty("rest-lookup-record-path", RECORD_PATH.getName());
+ config.renameProperty("rest-lookup-ssl-context-service", SSL_CONTEXT_SERVICE.getName());
+ config.renameProperty("rest-lookup-authentication-strategy", AUTHENTICATION_STRATEGY.getName());
+ config.renameProperty("rest-lookup-oauth2-access-token-provider", OAUTH2_ACCESS_TOKEN_PROVIDER.getName());
+ config.renameProperty("rest-lookup-basic-auth-username", PROP_BASIC_AUTH_USERNAME.getName());
+ config.renameProperty("rest-lookup-basic-auth-password", PROP_BASIC_AUTH_PASSWORD.getName());
+ config.renameProperty("rest-lookup-digest-auth", PROP_DIGEST_AUTH.getName());
+ config.renameProperty("rest-lookup-connection-timeout", PROP_CONNECT_TIMEOUT.getName());
+ config.renameProperty("rest-lookup-read-timeout", PROP_READ_TIMEOUT.getName());
+ config.renameProperty("rest-lookup-response-handling-strategy", RESPONSE_HANDLING_STRATEGY.getName());
+ config.renameProperty(ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, PROXY_CONFIGURATION_SERVICE.getName());
}
protected void validateVerb(String method) throws LookupFailureException {
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/SimpleCsvFileLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/SimpleCsvFileLookupService.java
index 7913de4948..66194fe62e 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/SimpleCsvFileLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/SimpleCsvFileLookupService.java
@@ -41,6 +41,7 @@ import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.controller.ControllerServiceInitializationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.reporting.InitializationException;
@@ -60,8 +61,7 @@ public class SimpleCsvFileLookupService extends AbstractCSVLookupService impleme
public static final PropertyDescriptor LOOKUP_VALUE_COLUMN =
new PropertyDescriptor.Builder()
- .name("lookup-value-column")
- .displayName("Lookup Value Column")
+ .name("Lookup Value Column")
.description("Lookup value column.")
.required(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -161,6 +161,12 @@ public class SimpleCsvFileLookupService extends AbstractCSVLookupService impleme
cache = null;
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("lookup-value-column", LOOKUP_VALUE_COLUMN.getName());
+ }
+
// VisibleForTesting
boolean isCaching() {
return cache != null;
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/configuration2/CommonsConfigurationLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/configuration2/CommonsConfigurationLookupService.java
index 6f70fb3dac..c336a9fcef 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/configuration2/CommonsConfigurationLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/configuration2/CommonsConfigurationLookupService.java
@@ -33,6 +33,7 @@ import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.lookup.LookupFailureException;
import org.apache.nifi.lookup.StringLookupService;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.reporting.InitializationException;
import java.io.File;
@@ -58,8 +59,7 @@ public abstract class CommonsConfigurationLookupService<T extends FileBasedConfi
public static final PropertyDescriptor CONFIGURATION_FILE =
new PropertyDescriptor.Builder()
- .name("configuration-file")
- .displayName("Configuration File")
+ .name("Configuration File")
.description("A configuration file")
.required(true)
.identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE)
@@ -140,4 +140,8 @@ public abstract class CommonsConfigurationLookupService<T extends FileBasedConfi
return REQUIRED_KEYS;
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("configuration-file", CONFIGURATION_FILE.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/AbstractDatabaseLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/AbstractDatabaseLookupService.java
index 82c2d79f41..59ce5e01d9 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/AbstractDatabaseLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/AbstractDatabaseLookupService.java
@@ -20,6 +20,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.dbcp.DBCPService;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import java.util.List;
@@ -34,16 +35,14 @@ public class AbstractDatabaseLookupService extends AbstractControllerService {
);
static final PropertyDescriptor DBCP_SERVICE = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-dbcp-service")
- .displayName("Database Connection Pooling Service")
+ .name("Database Connection Pooling Service")
.description("The Controller Service that is used to obtain connection to database")
.required(true)
.identifiesControllerService(DBCPService.class)
.build();
static final PropertyDescriptor TABLE_NAME = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-table-name")
- .displayName("Table Name")
+ .name("Table Name")
.description("The name of the database table to be queried. Note that this may be case-sensitive depending on the database.")
.required(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -51,8 +50,7 @@ public class AbstractDatabaseLookupService extends AbstractControllerService {
.build();
static final PropertyDescriptor LOOKUP_KEY_COLUMN = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-key-column")
- .displayName("Lookup Key Column")
+ .name("Lookup Key Column")
.description("The column in the table that will serve as the lookup key. This is the column that will be matched against "
+ "the property specified in the lookup processor. Note that this may be case-sensitive depending on the database.")
.required(true)
@@ -61,8 +59,7 @@ public class AbstractDatabaseLookupService extends AbstractControllerService {
.build();
static final PropertyDescriptor CACHE_SIZE = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-cache-size")
- .displayName("Cache Size")
+ .name("Cache Size")
.description("Specifies how many lookup values/records should be cached. The cache is shared for all tables and keeps a map of lookup values to records. "
+ "Setting this property to zero means no caching will be done and the table will be queried for each lookup value in each record. If the lookup "
+ "table changes often or the most recent data must be retrieved, do not use the cache.")
@@ -73,8 +70,7 @@ public class AbstractDatabaseLookupService extends AbstractControllerService {
.build();
static final PropertyDescriptor CLEAR_CACHE_ON_ENABLED = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-clear-cache-on-enabled")
- .displayName("Clear Cache on Enabled")
+ .name("Clear Cache on Enabled")
.description("Whether to clear the cache when this service is enabled. If the Cache Size is zero then this property is ignored. Clearing the cache when the "
+ "service is enabled ensures that the service will first go to the database to get the most recent data.")
.allowableValues("true", "false")
@@ -97,6 +93,15 @@ public class AbstractDatabaseLookupService extends AbstractControllerService {
volatile String lookupKeyColumn;
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("dbrecord-lookup-dbcp-service", DBCP_SERVICE.getName());
+ config.renameProperty("dbrecord-lookup-table-name", TABLE_NAME.getName());
+ config.renameProperty("dbrecord-lookup-key-column", LOOKUP_KEY_COLUMN.getName());
+ config.renameProperty("dbrecord-lookup-cache-size", CACHE_SIZE.getName());
+ config.renameProperty("dbrecord-lookup-clear-cache-on-enabled", CLEAR_CACHE_ON_ENABLED.getName());
+ }
+
@Override
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
return properties;
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/DatabaseRecordLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/DatabaseRecordLookupService.java
index a418fcff66..d933f8c4c2 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/DatabaseRecordLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/DatabaseRecordLookupService.java
@@ -63,8 +63,7 @@ public class DatabaseRecordLookupService extends AbstractDatabaseLookupService i
private volatile Cache<Tuple<String, Object>, Record> cache;
static final PropertyDescriptor LOOKUP_VALUE_COLUMNS = new PropertyDescriptor.Builder()
- .name("dbrecord-lookup-value-columns")
- .displayName("Lookup Value Columns")
+ .name("Lookup Value Columns")
.description("A comma-delimited list of columns in the table that will be returned when the lookup key matches. Note that this may be case-sensitive depending on the database.")
.required(false)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -199,6 +198,8 @@ public class DatabaseRecordLookupService extends AbstractDatabaseLookupService i
@Override
public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("dbrecord-lookup-value-columns", LOOKUP_VALUE_COLUMNS.getName());
config.renameProperty(JdbcProperties.OLD_DEFAULT_PRECISION_PROPERTY_NAME, DEFAULT_PRECISION.getName());
config.renameProperty(JdbcProperties.OLD_DEFAULT_SCALE_PROPERTY_NAME, DEFAULT_SCALE.getName());
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/SimpleDatabaseLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/SimpleDatabaseLookupService.java
index 0c285a95f9..e90f015612 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/SimpleDatabaseLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/db/SimpleDatabaseLookupService.java
@@ -30,6 +30,7 @@ import org.apache.nifi.dbcp.DBCPService;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.lookup.LookupFailureException;
import org.apache.nifi.lookup.StringLookupService;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.util.Tuple;
@@ -52,8 +53,7 @@ public class SimpleDatabaseLookupService extends AbstractDatabaseLookupService i
static final PropertyDescriptor LOOKUP_VALUE_COLUMN =
new PropertyDescriptor.Builder()
- .name("lookup-value-column")
- .displayName("Lookup Value Column")
+ .name("Lookup Value Column")
.description("The column whose value will be returned when the Lookup value is matched")
.required(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -171,4 +171,10 @@ public class SimpleDatabaseLookupService extends AbstractDatabaseLookupService i
public Set<String> getRequiredKeys() {
return REQUIRED_KEYS;
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("lookup-value-column", LOOKUP_VALUE_COLUMN.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/maxmind/IPLookupService.java b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/maxmind/IPLookupService.java
index e6a7f7a3e6..9bdf0c0ba2 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/maxmind/IPLookupService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/maxmind/IPLookupService.java
@@ -41,6 +41,7 @@ import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.lookup.LookupFailureException;
import org.apache.nifi.lookup.RecordLookupService;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.serialization.record.MapRecord;
import org.apache.nifi.serialization.record.Record;
import org.apache.nifi.util.StopWatch;
@@ -83,16 +84,14 @@ public class IPLookupService extends AbstractControllerService implements Record
static final long REFRESH_THRESHOLD_MS = 5 * 60 * 1000;
static final PropertyDescriptor GEO_DATABASE_FILE = new PropertyDescriptor.Builder()
- .name("database-file")
- .displayName("MaxMind Database File")
+ .name("MaxMind Database File")
.description("Path to Maxmind IP Enrichment Database File")
.required(true)
.identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
static final PropertyDescriptor LOOKUP_CITY = new PropertyDescriptor.Builder()
- .name("lookup-city")
- .displayName("Lookup Geo Enrichment")
+ .name("Lookup Geo Enrichment")
.description("Specifies whether or not information about the geographic information, such as cities, corresponding to the IP address should be returned")
.allowableValues("true", "false")
.defaultValue("true")
@@ -100,8 +99,7 @@ public class IPLookupService extends AbstractControllerService implements Record
.required(true)
.build();
static final PropertyDescriptor LOOKUP_ISP = new PropertyDescriptor.Builder()
- .name("lookup-isp")
- .displayName("Lookup ISP")
+ .name("Lookup ISP")
.description("Specifies whether or not information about the Information Service Provider corresponding to the IP address should be returned")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.allowableValues("true", "false")
@@ -109,8 +107,7 @@ public class IPLookupService extends AbstractControllerService implements Record
.required(true)
.build();
static final PropertyDescriptor LOOKUP_DOMAIN = new PropertyDescriptor.Builder()
- .name("lookup-domain")
- .displayName("Lookup Domain Name")
+ .name("Lookup Domain Name")
.description("Specifies whether or not information about the Domain Name corresponding to the IP address should be returned. "
+ "If true, the lookup will contain second-level domain information, such as foo.com but will not contain bar.foo.com")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
@@ -119,8 +116,7 @@ public class IPLookupService extends AbstractControllerService implements Record
.required(true)
.build();
static final PropertyDescriptor LOOKUP_CONNECTION_TYPE = new PropertyDescriptor.Builder()
- .name("lookup-connection-type")
- .displayName("Lookup Connection Type")
+ .name("Lookup Connection Type")
.description("Specifies whether or not information about the Connection Type corresponding to the IP address should be returned. "
+ "If true, the lookup will contain a 'connectionType' field that (if populated) will contain a value of 'Dialup', 'Cable/DSL', 'Corporate', or 'Cellular'")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
@@ -129,8 +125,7 @@ public class IPLookupService extends AbstractControllerService implements Record
.required(true)
.build();
static final PropertyDescriptor LOOKUP_ANONYMOUS_IP_INFO = new PropertyDescriptor.Builder()
- .name("lookup-anonymous-ip")
- .displayName("Lookup Anonymous IP Information")
+ .name("Lookup Anonymous IP Information")
.description("Specifies whether or not information about whether or not the IP address belongs to an anonymous network should be returned.")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.allowableValues("true", "false")
@@ -240,6 +235,16 @@ public class IPLookupService extends AbstractControllerService implements Record
}
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("database-file", GEO_DATABASE_FILE.getName());
+ config.renameProperty("lookup-city", LOOKUP_CITY.getName());
+ config.renameProperty("lookup-isp", LOOKUP_ISP.getName());
+ config.renameProperty("lookup-domain", LOOKUP_DOMAIN.getName());
+ config.renameProperty("lookup-connection-type", LOOKUP_CONNECTION_TYPE.getName());
+ config.renameProperty("lookup-anonymous-ip", LOOKUP_ANONYMOUS_IP_INFO.getName());
+ }
+
private Optional<Record> doLookup(final DatabaseReader databaseReader, final Map<String, Object> coordinates) throws LookupFailureException, InvalidDatabaseException {
if (coordinates.get(IP_KEY) == null) {
return Optional.empty();
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java b/nifi-extension-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java
index 2e9768ea55..14b40d83b4 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java
@@ -49,6 +49,7 @@ import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.proxy.ProxyConfiguration;
+import org.apache.nifi.proxy.ProxyConfigurationService;
import org.apache.nifi.proxy.ProxySpec;
import org.apache.nifi.ssl.SSLContextProvider;
@@ -271,6 +272,7 @@ public class StandardOauth2AccessTokenProvider extends AbstractControllerService
propertyConfiguration.renameProperty("audience", AUDIENCE.getName());
propertyConfiguration.renameProperty("refresh-window", REFRESH_WINDOW.getName());
propertyConfiguration.renameProperty("ssl-context-service", SSL_CONTEXT_SERVICE.getName());
+ propertyConfiguration.renameProperty(ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, ProxyConfigurationService.PROXY_CONFIGURATION_SERVICE.getName());
}
@Override
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-api/src/main/java/org/apache/nifi/proxy/ProxyConfigurationService.java b/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-api/src/main/java/org/apache/nifi/proxy/ProxyConfigurationService.java
index 026f050de6..18190d05df 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-api/src/main/java/org/apache/nifi/proxy/ProxyConfigurationService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-api/src/main/java/org/apache/nifi/proxy/ProxyConfigurationService.java
@@ -18,15 +18,17 @@ package org.apache.nifi.proxy;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.controller.ControllerService;
+import org.apache.nifi.migration.PropertyConfiguration;
/**
* Provides configurations to access a Proxy server.
*/
public interface ProxyConfigurationService extends ControllerService {
+ String OBSOLETE_PROXY_CONFIGURATION_SERVICE = "proxy-configuration-service";
+
PropertyDescriptor PROXY_CONFIGURATION_SERVICE = new PropertyDescriptor.Builder()
- .name("proxy-configuration-service")
- .displayName("Proxy Configuration Service")
+ .name("Proxy Configuration Service")
.description("Specifies the Proxy Configuration Controller Service to proxy network requests.")
.identifiesControllerService(ProxyConfigurationService.class)
.required(false)
@@ -40,4 +42,8 @@ public interface ProxyConfigurationService extends ControllerService {
*/
ProxyConfiguration getConfiguration();
+ @Override
+ default void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty(OBSOLETE_PROXY_CONFIGURATION_SERVICE, PROXY_CONFIGURATION_SERVICE.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-bundle/nifi-proxy-configuration/src/main/java/org/apache/nifi/proxy/StandardProxyConfigurationService.java b/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-bundle/nifi-proxy-configuration/src/main/java/org/apache/nifi/proxy/StandardProxyConfigurationService.java
index 4fdf6f40f6..89a72bd733 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-bundle/nifi-proxy-configuration/src/main/java/org/apache/nifi/proxy/StandardProxyConfigurationService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-proxy-configuration-bundle/nifi-proxy-configuration/src/main/java/org/apache/nifi/proxy/StandardProxyConfigurationService.java
@@ -25,6 +25,7 @@ import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import java.net.Proxy;
@@ -38,8 +39,7 @@ import java.util.List;
public class StandardProxyConfigurationService extends AbstractControllerService implements ProxyConfigurationService {
public static final PropertyDescriptor PROXY_TYPE = new PropertyDescriptor.Builder()
- .name("proxy-type")
- .displayName("Proxy Type")
+ .name("Proxy Type")
.description("Proxy type.")
.allowableValues(Proxy.Type.values())
.defaultValue(Proxy.Type.DIRECT.name())
@@ -47,8 +47,7 @@ public class StandardProxyConfigurationService extends AbstractControllerService
.build();
public static final PropertyDescriptor SOCKS_VERSION = new PropertyDescriptor.Builder()
- .name("socks-version")
- .displayName("SOCKS Version")
+ .name("SOCKS Version")
.description("SOCKS Protocol Version")
.allowableValues(SocksVersion.values())
.defaultValue(SocksVersion.SOCKS5.name())
@@ -57,32 +56,28 @@ public class StandardProxyConfigurationService extends AbstractControllerService
.build();
public static final PropertyDescriptor PROXY_SERVER_HOST = new PropertyDescriptor.Builder()
- .name("proxy-server-host")
- .displayName("Proxy Server Host")
+ .name("Proxy Server Host")
.description("Proxy server hostname or ip-address.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
public static final PropertyDescriptor PROXY_SERVER_PORT = new PropertyDescriptor.Builder()
- .name("proxy-server-port")
- .displayName("Proxy Server Port")
+ .name("Proxy Server Port")
.description("Proxy server port number.")
.addValidator(StandardValidators.PORT_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
public static final PropertyDescriptor PROXY_USER_NAME = new PropertyDescriptor.Builder()
- .name("proxy-user-name")
- .displayName("Proxy User Name")
+ .name("Proxy User Name")
.description("The name of the proxy client for user authentication.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
public static final PropertyDescriptor PROXY_USER_PASSWORD = new PropertyDescriptor.Builder()
- .name("proxy-user-password")
- .displayName("Proxy User Password")
+ .name("Proxy User Password")
.description("The password of the proxy client for user authentication.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -141,4 +136,15 @@ public class StandardProxyConfigurationService extends AbstractControllerService
public ProxyConfiguration getConfiguration() {
return configuration;
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ ProxyConfigurationService.super.migrateProperties(config);
+ config.renameProperty("proxy-type", PROXY_TYPE.getName());
+ config.renameProperty("socks-version", SOCKS_VERSION.getName());
+ config.renameProperty("proxy-server-host", PROXY_SERVER_HOST.getName());
+ config.renameProperty("proxy-server-port", PROXY_SERVER_PORT.getName());
+ config.renameProperty("proxy-user-name", PROXY_USER_NAME.getName());
+ config.renameProperty("proxy-user-password", PROXY_USER_PASSWORD.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services-shared/src/main/java/org/apache/nifi/schema/inference/SchemaInferenceUtil.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services-shared/src/main/java/org/apache/nifi/schema/inference/SchemaInferenceUtil.java
index 9097ed6e29..631e0a6ccb 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services-shared/src/main/java/org/apache/nifi/schema/inference/SchemaInferenceUtil.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services-shared/src/main/java/org/apache/nifi/schema/inference/SchemaInferenceUtil.java
@@ -30,14 +30,15 @@ public class SchemaInferenceUtil {
public static final AllowableValue INFER_SCHEMA = new AllowableValue("infer-schema", "Infer Schema",
"The Schema of the data will be inferred automatically when the data is read. See component Usage and Additional Details for information about how the schema is inferred.");
+ public static final String OBSOLETE_SCHEMA_CACHE = "schema-inference-cache";
+
public static final PropertyDescriptor SCHEMA_CACHE = new Builder()
- .name("schema-inference-cache")
- .displayName("Schema Inference Cache")
- .description("Specifies a Schema Cache to use when inferring the schema. If not populated, the schema will be inferred each time. " +
- "However, if a cache is specified, the cache will first be consulted and if the applicable schema can be found, it will be used instead of inferring the schema.")
- .required(false)
- .identifiesControllerService(RecordSchemaCacheService.class)
- .build();
+ .name("Schema Inference Cache")
+ .description("Specifies a Schema Cache to use when inferring the schema. If not populated, the schema will be inferred each time. " +
+ "However, if a cache is specified, the cache will first be consulted and if the applicable schema can be found, it will be used instead of inferring the schema.")
+ .required(false)
+ .identifiesControllerService(RecordSchemaCacheService.class)
+ .build();
public static <T> SchemaAccessStrategy getSchemaAccessStrategy(final String strategy, final PropertyContext context, final ComponentLog logger,
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroReader.java
index a7e9847d1d..3b9d0193af 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroReader.java
@@ -28,6 +28,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
import org.apache.nifi.schema.access.SchemaNotFoundException;
@@ -52,8 +53,7 @@ public class AvroReader extends SchemaRegistryService implements RecordReaderFac
"Use Embedded Avro Schema", "The FlowFile has the Avro Schema embedded within the content, and this schema will be used.");
static final PropertyDescriptor CACHE_SIZE = new PropertyDescriptor.Builder()
- .name("cache-size")
- .displayName("Cache Size")
+ .name("Cache Size")
.description("Specifies how many Schemas should be cached")
.addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
.defaultValue("1000")
@@ -77,6 +77,12 @@ public class AvroReader extends SchemaRegistryService implements RecordReaderFac
.build(schemaText -> new Schema.Parser().parse(schemaText));
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("cache-size", CACHE_SIZE.getName());
+ }
+
@Override
protected List<AllowableValue> getSchemaAccessStrategyValues() {
final List<AllowableValue> allowableValues = new ArrayList<>(super.getSchemaAccessStrategyValues());
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroRecordSetWriter.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroRecordSetWriter.java
index 3093ba7ebf..e02e6257e2 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroRecordSetWriter.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/avro/AvroRecordSetWriter.java
@@ -34,6 +34,7 @@ import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaField;
@@ -69,8 +70,7 @@ public class AvroRecordSetWriter extends SchemaRegistryRecordSetWriter implement
}
private static final PropertyDescriptor COMPRESSION_FORMAT = new Builder()
- .name("compression-format")
- .displayName("Compression Format")
+ .name("Compression Format")
.description("Compression type to use when writing Avro files. Default is None.")
.allowableValues(CodecType.values())
.defaultValue(CodecType.NONE.toString())
@@ -78,8 +78,7 @@ public class AvroRecordSetWriter extends SchemaRegistryRecordSetWriter implement
.build();
static final PropertyDescriptor ENCODER_POOL_SIZE = new Builder()
- .name("encoder-pool-size")
- .displayName("Encoder Pool Size")
+ .name("Encoder Pool Size")
.description("Avro Writers require the use of an Encoder. Creation of Encoders is expensive, but once created, they can be reused. This property controls the maximum number of Encoders that" +
" can be pooled and reused. Setting this value too small can result in degraded performance, but setting it higher can result in more heap being used. This property is ignored if the" +
" Avro Writer is configured with a Schema Write Strategy of 'Embed Avro Schema'.")
@@ -93,8 +92,7 @@ public class AvroRecordSetWriter extends SchemaRegistryRecordSetWriter implement
"The FlowFile will have the Avro schema embedded into the content, as is typical with Avro");
static final PropertyDescriptor CACHE_SIZE = new PropertyDescriptor.Builder()
- .name("cache-size")
- .displayName("Cache Size")
+ .name("Cache Size")
.description("Specifies how many Schemas should be cached")
.addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
.defaultValue("1000")
@@ -155,6 +153,14 @@ public class AvroRecordSetWriter extends SchemaRegistryRecordSetWriter implement
}
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("compression-format", COMPRESSION_FORMAT.getName());
+ config.renameProperty("encoder-pool-size", ENCODER_POOL_SIZE.getName());
+ config.renameProperty("cache-size", CACHE_SIZE.getName());
+ }
+
private CodecFactory getCodecFactory(String property) {
CodecType type = CodecType.valueOf(property);
return switch (type) {
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/cef/CEFReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/cef/CEFReader.java
index 9df024f867..9fac9caf29 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/cef/CEFReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/cef/CEFReader.java
@@ -29,6 +29,7 @@ import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
import org.apache.nifi.schema.access.SchemaNotFoundException;
@@ -50,6 +51,7 @@ import java.util.Set;
import java.util.stream.Collectors;
import static org.apache.nifi.schema.access.SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY;
+import static org.apache.nifi.schema.inference.SchemaInferenceUtil.OBSOLETE_SCHEMA_CACHE;
import static org.apache.nifi.schema.inference.SchemaInferenceUtil.SCHEMA_CACHE;
@Tags({"cef", "record", "reader", "parser"})
@@ -68,8 +70,7 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
"In these cases it is suggested to use \"" + CUSTOM_EXTENSIONS_AS_STRINGS.getDisplayName() + "\" Inference Strategy or predefined schema.");
static final PropertyDescriptor INFERENCE_STRATEGY = new PropertyDescriptor.Builder()
- .name("inference-strategy")
- .displayName("Inference Strategy")
+ .name("Inference Strategy")
.description("Defines the set of fields should be included in the schema and the way the fields are being interpreted.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.required(true)
@@ -79,8 +80,7 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
.build();
static final PropertyDescriptor RAW_FIELD = new PropertyDescriptor.Builder()
- .name("raw-message-field")
- .displayName("Raw Message Field")
+ .name("Raw Message Field")
.description("If set the raw message will be added to the record using the property value as field name. This is not the same as the \"rawEvent\" extension field!")
.addValidator(new ValidateRawField())
.required(false)
@@ -88,8 +88,7 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
.build();
static final PropertyDescriptor INVALID_FIELD = new PropertyDescriptor.Builder()
- .name("invalid-message-field")
- .displayName("Invalid Field")
+ .name("Invalid Field")
.description("Used when a line in the FlowFile cannot be parsed by the CEF parser. " +
"If set, instead of failing to process the FlowFile, a record is being added with one field. " +
"This record contains one field with the name specified by the property and the raw message as value.")
@@ -99,8 +98,7 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
.build();
static final PropertyDescriptor DATETIME_REPRESENTATION = new PropertyDescriptor.Builder()
- .name("datetime-representation")
- .displayName("DateTime Locale")
+ .name("DateTime Locale")
.description("The IETF BCP 47 representation of the Locale to be used when parsing date " +
"fields with long or short month names (e.g. may <en-US> vs. mai. <fr-FR>. The default" +
"value is generally safe. Only change if having issues parsing CEF messages")
@@ -111,8 +109,7 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
.build();
static final PropertyDescriptor ACCEPT_EMPTY_EXTENSIONS = new PropertyDescriptor.Builder()
- .name("accept-empty-extensions")
- .displayName("Accept empty extensions")
+ .name("Accept Empty Extensions")
.description("If set to true, empty extensions will be accepted and will be associated to a null value.")
.addValidator(StandardValidators.BOOLEAN_VALIDATOR)
.required(true)
@@ -215,6 +212,17 @@ public final class CEFReader extends SchemaRegistryService implements RecordRead
return new CEFRecordReader(in, schema, parser, logger, parcefoneLocale, rawMessageField, invalidField, includeCustomExtensions, acceptEmptyExtensions);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("inference-strategy", INFERENCE_STRATEGY.getName());
+ config.renameProperty("raw-message-field", RAW_FIELD.getName());
+ config.renameProperty("invalid-message-field", INVALID_FIELD.getName());
+ config.renameProperty("datetime-representation", DATETIME_REPRESENTATION.getName());
+ config.renameProperty("accept-empty-extensions", ACCEPT_EMPTY_EXTENSIONS.getName());
+ config.renameProperty(OBSOLETE_SCHEMA_CACHE, SCHEMA_CACHE.getName());
+ }
+
private static class ValidateRawField implements Validator {
private final Set<String> headerFields = CEFSchemaUtil.getHeaderFields().stream().map(r -> r.getFieldName()).collect(Collectors.toSet());
private final Set<String> extensionFields = CEFSchemaUtil.getExtensionTypeMapping().keySet().stream().flatMap(fields -> fields.stream()).collect(Collectors.toSet());
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java
index 4976ef6cdf..4b19021d78 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java
@@ -77,8 +77,7 @@ public class CSVReader extends SchemaRegistryService implements RecordReaderFact
+ "if the data is not fully RFC-4180 compliant.");
public static final PropertyDescriptor CSV_PARSER = new PropertyDescriptor.Builder()
- .name("csv-reader-csv-parser")
- .displayName("CSV Parser")
+ .name("CSV Parser")
.description("Specifies which parser to use to read CSV records. NOTE: Different parsers may support different subsets of functionality "
+ "and may also exhibit different levels of performance.")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
@@ -192,6 +191,7 @@ public class CSVReader extends SchemaRegistryService implements RecordReaderFact
@Override
public void migrateProperties(PropertyConfiguration config) {
super.migrateProperties(config);
+ config.renameProperty("csv-reader-csv-parser", CSV_PARSER.getName());
config.renameProperty(CSVUtils.OLD_FIRST_LINE_IS_HEADER_PROPERTY_NAME, CSVUtils.FIRST_LINE_IS_HEADER.getName());
config.renameProperty(CSVUtils.OLD_IGNORE_CSV_HEADER_PROPERTY_NAME, CSVUtils.IGNORE_CSV_HEADER.getName());
config.renameProperty(CSVUtils.OLD_CHARSET_PROPERTY_NAME, CSVUtils.CHARSET.getName());
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVRecordSetWriter.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVRecordSetWriter.java
index f167e77757..cd7bc66aa5 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVRecordSetWriter.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVRecordSetWriter.java
@@ -57,8 +57,7 @@ public class CSVRecordSetWriter extends DateTimeTextRecordSetWriter implements R
+ "may cause errors if FastCSV doesn't handle the property settings correctly (such as 'Quote Mode'), but otherwise may process the output as expected even "
+ "if the data is not fully RFC-4180 compliant.");
public static final PropertyDescriptor CSV_WRITER = new PropertyDescriptor.Builder()
- .name("csv-writer")
- .displayName("CSV Writer")
+ .name("CSV Writer")
.description("Specifies which writer implementation to use to write CSV records. NOTE: Different writers may support different subsets of functionality "
+ "and may also exhibit different levels of performance.")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
@@ -134,6 +133,7 @@ public class CSVRecordSetWriter extends DateTimeTextRecordSetWriter implements R
@Override
public void migrateProperties(PropertyConfiguration config) {
super.migrateProperties(config);
+ config.renameProperty("csv-writer", CSV_WRITER.getName());
config.renameProperty(CSVUtils.OLD_CHARSET_PROPERTY_NAME, CSVUtils.CHARSET.getName());
}
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/grok/GrokReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/grok/GrokReader.java
index 4ba99e2d34..b17778394e 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/grok/GrokReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/grok/GrokReader.java
@@ -38,6 +38,7 @@ import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
import org.apache.nifi.schema.access.SchemaField;
@@ -106,8 +107,7 @@ public class GrokReader extends SchemaRegistryService implements RecordReaderFac
);
static final PropertyDescriptor GROK_PATTERNS = new PropertyDescriptor.Builder()
- .name("Grok Pattern File")
- .displayName("Grok Patterns")
+ .name("Grok Patterns")
.description("Grok Patterns to use for parsing logs. If not specified, a built-in default Pattern file "
+ "will be used. If specified, all patterns specified will override the default patterns. See the Controller Service's "
+ "Additional Details for a list of pre-defined patterns.")
@@ -117,8 +117,7 @@ public class GrokReader extends SchemaRegistryService implements RecordReaderFac
.build();
static final PropertyDescriptor GROK_EXPRESSION = new PropertyDescriptor.Builder()
- .name("Grok Expression")
- .displayName("Grok Expressions")
+ .name("Grok Expressions")
.description("Specifies the format of a log line in Grok format. This allows the Record Reader to understand how to parse each log line. "
+ "The property supports one or more Grok expressions. The Reader attempts to parse input lines according to the configured order of the expressions."
+ "If a line in the log file does not match any expressions, the line will be assumed to belong to the previous log message."
@@ -130,8 +129,7 @@ public class GrokReader extends SchemaRegistryService implements RecordReaderFac
.build();
static final PropertyDescriptor NO_MATCH_BEHAVIOR = new PropertyDescriptor.Builder()
- .name("no-match-behavior")
- .displayName("No Match Behavior")
+ .name("No Match Behavior")
.description("If a line of text is encountered and it does not match the given Grok Expression, and it is not part of a stack trace, "
+ "this property specifies how the text should be processed.")
.allowableValues(APPEND_TO_PREVIOUS_MESSAGE, SKIP_LINE, RAW_LINE)
@@ -322,6 +320,14 @@ public class GrokReader extends SchemaRegistryService implements RecordReaderFac
return new GrokRecordReader(in, groks, schema, recordSchemaFromGrok, noMatchStrategy);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("Grok Pattern File", GROK_PATTERNS.getName());
+ config.renameProperty("Grok Expression", GROK_EXPRESSION.getName());
+ config.renameProperty("no-match-behavior", NO_MATCH_BEHAVIOR.getName());
+ }
+
private Reader getDefaultPatterns() throws IOException {
final InputStream inputStream = getClass().getResourceAsStream(DEFAULT_PATTERN_NAME);
if (inputStream == null) {
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonRecordSetWriter.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonRecordSetWriter.java
index 41d9b2d7cc..2d5720dd45 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonRecordSetWriter.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonRecordSetWriter.java
@@ -76,8 +76,7 @@ public class JsonRecordSetWriter extends DateTimeTextRecordSetWriter implements
public static final String COMPRESSION_FORMAT_ZSTD = "zstd";
public static final PropertyDescriptor SUPPRESS_NULLS = new PropertyDescriptor.Builder()
- .name("suppress-nulls")
- .displayName("Suppress Null Values")
+ .name("Suppress Null Values")
.description("Specifies how the writer should handle a null field")
.allowableValues(NEVER_SUPPRESS, ALWAYS_SUPPRESS, SUPPRESS_MISSING)
.defaultValue(NEVER_SUPPRESS.getValue())
@@ -100,8 +99,7 @@ public class JsonRecordSetWriter extends DateTimeTextRecordSetWriter implements
.required(true)
.build();
public static final PropertyDescriptor OUTPUT_GROUPING = new PropertyDescriptor.Builder()
- .name("output-grouping")
- .displayName("Output Grouping")
+ .name("Output Grouping")
.description("Specifies how the writer should output the JSON records (as an array or one object per line, e.g.) Note that if 'One Line Per Object' is "
+ "selected, then Pretty Print JSON must be false.")
.allowableValues(OUTPUT_ARRAY, OUTPUT_ONELINE)
@@ -109,8 +107,7 @@ public class JsonRecordSetWriter extends DateTimeTextRecordSetWriter implements
.required(true)
.build();
public static final PropertyDescriptor COMPRESSION_FORMAT = new PropertyDescriptor.Builder()
- .name("compression-format")
- .displayName("Compression Format")
+ .name("Compression Format")
.description("The compression format to use. Valid values are: GZIP, BZIP2, ZSTD, XZ-LZMA2, LZMA, Snappy, and Snappy Framed")
.allowableValues(COMPRESSION_FORMAT_NONE, COMPRESSION_FORMAT_GZIP, COMPRESSION_FORMAT_BZIP2, COMPRESSION_FORMAT_XZ_LZMA2,
COMPRESSION_FORMAT_SNAPPY, COMPRESSION_FORMAT_SNAPPY_FRAMED, COMPRESSION_FORMAT_ZSTD)
@@ -118,8 +115,7 @@ public class JsonRecordSetWriter extends DateTimeTextRecordSetWriter implements
.required(true)
.build();
public static final PropertyDescriptor COMPRESSION_LEVEL = new PropertyDescriptor.Builder()
- .name("compression-level")
- .displayName("Compression Level")
+ .name("Compression Level")
.description("The compression level to use; this is valid only when using GZIP compression. A lower value results in faster processing "
+ "but less compression; a value of 0 indicates no compression but simply archiving")
.defaultValue("1")
@@ -156,6 +152,11 @@ public class JsonRecordSetWriter extends DateTimeTextRecordSetWriter implements
if (!propertyConfiguration.hasProperty(ALLOW_SCIENTIFIC_NOTATION.getName())) {
propertyConfiguration.setProperty(ALLOW_SCIENTIFIC_NOTATION, "true");
}
+
+ propertyConfiguration.renameProperty("suppress-nulls", SUPPRESS_NULLS.getName());
+ propertyConfiguration.renameProperty("output-grouping", OUTPUT_GROUPING.getName());
+ propertyConfiguration.renameProperty("compression-format", COMPRESSION_FORMAT.getName());
+ propertyConfiguration.renameProperty("compression-level", COMPRESSION_LEVEL.getName());
}
@Override
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java
index ff3088806b..ff8dc3fb37 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java
@@ -28,6 +28,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.DataUnit;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
@@ -56,6 +57,7 @@ import static org.apache.nifi.schema.access.SchemaAccessUtils.SCHEMA_NAME_PROPER
import static org.apache.nifi.schema.access.SchemaAccessUtils.SCHEMA_REFERENCE_READER_PROPERTY;
import static org.apache.nifi.schema.access.SchemaAccessUtils.SCHEMA_TEXT_PROPERTY;
import static org.apache.nifi.schema.inference.SchemaInferenceUtil.INFER_SCHEMA;
+import static org.apache.nifi.schema.inference.SchemaInferenceUtil.OBSOLETE_SCHEMA_CACHE;
import static org.apache.nifi.schema.inference.SchemaInferenceUtil.SCHEMA_CACHE;
@Tags({"json", "tree", "record", "reader", "parser"})
@@ -77,8 +79,7 @@ public class JsonTreeReader extends SchemaRegistryService implements RecordReade
protected volatile TokenParserFactory tokenParserFactory;
public static final PropertyDescriptor STARTING_FIELD_STRATEGY = new PropertyDescriptor.Builder()
- .name("starting-field-strategy")
- .displayName("Starting Field Strategy")
+ .name("Starting Field Strategy")
.description("Start processing from the root node or from a specified nested node.")
.required(true)
.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
@@ -88,8 +89,7 @@ public class JsonTreeReader extends SchemaRegistryService implements RecordReade
public static final PropertyDescriptor STARTING_FIELD_NAME = new PropertyDescriptor.Builder()
- .name("starting-field-name")
- .displayName("Starting Field Name")
+ .name("Starting Field Name")
.description("Skips forward to the given nested JSON field (array or object) to begin processing.")
.required(false)
.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
@@ -97,8 +97,7 @@ public class JsonTreeReader extends SchemaRegistryService implements RecordReade
.build();
public static final PropertyDescriptor SCHEMA_APPLICATION_STRATEGY = new PropertyDescriptor.Builder()
- .name("schema-application-strategy")
- .displayName("Schema Application Strategy")
+ .name("Schema Application Strategy")
.description("Specifies whether the schema is defined for the whole JSON or for the selected part starting from \"Starting Field Name\".")
.required(true)
.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
@@ -137,6 +136,15 @@ public class JsonTreeReader extends SchemaRegistryService implements RecordReade
this.tokenParserFactory = createTokenParserFactory(context);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("starting-field-strategy", STARTING_FIELD_STRATEGY.getName());
+ config.renameProperty("starting-field-name", STARTING_FIELD_NAME.getName());
+ config.renameProperty("schema-application-strategy", SCHEMA_APPLICATION_STRATEGY.getName());
+ config.renameProperty(OBSOLETE_SCHEMA_CACHE, SCHEMA_CACHE.getName());
+ }
+
protected TokenParserFactory createTokenParserFactory(final ConfigurationContext context) {
return new JsonParserFactory(buildStreamReadConstraints(context), isAllowCommentsEnabled(context));
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/VolatileSchemaCache.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/VolatileSchemaCache.java
index cf6c0afd07..5263feb239 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/VolatileSchemaCache.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/VolatileSchemaCache.java
@@ -26,6 +26,7 @@ import org.apache.nifi.components.PropertyDescriptor.Builder;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.serialization.RecordSchemaCacheService;
import org.apache.nifi.serialization.record.DataType;
@@ -48,8 +49,7 @@ import java.util.UUID;
public class VolatileSchemaCache extends AbstractControllerService implements RecordSchemaCacheService {
static final PropertyDescriptor MAX_SIZE = new Builder()
- .name("max-cache-size")
- .displayName("Maximum Cache Size")
+ .name("Maximum Cache Size")
.description("The maximum number of Schemas to cache.")
.required(true)
.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
@@ -113,6 +113,11 @@ public class VolatileSchemaCache extends AbstractControllerService implements Re
return Optional.ofNullable(cachedSchema);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("max-cache-size", MAX_SIZE.getName());
+ }
+
protected String createIdentifier(final RecordSchema schema) {
final MessageDigest digest;
try {
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/Syslog5424Reader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/Syslog5424Reader.java
index 744c3ddfa1..51e9474cc1 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/Syslog5424Reader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/Syslog5424Reader.java
@@ -25,6 +25,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
import org.apache.nifi.schema.access.SchemaField;
@@ -74,8 +75,7 @@ public class Syslog5424Reader extends SchemaRegistryService implements RecordRea
.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
.build();
public static final PropertyDescriptor ADD_RAW = new PropertyDescriptor.Builder()
- .displayName("Raw message")
- .name("syslog-5424-reader-raw-message")
+ .name("Raw Message")
.description("If true, the record will have a " + RAW_MESSAGE_NAME + " field containing the raw message")
.required(true)
.defaultValue("false")
@@ -104,6 +104,12 @@ public class Syslog5424Reader extends SchemaRegistryService implements RecordRea
recordSchema = createRecordSchema();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("syslog-5424-reader-raw-message", ADD_RAW.getName());
+ }
+
@Override
protected List<AllowableValue> getSchemaAccessStrategyValues() {
final List<AllowableValue> allowableValues = new ArrayList<>();
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/SyslogReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/SyslogReader.java
index 00730884f5..18b2d87157 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/SyslogReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/syslog/SyslogReader.java
@@ -25,6 +25,7 @@ import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
import org.apache.nifi.schema.access.SchemaField;
@@ -72,8 +73,7 @@ public class SyslogReader extends SchemaRegistryService implements RecordReaderF
.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
.build();
public static final PropertyDescriptor ADD_RAW = new PropertyDescriptor.Builder()
- .displayName("Raw message")
- .name("syslog-5424-reader-raw-message")
+ .name("Raw Message")
.description("If true, the record will have a " + RAW_MESSAGE_NAME + " field containing the raw message")
.required(true)
.defaultValue("false")
@@ -101,6 +101,12 @@ public class SyslogReader extends SchemaRegistryService implements RecordReaderF
recordSchema = createRecordSchema();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration propertyConfiguration) {
+ super.migrateProperties(propertyConfiguration);
+ propertyConfiguration.renameProperty("syslog-5424-reader-raw-message", ADD_RAW.getName());
+ }
+
@Override
protected List<AllowableValue> getSchemaAccessStrategyValues() {
final List<AllowableValue> allowableValues = new ArrayList<>();
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLReader.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLReader.java
index 7d6584822b..4c25ee6366 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLReader.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLReader.java
@@ -26,6 +26,7 @@ import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaAccessStrategy;
@@ -54,6 +55,8 @@ import java.util.Map;
import java.util.function.Supplier;
import static org.apache.nifi.schema.inference.SchemaInferenceUtil.INFER_SCHEMA;
+import static org.apache.nifi.schema.inference.SchemaInferenceUtil.OBSOLETE_SCHEMA_CACHE;
+import static org.apache.nifi.schema.inference.SchemaInferenceUtil.SCHEMA_CACHE;
@Tags({"xml", "record", "reader", "parser"})
@CapabilityDescription("Reads XML content and creates Record objects. Records are expected in the second level of " +
@@ -71,8 +74,7 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
+ "If the attribute is missing or its value is anything other than 'true' or 'false', then an Exception will be thrown and no records will be parsed.");
public static final PropertyDescriptor RECORD_FORMAT = new PropertyDescriptor.Builder()
- .name("record_format")
- .displayName("Expect Records as Array")
+ .name("Expect Records as Array")
.description("This property defines whether the reader expects a FlowFile to consist of a single Record or a series of Records with a \"wrapper element\". Because XML does not "
+ "provide for a way to read a series of XML documents from a stream directly, it is common to combine many XML documents by concatenating them and then wrapping the entire "
+ "XML blob with a \"wrapper element\". This property dictates whether the reader expects a FlowFile to consist of a single Record or a series of Records with a \"wrapper element\" "
@@ -84,8 +86,7 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
.build();
public static final PropertyDescriptor ATTRIBUTE_PREFIX = new PropertyDescriptor.Builder()
- .name("attribute_prefix")
- .displayName("Attribute Prefix")
+ .name("Attribute Prefix")
.description("If this property is set, the name of attributes will be prepended with a prefix when they are added to a record.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
@@ -93,8 +94,7 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
.build();
public static final PropertyDescriptor CONTENT_FIELD_NAME = new PropertyDescriptor.Builder()
- .name("content_field_name")
- .displayName("Field Name for Content")
+ .name("Field Name for Content")
.description("If tags with content (e. g. <field>content</field>) are defined as nested records in the schema, " +
"the name of the tag will be used as name for the record and the value of this property will be used as name for the field. " +
"If tags with content shall be parsed together with attributes (e. g. <field attribute=\"123\">content</field>), " +
@@ -108,8 +108,7 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
.build();
public static final PropertyDescriptor PARSE_XML_ATTRIBUTES = new PropertyDescriptor.Builder()
- .name("parse_xml_attributes")
- .displayName("Parse XML Attributes")
+ .name("Parse XML Attributes")
.description("When 'Schema Access Strategy' is 'Infer Schema' and this property is 'true' then XML attributes are parsed and " +
"added to the record as new fields. When the schema is inferred but this property is 'false', " +
"XML attributes and their values are ignored.")
@@ -133,6 +132,16 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
this.timestampFormat = context.getProperty(DateTimeUtils.TIMESTAMP_FORMAT).getValue();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("record_format", RECORD_FORMAT.getName());
+ config.renameProperty("attribute_prefix", ATTRIBUTE_PREFIX.getName());
+ config.renameProperty("content_field_name", CONTENT_FIELD_NAME.getName());
+ config.renameProperty("parse_xml_attributes", PARSE_XML_ATTRIBUTES.getName());
+ config.renameProperty(OBSOLETE_SCHEMA_CACHE, SCHEMA_CACHE.getName());
+ }
+
@Override
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
final List<PropertyDescriptor> properties = new ArrayList<>(super.getSupportedPropertyDescriptors());
@@ -157,12 +166,12 @@ public class XMLReader extends SchemaRegistryService implements RecordReaderFact
@Override
protected SchemaAccessStrategy getSchemaAccessStrategy(final String strategy, final SchemaRegistry schemaRegistry, final PropertyContext context) {
- final RecordSourceFactory<XmlNode> sourceFactory = (variables, contentStream) -> {
- String contentFieldName = trim(context.getProperty(CONTENT_FIELD_NAME).evaluateAttributeExpressions(variables).getValue());
- contentFieldName = (contentFieldName == null) ? "value" : contentFieldName;
- final String attributePrefix = trim(context.getProperty(ATTRIBUTE_PREFIX).evaluateAttributeExpressions(variables).getValue());
- return new XmlRecordSource(contentStream, contentFieldName, isMultipleRecords(context, variables), parseXmlAttributes, attributePrefix);
- };
+ final RecordSourceFactory<XmlNode> sourceFactory = (variables, contentStream) -> {
+ String contentFieldName = trim(context.getProperty(CONTENT_FIELD_NAME).evaluateAttributeExpressions(variables).getValue());
+ contentFieldName = (contentFieldName == null) ? "value" : contentFieldName;
+ final String attributePrefix = trim(context.getProperty(ATTRIBUTE_PREFIX).evaluateAttributeExpressions(variables).getValue());
+ return new XmlRecordSource(contentStream, contentFieldName, isMultipleRecords(context, variables), parseXmlAttributes, attributePrefix);
+ };
final Supplier<SchemaInferenceEngine<XmlNode>> schemaInference = () -> new XmlSchemaInference(new TimeValueInference(dateFormat, timeFormat, timestampFormat));
return SchemaInferenceUtil.getSchemaAccessStrategy(strategy, context, getLogger(), sourceFactory, schemaInference,
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
index 1645b02219..cc9ef30ae9 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
@@ -26,6 +26,7 @@ import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaNotFoundException;
import org.apache.nifi.serialization.DateTimeTextRecordSetWriter;
@@ -62,8 +63,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
"The elements of an array will not be wrapped");
public static final PropertyDescriptor SUPPRESS_NULLS = new PropertyDescriptor.Builder()
- .name("suppress_nulls")
- .displayName("Suppress Null Values")
+ .name("Suppress Null Values")
.description("Specifies how the writer should handle a null field")
.allowableValues(NEVER_SUPPRESS, ALWAYS_SUPPRESS, SUPPRESS_MISSING)
.defaultValue(NEVER_SUPPRESS.getValue())
@@ -71,8 +71,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor PRETTY_PRINT_XML = new PropertyDescriptor.Builder()
- .name("pretty_print_xml")
- .displayName("Pretty Print XML")
+ .name("Pretty Print XML")
.description("Specifies whether or not the XML should be pretty printed")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.allowableValues("true", "false")
@@ -81,8 +80,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor OMIT_XML_DECLARATION = new PropertyDescriptor.Builder()
- .name("omit_xml_declaration")
- .displayName("Omit XML Declaration")
+ .name("Omit XML Declaration")
.description("Specifies whether or not to include XML declaration")
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
.allowableValues("true", "false")
@@ -91,8 +89,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor ROOT_TAG_NAME = new PropertyDescriptor.Builder()
- .name("root_tag_name")
- .displayName("Name of Root Tag")
+ .name("Name of Root Tag")
.description("Specifies the name of the XML root tag wrapping the record set. This property has to be defined if " +
"the writer is supposed to write multiple records in a single FlowFile.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -101,8 +98,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor RECORD_TAG_NAME = new PropertyDescriptor.Builder()
- .name("record_tag_name")
- .displayName("Name of Record Tag")
+ .name("Name of Record Tag")
.description("Specifies the name of the XML record tag wrapping the record fields. If this is not set, the writer " +
"will use the record name in the schema.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -111,8 +107,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor ARRAY_WRAPPING = new PropertyDescriptor.Builder()
- .name("array_wrapping")
- .displayName("Wrap Elements of Arrays")
+ .name("Wrap Elements of Arrays")
.description("Specifies how the writer wraps elements of fields of type array")
.allowableValues(USE_PROPERTY_AS_WRAPPER, USE_PROPERTY_FOR_ELEMENTS, NO_WRAPPING)
.defaultValue(NO_WRAPPING.getValue())
@@ -120,8 +115,7 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
.build();
public static final PropertyDescriptor ARRAY_TAG_NAME = new PropertyDescriptor.Builder()
- .name("array_tag_name")
- .displayName("Array Tag Name")
+ .name("Array Tag Name")
.description("Name of the tag used by property \"Wrap Elements of Arrays\" to write arrays")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.NONE)
@@ -219,4 +213,16 @@ public class XMLRecordSetWriter extends DateTimeTextRecordSetWriter implements R
out, prettyPrint, omitDeclaration, nullSuppressionEnum, arrayWrappingEnum, arrayTagName, rootTagName, recordTagName, charSet,
getDateFormat().orElse(null), getTimeFormat().orElse(null), getTimestampFormat().orElse(null));
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("suppress_nulls", SUPPRESS_NULLS.getName());
+ config.renameProperty("pretty_print_xml", PRETTY_PRINT_XML.getName());
+ config.renameProperty("omit_xml_declaration", OMIT_XML_DECLARATION.getName());
+ config.renameProperty("root_tag_name", ROOT_TAG_NAME.getName());
+ config.renameProperty("record_tag_name", RECORD_TAG_NAME.getName());
+ config.renameProperty("array_wrapping", ARRAY_WRAPPING.getName());
+ config.renameProperty("array_tag_name", ARRAY_TAG_NAME.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordReaderProcessor.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordReaderProcessor.java
index 09e8829d44..7695e0d48c 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordReaderProcessor.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordReaderProcessor.java
@@ -35,8 +35,7 @@ public class TestRecordReaderProcessor extends AbstractProcessor {
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
List<PropertyDescriptor> propDescs = new ArrayList<>();
propDescs.add(new PropertyDescriptor.Builder()
- .name("record-reader")
- .displayName("Record Reader")
+ .name("Record Reader")
.description("Specifies the Controller Service to use for reading incoming data")
.identifiesControllerService(RecordReaderFactory.class)
.required(true)
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordSetWriterProcessor.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordSetWriterProcessor.java
index e7ac605b84..f488f7e813 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordSetWriterProcessor.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/serialization/TestRecordSetWriterProcessor.java
@@ -35,8 +35,7 @@ public class TestRecordSetWriterProcessor extends AbstractProcessor {
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
List<PropertyDescriptor> propDescs = new ArrayList<>();
propDescs.add(new PropertyDescriptor.Builder()
- .name("record-writer")
- .displayName("Record Writer")
+ .name("Record Writer")
.description("Specifies the Controller Service to use for writing out the records")
.identifiesControllerService(RecordSetWriterFactory.class)
.required(true)
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLRecordSetWriter.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLRecordSetWriter.java
index 677405084e..d24cd43a10 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLRecordSetWriter.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestXMLRecordSetWriter.java
@@ -223,8 +223,8 @@ public class TestXMLRecordSetWriter {
runner.disableControllerService(writer);
runner.removeProperty(writer, XMLRecordSetWriter.ARRAY_TAG_NAME);
IllegalStateException e = assertThrows(IllegalStateException.class, () -> runner.enableControllerService(writer));
- assertTrue(e.getMessage().contains("array_tag_name")
- && e.getMessage().contains("array_wrapping")
+ assertTrue(e.getMessage().contains(XMLRecordSetWriter.ARRAY_TAG_NAME.getName())
+ && e.getMessage().contains(XMLRecordSetWriter.ARRAY_WRAPPING.getName())
&& e.getMessage().endsWith("has to be set."));
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-api/src/main/java/org/apache/nifi/record/sink/RecordSinkService.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-api/src/main/java/org/apache/nifi/record/sink/RecordSinkService.java
index 7c5f974fe1..6e540720df 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-api/src/main/java/org/apache/nifi/record/sink/RecordSinkService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-api/src/main/java/org/apache/nifi/record/sink/RecordSinkService.java
@@ -20,6 +20,7 @@ import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.controller.ControllerService;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.serialization.RecordSetWriterFactory;
import org.apache.nifi.serialization.WriteResult;
import org.apache.nifi.serialization.record.RecordSet;
@@ -38,8 +39,7 @@ public interface RecordSinkService extends ControllerService {
* A standard Record Writer property for use in RecordSinkService implementations
*/
PropertyDescriptor RECORD_WRITER_FACTORY = new PropertyDescriptor.Builder()
- .name("record-sink-record-writer")
- .displayName("Record Writer")
+ .name("Record Writer")
.description("Specifies the Controller Service to use for writing out the records.")
.identifiesControllerService(RecordSetWriterFactory.class)
.required(true)
@@ -61,4 +61,9 @@ public interface RecordSinkService extends ControllerService {
* and any appropriate data related to possibly different RecordSets. The default implementation is a no-op
*/
default void reset() { }
+
+ @Override
+ default void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("record-sink-record-writer", RECORD_WRITER_FACTORY.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/EmailRecordSink.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/EmailRecordSink.java
index cd9a9db24f..698adac0e2 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/EmailRecordSink.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/EmailRecordSink.java
@@ -34,6 +34,7 @@ import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.schema.access.SchemaNotFoundException;
@@ -61,40 +62,35 @@ public class EmailRecordSink extends AbstractControllerService implements Record
private static final String RFC822 = "Comma separated sequence of addresses following RFC822 syntax.";
public static final PropertyDescriptor FROM = new PropertyDescriptor.Builder()
- .name("from")
- .displayName("From")
+ .name("From")
.description("Specifies the Email address to use as the sender. " + RFC822)
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
public static final PropertyDescriptor TO = new PropertyDescriptor.Builder()
- .name("to")
- .displayName("To")
+ .name("To")
.description("The recipients to include in the To-Line of the email. " + RFC822)
.required(false)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
public static final PropertyDescriptor CC = new PropertyDescriptor.Builder()
- .name("cc")
- .displayName("CC")
+ .name("CC")
.description("The recipients to include in the CC-Line of the email. " + RFC822)
.required(false)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
public static final PropertyDescriptor BCC = new PropertyDescriptor.Builder()
- .name("bcc")
- .displayName("BCC")
+ .name("BCC")
.description("The recipients to include in the BCC-Line of the email. " + RFC822)
.required(false)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
public static final PropertyDescriptor SUBJECT = new PropertyDescriptor.Builder()
- .name("subject")
- .displayName("Subject")
+ .name("Subject")
.description("The email subject")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -102,15 +98,13 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
public static final PropertyDescriptor SMTP_HOSTNAME = new PropertyDescriptor.Builder()
- .name("smtp-hostname")
- .displayName("SMTP Hostname")
+ .name("SMTP Hostname")
.description("The hostname of the SMTP Server that is used to send Email Notifications")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.required(true)
.build();
public static final PropertyDescriptor SMTP_PORT = new PropertyDescriptor.Builder()
- .name("smtp-port")
- .displayName("SMTP Port")
+ .name("SMTP Port")
.description("The Port used for SMTP communications")
.required(true)
.defaultValue("25")
@@ -118,8 +112,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.addValidator(StandardValidators.PORT_VALIDATOR)
.build();
public static final PropertyDescriptor SMTP_AUTH = new PropertyDescriptor.Builder()
- .name("smtp-auth")
- .displayName("SMTP Auth")
+ .name("SMTP Auth")
.description("Flag indicating whether authentication should be used")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -127,8 +120,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.defaultValue("true")
.build();
public static final PropertyDescriptor SMTP_USERNAME = new PropertyDescriptor.Builder()
- .name("smtp-username")
- .displayName("SMTP Username")
+ .name("SMTP Username")
.description("Username for the SMTP account")
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -136,8 +128,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.dependsOn(SMTP_AUTH, "true")
.build();
public static final PropertyDescriptor SMTP_PASSWORD = new PropertyDescriptor.Builder()
- .name("smtp-password")
- .displayName("SMTP Password")
+ .name("SMTP Password")
.description("Password for the SMTP account")
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -146,8 +137,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.dependsOn(SMTP_AUTH, "true")
.build();
public static final PropertyDescriptor SMTP_STARTTLS = new PropertyDescriptor.Builder()
- .name("smtp-starttls")
- .displayName("SMTP STARTTLS")
+ .name("SMTP STARTTLS")
.description("Flag indicating whether STARTTLS should be enabled. "
+ "If the server does not support STARTTLS, the connection continues without the use of TLS")
.required(true)
@@ -156,8 +146,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.defaultValue("false")
.build();
public static final PropertyDescriptor SMTP_SSL = new PropertyDescriptor.Builder()
- .name("smtp-ssl")
- .displayName("SMTP SSL")
+ .name("SMTP SSL")
.description("Flag indicating whether SSL should be enabled")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -165,8 +154,7 @@ public class EmailRecordSink extends AbstractControllerService implements Record
.defaultValue("false")
.build();
public static final PropertyDescriptor HEADER_XMAILER = new PropertyDescriptor.Builder()
- .name("smtp-xmailer-header")
- .displayName("SMTP X-Mailer Header")
+ .name("SMTP X-Mailer Header")
.description("X-Mailer used in the header of the outgoing email")
.required(true)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
@@ -258,6 +246,24 @@ public class EmailRecordSink extends AbstractControllerService implements Record
return writeResult;
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
+ config.renameProperty("from", FROM.getName());
+ config.renameProperty("to", TO.getName());
+ config.renameProperty("cc", CC.getName());
+ config.renameProperty("bcc", BCC.getName());
+ config.renameProperty("subject", SUBJECT.getName());
+ config.renameProperty("smtp-hostname", SMTP_HOSTNAME.getName());
+ config.renameProperty("smtp-port", SMTP_PORT.getName());
+ config.renameProperty("smtp-auth", SMTP_AUTH.getName());
+ config.renameProperty("smtp-username", SMTP_USERNAME.getName());
+ config.renameProperty("smtp-password", SMTP_PASSWORD.getName());
+ config.renameProperty("smtp-starttls", SMTP_STARTTLS.getName());
+ config.renameProperty("smtp-ssl", SMTP_SSL.getName());
+ config.renameProperty("smtp-xmailer-header", HEADER_XMAILER.getName());
+ }
+
/**
* Wrapper for static method {@link Transport#send(Message)} to add testability of this class.
*
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/LoggingRecordSink.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/LoggingRecordSink.java
index f6ed72e83f..0331a1fe13 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/LoggingRecordSink.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/LoggingRecordSink.java
@@ -24,6 +24,7 @@ import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.logging.ComponentLog;
import org.apache.nifi.logging.LogLevel;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.schema.access.SchemaNotFoundException;
import org.apache.nifi.serialization.RecordSetWriter;
@@ -42,8 +43,7 @@ import java.util.Map;
public class LoggingRecordSink extends AbstractControllerService implements RecordSinkService {
public static final PropertyDescriptor LOG_LEVEL = new PropertyDescriptor.Builder()
- .name("logsink-log-level")
- .displayName("Log Level")
+ .name("Log Level")
.required(true)
.description("The Log Level at which to log records (INFO, DEBUG, e.g.)")
.allowableValues(LogLevel.values())
@@ -92,4 +92,10 @@ public class LoggingRecordSink extends AbstractControllerService implements Reco
}
return writeResult;
}
+
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
+ config.renameProperty("logsink-log-level", LOG_LEVEL.getName());
+ }
}
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/event/UDPEventRecordSink.java b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/event/UDPEventRecordSink.java
index 383c94eb20..54e9cfee42 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/event/UDPEventRecordSink.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-record-sink-service-bundle/nifi-record-sink-service/src/main/java/org/apache/nifi/record/sink/event/UDPEventRecordSink.java
@@ -27,6 +27,7 @@ import org.apache.nifi.event.transport.EventSender;
import org.apache.nifi.event.transport.configuration.TransportProtocol;
import org.apache.nifi.event.transport.netty.ByteArrayNettyEventSenderFactory;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.record.sink.RecordSinkService;
import org.apache.nifi.schema.access.SchemaNotFoundException;
@@ -51,8 +52,7 @@ import java.util.Map;
public class UDPEventRecordSink extends AbstractControllerService implements RecordSinkService {
public static final PropertyDescriptor HOSTNAME = new PropertyDescriptor.Builder()
- .name("hostname")
- .displayName("Hostname")
+ .name("Hostname")
.description("Destination hostname or IP address")
.required(true)
.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
@@ -60,8 +60,7 @@ public class UDPEventRecordSink extends AbstractControllerService implements Rec
.build();
public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder()
- .name("port")
- .displayName("Port")
+ .name("Port")
.description("Destination port number")
.required(true)
.addValidator(StandardValidators.PORT_VALIDATOR)
@@ -69,8 +68,7 @@ public class UDPEventRecordSink extends AbstractControllerService implements Rec
.build();
public static final PropertyDescriptor SENDER_THREADS = new PropertyDescriptor.Builder()
- .name("sender-threads")
- .displayName("Sender Threads")
+ .name("Sender Threads")
.description("Number of worker threads allocated for handling socket communication")
.required(true)
.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
@@ -150,6 +148,14 @@ public class UDPEventRecordSink extends AbstractControllerService implements Rec
return WriteResult.of(recordCount, writeAttributes);
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ RecordSinkService.super.migrateProperties(config);
+ config.renameProperty("hostname", HOSTNAME.getName());
+ config.renameProperty("port", PORT.getName());
+ config.renameProperty("sender-threads", SENDER_THREADS.getName());
+ }
+
/**
* Send record and reset stream for subsequent records
*
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardRestrictedSSLContextService.java b/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardRestrictedSSLContextService.java
index dc9a14873f..b2c13779aa 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardRestrictedSSLContextService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardRestrictedSSLContextService.java
@@ -17,12 +17,12 @@
package org.apache.nifi.ssl;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.security.util.TlsPlatform;
@@ -40,8 +40,7 @@ import org.apache.nifi.security.util.TlsPlatform;
public class StandardRestrictedSSLContextService extends StandardSSLContextService implements RestrictedSSLContextService {
public static final PropertyDescriptor RESTRICTED_SSL_ALGORITHM = new PropertyDescriptor.Builder()
- .name("SSL Protocol")
- .displayName("TLS Protocol")
+ .name("TLS Protocol")
.defaultValue(TLS_PROTOCOL)
.required(false)
.allowableValues(getRestrictedProtocolAllowableValues())
@@ -50,24 +49,19 @@ public class StandardRestrictedSSLContextService extends StandardSSLContextServi
.sensitive(false)
.build();
- private static final List<PropertyDescriptor> properties;
-
- static {
- List<PropertyDescriptor> props = new ArrayList<>();
- props.add(KEYSTORE);
- props.add(KEYSTORE_PASSWORD);
- props.add(KEY_PASSWORD);
- props.add(KEYSTORE_TYPE);
- props.add(TRUSTSTORE);
- props.add(TRUSTSTORE_PASSWORD);
- props.add(TRUSTSTORE_TYPE);
- props.add(RESTRICTED_SSL_ALGORITHM);
- properties = Collections.unmodifiableList(props);
- }
+ private static final List<PropertyDescriptor> PROPERTY_DESCRIPTORS = List.of(
+ KEYSTORE,
+ KEYSTORE_PASSWORD,
+ KEY_PASSWORD,
+ KEYSTORE_TYPE,
+ TRUSTSTORE,
+ TRUSTSTORE_PASSWORD,
+ TRUSTSTORE_TYPE,
+ RESTRICTED_SSL_ALGORITHM);
@Override
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
- return properties;
+ return PROPERTY_DESCRIPTORS;
}
@Override
@@ -75,6 +69,12 @@ public class StandardRestrictedSSLContextService extends StandardSSLContextServi
return configContext.getProperty(RESTRICTED_SSL_ALGORITHM).getValue();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ super.migrateProperties(config);
+ config.renameProperty("SSL Protocol", RESTRICTED_SSL_ALGORITHM.getName());
+ }
+
private static AllowableValue[] getRestrictedProtocolAllowableValues() {
final List<AllowableValue> allowableValues = new ArrayList<>();
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java b/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
index 527bd65d55..92d93dd67f 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
@@ -31,6 +31,7 @@ import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.controller.ConfigurationContext;
import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.reporting.InitializationException;
@@ -122,8 +123,7 @@ public class StandardSSLContextService extends AbstractControllerService impleme
.sensitive(true)
.build();
static final PropertyDescriptor KEY_PASSWORD = new PropertyDescriptor.Builder()
- .name("key-password")
- .displayName("Key Password")
+ .name("Key Password")
.description("The password for the key. If this is not specified, but the Keystore Filename, Password, and Type are specified, "
+ "then the Keystore Password will be assumed to be the same as the Key Password.")
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -131,8 +131,7 @@ public class StandardSSLContextService extends AbstractControllerService impleme
.required(false)
.build();
public static final PropertyDescriptor SSL_ALGORITHM = new PropertyDescriptor.Builder()
- .name("SSL Protocol")
- .displayName("TLS Protocol")
+ .name("TLS Protocol")
.defaultValue(TLS_PROTOCOL)
.required(false)
.allowableValues(getProtocolAllowableValues())
@@ -183,6 +182,12 @@ public class StandardSSLContextService extends AbstractControllerService impleme
resetValidationCache();
}
+ @Override
+ public void migrateProperties(PropertyConfiguration config) {
+ config.renameProperty("key-password", KEY_PASSWORD.getName());
+ config.renameProperty("SSL Protocol", SSL_ALGORITHM.getName());
+ }
+
@Override
protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
return PROPERTY_DESCRIPTORS;
diff --git a/nifi-extension-bundles/nifi-standard-services/nifi-web-client-provider-bundle/nifi-web-client-provider-service/src/main/java/org/apache/nifi/web/client/provider/service/StandardWebClientServiceProvider.java b/nifi-extension-bundles/nifi-standard-services/nifi-web-client-provider-bundle/nifi-web-client-provider-service/src/main/java/org/apache/nifi/web/client/provider/service/StandardWebClientServiceProvider.java
index 85dd3cd506..b438e94718 100644
--- a/nifi-extension-bundles/nifi-standard-services/nifi-web-client-provider-bundle/nifi-web-client-provider-service/src/main/java/org/apache/nifi/web/client/provider/service/StandardWebClientServiceProvider.java
+++ b/nifi-extension-bundles/nifi-standard-services/nifi-web-client-provider-bundle/nifi-web-client-provider-service/src/main/java/org/apache/nifi/web/client/provider/service/StandardWebClientServiceProvider.java
@@ -123,6 +123,7 @@ public class StandardWebClientServiceProvider extends AbstractControllerService
propertyConfiguration.renameProperty("write-timeout", WRITE_TIMEOUT.getName());
propertyConfiguration.renameProperty("redirect-handling-strategy", REDIRECT_HANDLING_STRATEGY.getName());
propertyConfiguration.renameProperty("ssl-context-service", SSL_CONTEXT_SERVICE.getName());
+ propertyConfiguration.renameProperty(ProxyConfigurationService.OBSOLETE_PROXY_CONFIGURATION_SERVICE, ProxyConfigurationService.PROXY_CONFIGURATION_SERVICE.getName());
}
@OnEnabled