Package org.apache.nifi.util
Class FlowDifferenceFilters
java.lang.Object
org.apache.nifi.util.FlowDifferenceFilters
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Predicate<FlowDifference> Predicate that returns true if the difference is NOT a remote port being added, and false if it is.static Predicate<FlowDifference> Predicate that returns true if the difference is NOT a name change on a public port (i.e. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ComponentNodegetComponent(FlowManager flowManager, org.apache.nifi.flow.ComponentType componentType, String componentId) private static booleanhasConnection(org.apache.nifi.flow.VersionedProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessor processor, String relationship) Determines whether or not the given Process Group has a Connection whose source is the given Processor and that contains the given relationshipstatic booleanstatic booleanisEnvironmentalChange(FlowDifference difference, org.apache.nifi.flow.VersionedProcessGroup localGroup, FlowManager flowManager) Determines whether or not the Flow Difference depicts an environmental change.static booleanprivate static booleanisLogFileSuffixChange(FlowDifference flowDifference) private static booleanisNewPropertyWithDefaultValue(FlowDifference fd, ComponentNode componentNode) static booleanisNewPropertyWithDefaultValue(FlowDifference fd, FlowManager flowManager) static booleanisNewRelationshipAutoTerminatedAndDefaulted(FlowDifference fd, org.apache.nifi.flow.VersionedProcessGroup processGroup, FlowManager flowManager) private static booleanisNewRetryConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager) private static booleanisNewZIndexConnectionConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager) private static booleanisNewZIndexLabelConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager) private static booleanisParameterContextChange(FlowDifference flowDifference) static booleanisPropertyMissingFromGhostComponent(FlowDifference difference, FlowManager flowManager) If a property is removed from a ghosted component, we may want to ignore it.private static booleanisPropertyPresent(ComponentNode componentNode, FlowDifference difference) static booleanprivate static booleanisRegistryUrlChange(FlowDifference difference) static booleanisRpgUrlChange(FlowDifference flowDifference) static booleanprivate static booleanisSensitivePropertyDueToGhosting(FlowDifference difference, FlowManager flowManager) private static <T> TreplaceNull(T value, T replacement)
-
Field Details
-
FILTER_PUBLIC_PORT_NAME_CHANGES
Predicate that returns true if the difference is NOT a name change on a public port (i.e. VersionedPort that allows remote access). -
FILTER_ADDED_REMOVED_REMOTE_PORTS
Predicate that returns true if the difference is NOT a remote port being added, and false if it is.
-
-
Constructor Details
-
FlowDifferenceFilters
public FlowDifferenceFilters()
-
-
Method Details
-
isEnvironmentalChange
public static boolean isEnvironmentalChange(FlowDifference difference, org.apache.nifi.flow.VersionedProcessGroup localGroup, FlowManager flowManager) Determines whether or not the Flow Difference depicts an environmental change. I.e., a change that is expected to happen from environment to environment, and which should be considered a "local modification" to a dataflow after a flow has been imported from a flow registry- Parameters:
difference- the Flow Difference to considerlocalGroup- a mapping of the local Process GroupflowManager- the Flow Manager- Returns:
trueif the change is an environment-specific change,falseotherwise
-
isSensitivePropertyDueToGhosting
private static boolean isSensitivePropertyDueToGhosting(FlowDifference difference, FlowManager flowManager) -
getComponent
private static ComponentNode getComponent(FlowManager flowManager, org.apache.nifi.flow.ComponentType componentType, String componentId) -
isRegistryUrlChange
-
isPublicPortNameChange
-
isAddedOrRemovedRemotePort
-
isNewZIndexLabelConfigWithDefaultValue
private static boolean isNewZIndexLabelConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager) -
isNewZIndexConnectionConfigWithDefaultValue
private static boolean isNewZIndexConnectionConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager) -
isNewRetryConfigWithDefaultValue
-
isNewPropertyWithDefaultValue
-
isNewPropertyWithDefaultValue
private static boolean isNewPropertyWithDefaultValue(FlowDifference fd, ComponentNode componentNode) -
isScheduledStateNew
-
isLocalScheduleStateChange
- Returns:
trueif the Flow Difference shows a processor/port transitioning between stopped/running or a controller service transitioning between enabled/disabled. These are a normal part of the flow lifecycle and don't represent changes to the flow itself.
-
isRpgUrlChange
-
isNewRelationshipAutoTerminatedAndDefaulted
public static boolean isNewRelationshipAutoTerminatedAndDefaulted(FlowDifference fd, org.apache.nifi.flow.VersionedProcessGroup processGroup, FlowManager flowManager) -
replaceNull
private static <T> T replaceNull(T value, T replacement) -
isPropertyMissingFromGhostComponent
public static boolean isPropertyMissingFromGhostComponent(FlowDifference difference, FlowManager flowManager) If a property is removed from a ghosted component, we may want to ignore it. This is because all properties will be considered sensitive for a ghosted component and as a result, the property map may not be populated with its property value, resulting in an indication that the property is missing when it is not. -
isPropertyPresent
-
hasConnection
private static boolean hasConnection(org.apache.nifi.flow.VersionedProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessor processor, String relationship) Determines whether or not the given Process Group has a Connection whose source is the given Processor and that contains the given relationship- Parameters:
processGroup- the process groupprocessor- the source processorrelationship- the relationship- Returns:
trueif such a connection exists,falseotherwise.
-
isParameterContextChange
-
isLogFileSuffixChange
-