NIFI-12525: Added property migration for the removed Consumer Hostname property in ConsumeAzureEventHub

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8171.
This commit is contained in:
Peter Turcsanyi 2023-12-19 19:52:11 +01:00 committed by Pierre Villard
parent ca4ee2407c
commit 02d563eefc
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,7 @@ import org.apache.nifi.expression.ExpressionLanguageScope;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;
import org.apache.nifi.logging.ComponentLog;
import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessSession;
@ -329,6 +330,11 @@ public class ConsumeAzureEventHub extends AbstractSessionFactoryProcessor implem
return isRecordReaderSet && isRecordWriterSet ? RECORD_RELATIONSHIPS : RELATIONSHIPS;
}
@Override
public void migrateProperties(final PropertyConfiguration config) {
config.removeProperty("event-hub-consumer-hostname");
}
@Override
protected Collection<ValidationResult> customValidate(ValidationContext validationContext) {
final List<ValidationResult> results = new ArrayList<>();