Class FlowDifferenceFilters

java.lang.Object
org.apache.nifi.util.FlowDifferenceFilters

public class FlowDifferenceFilters extends Object
  • Field Details

    • FILTER_PUBLIC_PORT_NAME_CHANGES

      public static Predicate<FlowDifference> 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

      public static Predicate<FlowDifference> 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 consider
      localGroup - a mapping of the local Process Group
      flowManager - the Flow Manager
      Returns:
      true if the change is an environment-specific change, false otherwise
    • 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

      private static boolean isRegistryUrlChange(FlowDifference difference)
    • isPublicPortNameChange

      public static boolean isPublicPortNameChange(FlowDifference fd)
    • isAddedOrRemovedRemotePort

      public static boolean isAddedOrRemovedRemotePort(FlowDifference fd)
    • isNewZIndexLabelConfigWithDefaultValue

      private static boolean isNewZIndexLabelConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager)
    • isNewZIndexConnectionConfigWithDefaultValue

      private static boolean isNewZIndexConnectionConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager)
    • isNewRetryConfigWithDefaultValue

      private static boolean isNewRetryConfigWithDefaultValue(FlowDifference fd, FlowManager flowManager)
    • isNewPropertyWithDefaultValue

      public static boolean isNewPropertyWithDefaultValue(FlowDifference fd, FlowManager flowManager)
    • isNewPropertyWithDefaultValue

      private static boolean isNewPropertyWithDefaultValue(FlowDifference fd, ComponentNode componentNode)
    • isScheduledStateNew

      public static boolean isScheduledStateNew(FlowDifference fd)
    • isLocalScheduleStateChange

      public static boolean isLocalScheduleStateChange(FlowDifference fd)
      Returns:
      true if 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

      public static boolean isRpgUrlChange(FlowDifference flowDifference)
    • 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

      private static boolean isPropertyPresent(ComponentNode componentNode, FlowDifference difference)
    • 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 group
      processor - the source processor
      relationship - the relationship
      Returns:
      true if such a connection exists, false otherwise.
    • isParameterContextChange

      private static boolean isParameterContextChange(FlowDifference flowDifference)
    • isLogFileSuffixChange

      private static boolean isLogFileSuffixChange(FlowDifference flowDifference)