Class StandardVersionedComponentSynchronizer
java.lang.Object
org.apache.nifi.flow.synchronization.StandardVersionedComponentSynchronizer
- All Implemented Interfaces:
VersionedComponentSynchronizer
public class StandardVersionedComponentSynchronizer
extends Object
implements VersionedComponentSynchronizer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectableAdditionTrackerprivate final VersionedFlowSynchronizationContextstatic final Stringstatic final Stringprivate static final org.slf4j.Loggerprivate FlowSynchronizationOptionsprivate static final String -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprivate ConnectionaddConnection(ProcessGroup destinationGroup, org.apache.nifi.flow.VersionedConnection proposed, ComponentIdGenerator componentIdGenerator) private ControllerServiceNodeaddControllerService(ProcessGroup destination, org.apache.nifi.flow.VersionedControllerService proposed, ComponentIdGenerator componentIdGenerator, ProcessGroup topLevelGroup) private FlowAnalysisRuleNodeaddFlowAnalysisRule(org.apache.nifi.flow.VersionedFlowAnalysisRule flowAnalysisRule) private FunneladdFunnel(ProcessGroup destination, org.apache.nifi.flow.VersionedFunnel proposed, ComponentIdGenerator componentIdGenerator) private PortaddInputPort(ProcessGroup destination, org.apache.nifi.flow.VersionedPort proposed, ComponentIdGenerator componentIdGenerator, String temporaryName) private LabeladdLabel(ProcessGroup destination, org.apache.nifi.flow.VersionedLabel proposed, ComponentIdGenerator componentIdGenerator) private voidaddMissingConfiguration(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, ParameterContext currentParameterContext, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) private PortaddOutputPort(ProcessGroup destination, org.apache.nifi.flow.VersionedPort proposed, ComponentIdGenerator componentIdGenerator, String temporaryName) private ProcessGroupaddProcessGroup(ProcessGroup destination, org.apache.nifi.flow.VersionedProcessGroup proposed, ComponentIdGenerator componentIdGenerator, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup) private ProcessorNodeaddProcessor(ProcessGroup destination, org.apache.nifi.flow.VersionedProcessor proposed, ComponentIdGenerator componentIdGenerator, ProcessGroup topLevelGroup) private RemoteProcessGroupaddRemoteProcessGroup(ProcessGroup destination, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ComponentIdGenerator componentIdGenerator) private ReportingTaskNodeaddReportingTask(org.apache.nifi.flow.VersionedReportingTask reportingTask) addVersionedComponentsToProcessGroup(ProcessGroup group, VersionedComponentAdditions additions, FlowSynchronizationOptions options) Adds versioned components to the specified Process Group.private voidbleedOut(ProcessGroup processGroup, long timeout, FlowSynchronizationOptions synchronizationOptions) private voidcollectValueAndReferences(ParameterContext parameterContext, Map<String, StandardVersionedComponentSynchronizer.ParameterValueAndReferences> valueAndRef) private <T extends Connectable>
Map<String, T> componentsById(ProcessGroup group, Function<ProcessGroup, Collection<T>> retrieveComponents) componentsById(ProcessGroup group, Function<ProcessGroup, Collection<T>> retrieveComponents, Function<T, String> retrieveId, Function<T, Optional<String>> retrieveVersionedComponentId) private booleanconnectionsEmpty(Collection<Connection> connections) private voidcreateMissingParameterProvider(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, String parameterProviderId, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) private ParametercreateParameter(String contextId, org.apache.nifi.flow.VersionedParameter versionedParameter) private ParameterContextcreateParameterContext(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, String parameterContextId, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) private ParameterContextcreateParameterContextWithoutReferences(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext) createParameterMap(Collection<org.apache.nifi.flow.VersionedParameter> versionedParameters) private StringcreateParameterReferenceId(String parameterContextName, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) private RemoteProcessGroupPortDescriptorcreatePortDescriptor(org.apache.nifi.flow.VersionedRemoteGroupPort proposed, ComponentIdGenerator componentIdGenerator, String rpgId) private static Stringdecrypt(String value, PropertyDecryptor decryptor) private StringdetermineRegistryId(org.apache.nifi.flow.VersionedFlowCoordinates coordinates) private voidfindAllConnections(Set<org.apache.nifi.flow.VersionedConnection> connections, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups, Map<String, org.apache.nifi.flow.VersionedConnection> map) private voidfindAllControllerServices(Set<org.apache.nifi.flow.VersionedControllerService> controllerServices, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups, Map<String, org.apache.nifi.flow.VersionedControllerService> map) private voidfindAllProcessors(Set<org.apache.nifi.flow.VersionedProcessor> processors, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups, Map<String, org.apache.nifi.flow.VersionedProcessor> map) private voidfindUpstreamComponents(Connection connection, Set<Connectable> components) private voidfindUpstreamComponents(org.apache.nifi.flow.VersionedConnection connection, Set<Connectable> components) private StringgenerateTemporaryPortName(org.apache.nifi.flow.VersionedPort proposedPort) private ConnectablegetConnectable(ProcessGroup group, org.apache.nifi.flow.ConnectableComponent connectableComponent) private ConnectablegetConnectable(ProcessGroup group, org.apache.nifi.flow.ConnectableComponent connectableComponent, Function<org.apache.nifi.flow.ConnectableComponent, String> idFunction) getDecryptedProperties(Map<String, String> properties) private ParameterContextgetParameterContextByName(String contextName) private ParameterProviderConfigurationgetParameterProviderConfiguration(org.apache.nifi.flow.VersionedParameterContext context) getPropertyValues(ComponentNode componentNode) private StringgetPublicPortFinalName(PublicPort publicPort, String proposedFinalName) private RemoteGroupPortgetRpgInputPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator) private RemoteGroupPortgetRpgOutputPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator) private RemoteGroupPortgetRpgPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator, Function<String, RemoteGroupPort> portLookup, Set<RemoteGroupPort> ports) getSensitiveDynamicPropertyNames(ComponentNode componentNode, Map<String, String> proposedProperties, Collection<org.apache.nifi.flow.VersionedPropertyDescriptor> proposedDescriptors) private StringgetServiceInstanceId(String serviceVersionedComponentId, ProcessGroup group) private FunnelgetTemporaryFunnel(ProcessGroup group) private Set<RemoteGroupPort> getUpdatedParameterNames(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed) private Set<Connectable> getUpstreamComponents(Connection connection) private Set<Connectable> getUpstreamComponents(org.apache.nifi.flow.VersionedConnection connection) getValueAndReferences(org.apache.nifi.flow.VersionedParameter parameter) getValueAndReferences(Parameter parameter) private ControllerServiceNodegetVersionedControllerService(ProcessGroup group, String versionedComponentId) private StringgetVersionedId(String instanceId, String versionedId) Determines the Versioned Component ID to use for a component by first using the Versioned ID if it is already available.private StringgetVersionedId(ProcessGroup processGroup) private booleanisConnectionDestinationReachable(Connectable source, Connectable destination) Checks if a Connection can be made from the given source component to the given destination componentprivate booleanisDoneProcessing(ProcessGroup group) private booleanisEqual(BundleCoordinate coordinate, org.apache.nifi.flow.Bundle bundle) private booleanisSourceProcessor(ProcessorNode processor) private booleanisTempDestinationNecessary(Connection existingConnection, org.apache.nifi.flow.VersionedConnection proposedConnection, Connectable newDestination) private booleanisTransmitting(org.apache.nifi.flow.VersionedRemoteProcessGroup versionedRpg) private booleanisUpdateable(Connection connection) private static booleanisValueEncrypted(String value) mapRemoteGroupPortsByTargetId(Set<org.apache.nifi.flow.VersionedRemoteGroupPort> remoteGroupPorts) private booleanmatchesGroupId(ProcessGroup group, String groupId) private <T extends VersionedComponent & Connectable>
booleanprivate voidnotifyScheduledStateChange(Collection<ControllerServiceNode> servicesToRestart, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) private voidnotifyScheduledStateChange(Connectable component, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) private voidnotifyScheduledStateChange(Port inputPort, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) private voidnotifyScheduledStateChange(ComponentNode component, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) populatePropertiesMap(ComponentNode componentNode, Map<String, String> proposedProperties, Map<String, org.apache.nifi.flow.VersionedPropertyDescriptor> proposedPropertyDescriptors, ProcessGroup group, ProcessGroup topLevelGroup) private voidprivate voidremoveMissingChildGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessGroup> groupsByVersionedId) private <C,V extends org.apache.nifi.flow.VersionedComponent>
voidremoveMissingComponents(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, C> componentsById, Function<org.apache.nifi.flow.VersionedProcessGroup, Collection<V>> getVersionedComponents, BiConsumer<ProcessGroup, C> removeComponent) private voidremoveMissingConnections(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) private voidremoveMissingControllerServices(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ControllerServiceNode> servicesByVersionedId) private voidremoveMissingFunnels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Funnel> funnelsByVersionedId) private voidremoveMissingInputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Port> portsByVersionedId) private voidremoveMissingLabels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Label> labelsByVersionedId) private voidremoveMissingOutputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Port> portsByVersionedId) private voidremoveMissingProcessors(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessorNode> processorsByVersionedId) private voidremoveMissingRpg(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, RemoteProcessGroup> rpgsByVersionedId) private voidprivate voidrestoreConnectionDestinations(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId, Set<String> connectionsWithTempDestination) private ParameterContextselectParameterContext(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) voidsetSynchronizationOptions(FlowSynchronizationOptions syncOptions) private voidstartComponents(Collection<Connectable> stoppedComponents, FlowSynchronizationOptions synchronizationOptions) private voidstopControllerService(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed, long timeout, FlowSynchronizationOptions.ComponentStopTimeoutAction timeoutAction, Set<ComponentNode> referencesStopped, Set<ControllerServiceNode> servicesDisabled, FlowSynchronizationOptions synchronizationOptions) private Set<Connectable> stopDownstreamComponents(Connectable component, long timeout, FlowSynchronizationOptions synchronizationOptions) private <T extends Connectable>
Set<T> stopOrTerminate(Set<T> components, long timeout, FlowSynchronizationOptions synchronizationOptions) private booleanstopOrTerminate(Connectable component, long timeout, FlowSynchronizationOptions synchronizationOptions) private booleanstopOrTerminate(ProcessorNode processor, long timeout, FlowSynchronizationOptions synchronizationOptions) private booleanstopProcessor(ProcessorNode processor, long timeout) voidsynchronize(Connection connection, org.apache.nifi.flow.VersionedConnection proposedConnection, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Connection to match the proposed one, or deletes the Connection if the proposed isnull.voidsynchronize(Funnel funnel, org.apache.nifi.flow.VersionedFunnel proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Funnel to match the proposed one, or deletes the Funnel if the proposed isnull.voidsynchronize(Port port, org.apache.nifi.flow.VersionedPort proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Port to match the proposed one, or deletes the Port if the proposed isnull.voidsynchronize(FlowAnalysisRuleNode flowAnalysisRule, org.apache.nifi.flow.VersionedFlowAnalysisRule proposed, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Flow Analysis Rule to match the proposed one, or deletes the Flow Analysis Rule if the proposed isnull.voidsynchronize(Label label, org.apache.nifi.flow.VersionedLabel proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Label to match the proposed one, or deletes the Label if the proposed isnull.voidsynchronize(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposedProcessor, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Processor to match the proposed snapshot, or deletes the Processor if the proposed snapshot isnull.voidsynchronize(ReportingTaskNode reportingTask, org.apache.nifi.flow.VersionedReportingTask proposed, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Reporting Task to match the proposed one, or deletes the Reporting Task if the proposed isnull.voidsynchronize(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Controller Service to match the proposed version, or deletes the Controller Service if the proposed snapshot isnull.voidsynchronize(ProcessGroup group, org.apache.nifi.flow.VersionedExternalFlow versionedExternalFlow, FlowSynchronizationOptions options) Synchronize the given Process Group to match the proposed flowprivate voidsynchronize(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup, boolean updateGroupSettings) voidsynchronize(RemoteProcessGroup rpg, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Synchronizes the given Remote Process Group to match the proposed one, or deletes the rpg if the proposed isnull.voidsynchronize(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed, FlowSynchronizationOptions synchronizationOptions) private voidsynchronizeChildGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, ProcessGroup> childGroupsByVersionedId, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup) private voidsynchronizeConnections(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) private voidsynchronizeControllerServices(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ControllerServiceNode> servicesByVersionedId, ProcessGroup topLevelGroup) private voidsynchronizeFunnels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Funnel> funnelsByVersionedId) private voidsynchronizeInputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<Port, String> proposedPortFinalNames, Map<String, Port> inputPortsByVersionedId) private voidsynchronizeLabels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Label> labelsByVersionedId) private voidsynchronizeOutputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<Port, String> proposedPortFinalNames, Map<String, Port> outputPortsByVersionedId) voidsynchronizeProcessGroupSettings(ProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessGroup proposed, ProcessGroup parentGroup, FlowSynchronizationOptions synchronizationOptions) private voidsynchronizeProcessors(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessorNode> processorsByVersionedId, ProcessGroup topLevelGroup) private voidsynchronizeRemoteGroupPorts(Set<RemoteGroupPort> remoteGroupPorts, Set<org.apache.nifi.flow.VersionedRemoteGroupPort> proposedPorts) private voidsynchronizeRemoteGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, RemoteProcessGroup> rpgsByVersionedId) private voidsynchronizeTransmissionState(org.apache.nifi.flow.VersionedRemoteGroupPort versionedPort, RemoteGroupPort remoteGroupPort) private voidterminateComponents(Set<Connectable> components, FlowSynchronizationOptions synchronizationOptions) private BundleCoordinatetoCoordinate(org.apache.nifi.flow.Bundle bundle) private voidupdateConnection(Connection connection, org.apache.nifi.flow.VersionedConnection proposed) updateConnectionDestinations(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) private voidupdateControllerService(ControllerServiceNode service, org.apache.nifi.flow.VersionedControllerService proposed, ProcessGroup topLevelGroup) private voidupdateFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRule, org.apache.nifi.flow.VersionedFlowAnalysisRule proposed) private voidupdateFunnel(Funnel funnel, org.apache.nifi.flow.VersionedFunnel proposed) private voidupdateLabel(Label label, org.apache.nifi.flow.VersionedLabel proposed) private voidupdateParameterContext(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) private voidupdatePort(Port port, org.apache.nifi.flow.VersionedPort proposed, String temporaryName) private voidupdatePortsToFinalNames(Map<Port, String> proposedPortFinalNames) private voidupdatePortToSetFinalName(Port port, String name) private voidupdateProcessor(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposed, ProcessGroup topLevelGroup) private voidupdateRemoteProcessGroup(RemoteProcessGroup rpg, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ComponentIdGenerator componentIdGenerator) private voidupdateReportingTask(ReportingTaskNode reportingTask, org.apache.nifi.flow.VersionedReportingTask proposed) voidverifyCanAddVersionedComponents(ProcessGroup group, VersionedComponentAdditions additions) Verifies that the given additions can be applied to the specified process group.private voidverifyCanDelete(Connectable connectable, long timeout) private voidverifyCanDeleteConnections(Connectable connectable, long timeout) private voidverifyCanDeleteWhenQueueEmpty(Connection connection) private voidverifyCanInstantiateConnections(ProcessGroup group, Set<org.apache.nifi.flow.VersionedConnection> connections, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) private voidverifyCanInstantiateControllerServices(ProcessGroup group, Set<org.apache.nifi.flow.VersionedControllerService> controllerServices, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) private voidverifyCanInstantiateProcessors(ProcessGroup group, Set<org.apache.nifi.flow.VersionedProcessor> processors, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) private voidverifyCanRemoveMissingComponents(ProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessGroup proposedGroup, boolean verifyConnectionRemoval) Match components of the given process group to the proposed versioned process group and verify missing components are in a state that they can be safely removed.private voidverifyCanSynchronize(Connection connection, org.apache.nifi.flow.VersionedConnection proposedConnection) private voidverifyCanSynchronize(Port port, org.apache.nifi.flow.VersionedPort proposed, long timeout) private voidverifyCanSynchronize(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposedProcessor, long timeout) private voidverifyCanSynchronize(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed) voidverifyCanSynchronize(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup flowContents, boolean verifyConnectionRemoval) Verifies that the given Process Group can be updated to match the proposed flowprivate voidverifyCanSynchronize(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed) private voidverifyNoIncomingConnections(Connectable connectable) private voidverifyNotInherited(String parameterContextId) private voidwaitFor(long timeout, BooleanSupplier condition) private voidwaitForQueueEmpty(Connection connection, Duration duration) private voidwaitForStopCompletion(Future<?> future, Object component, long timeout, FlowSynchronizationOptions.ComponentStopTimeoutAction timeoutAction)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
TEMP_FUNNEL_ID_SUFFIX
- See Also:
-
ENC_PREFIX
- See Also:
-
ENC_SUFFIX
- See Also:
-
context
-
updatedVersionedComponentIds
-
createdAndModifiedExtensions
private final List<StandardVersionedComponentSynchronizer.CreatedOrModifiedExtension> createdAndModifiedExtensions -
syncOptions
-
connectableAdditionTracker
-
-
Constructor Details
-
StandardVersionedComponentSynchronizer
-
-
Method Details
-
setSynchronizationOptions
-
addVersionedComponentsToProcessGroup
public ComponentAdditions addVersionedComponentsToProcessGroup(ProcessGroup group, VersionedComponentAdditions additions, FlowSynchronizationOptions options) Description copied from interface:VersionedComponentSynchronizerAdds versioned components to the specified Process Group.- Specified by:
addVersionedComponentsToProcessGroupin interfaceVersionedComponentSynchronizer- Parameters:
group- the Process Group to append toadditions- the component additions to add to the Process Groupoptions- sync options- Returns:
- the component additions
-
synchronize
public void synchronize(ProcessGroup group, org.apache.nifi.flow.VersionedExternalFlow versionedExternalFlow, FlowSynchronizationOptions options) Description copied from interface:VersionedComponentSynchronizerSynchronize the given Process Group to match the proposed flow- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
group- the Process Group to updateversionedExternalFlow- the proposed/desired state for the process groupoptions- options for how to synchronize the group
-
synchronize
private void synchronize(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, throws ProcessorInstantiationExceptionorg.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup, boolean updateGroupSettings) - Throws:
ProcessorInstantiationException
-
determineRegistryId
-
synchronizeChildGroups
private void synchronizeChildGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, throws ProcessorInstantiationExceptionProcessGroup> childGroupsByVersionedId, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup) - Throws:
ProcessorInstantiationException
-
synchronizeControllerServices
private void synchronizeControllerServices(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ControllerServiceNode> servicesByVersionedId, ProcessGroup topLevelGroup) -
removeMissingConnections
private void removeMissingConnections(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) -
synchronizeConnections
private void synchronizeConnections(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) -
updateConnectionDestinations
private Set<String> updateConnectionDestinations(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId) -
isConnectionDestinationReachable
Checks if a Connection can be made from the given source component to the given destination component- Parameters:
source- the source componentdestination- the destination component- Returns:
- true if the connection is allowable,
falseif the connection cannot be made due to the Process Group hierarchies
-
isTempDestinationNecessary
private boolean isTempDestinationNecessary(Connection existingConnection, org.apache.nifi.flow.VersionedConnection proposedConnection, Connectable newDestination) -
getVersionedId
-
getVersionedId
Determines the Versioned Component ID to use for a component by first using the Versioned ID if it is already available. Otherwise, use the Component ID Lookup to determine the Versioned ID based on the Instance ID. This allows us to ensure that when we sync the dataflow, we use the same approach to mapping as we will use when we write out the dataflow.- Returns:
- the Versioned Component ID to use for the component
-
getTemporaryFunnel
-
restoreConnectionDestinations
private void restoreConnectionDestinations(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Connection> connectionsByVersionedId, Set<String> connectionsWithTempDestination) -
removeTemporaryFunnel
-
componentsById
private <T extends Connectable> Map<String,T> componentsById(ProcessGroup group, Function<ProcessGroup, Collection<T>> retrieveComponents) -
componentsById
private <T> Map<String,T> componentsById(ProcessGroup group, Function<ProcessGroup, Collection<T>> retrieveComponents, Function<T, String> retrieveId, Function<T, Optional<String>> retrieveVersionedComponentId) -
synchronizeFunnels
private void synchronizeFunnels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Funnel> funnelsByVersionedId) -
synchronizeInputPorts
-
synchronizeOutputPorts
-
updatePortsToFinalNames
-
synchronizeLabels
private void synchronizeLabels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Label> labelsByVersionedId) -
removeMissingProcessors
private void removeMissingProcessors(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessorNode> processorsByVersionedId) -
removeMissingInputPorts
private void removeMissingInputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Port> portsByVersionedId) -
removeMissingOutputPorts
private void removeMissingOutputPorts(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Port> portsByVersionedId) -
removeMissingLabels
private void removeMissingLabels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Label> labelsByVersionedId) -
removeMissingFunnels
private void removeMissingFunnels(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, Funnel> funnelsByVersionedId) -
removeMissingRpg
private void removeMissingRpg(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, RemoteProcessGroup> rpgsByVersionedId) -
removeMissingControllerServices
private void removeMissingControllerServices(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ControllerServiceNode> servicesByVersionedId) -
removeMissingChildGroups
private void removeMissingChildGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessGroup> groupsByVersionedId) -
purgeChildGroupOfEmptyChildren
-
removeMissingComponents
private <C,V extends org.apache.nifi.flow.VersionedComponent> void removeMissingComponents(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, C> componentsById, Function<org.apache.nifi.flow.VersionedProcessGroup, Collection<V>> getVersionedComponents, BiConsumer<ProcessGroup, C> removeComponent) -
synchronizeProcessors
private void synchronizeProcessors(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, ProcessorNode> processorsByVersionedId, ProcessGroup topLevelGroup) throws ProcessorInstantiationException- Throws:
ProcessorInstantiationException
-
synchronizeRemoteGroups
private void synchronizeRemoteGroups(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, RemoteProcessGroup> rpgsByVersionedId) -
verifyCanAddVersionedComponents
public void verifyCanAddVersionedComponents(ProcessGroup group, VersionedComponentAdditions additions) Description copied from interface:VersionedComponentSynchronizerVerifies that the given additions can be applied to the specified process group.- Specified by:
verifyCanAddVersionedComponentsin interfaceVersionedComponentSynchronizer- Parameters:
group- the Process Group that will be appended toadditions- the component additions that will be added to the Process Group
-
verifyCanSynchronize
public void verifyCanSynchronize(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup flowContents, boolean verifyConnectionRemoval) Description copied from interface:VersionedComponentSynchronizerVerifies that the given Process Group can be updated to match the proposed flow- Specified by:
verifyCanSynchronizein interfaceVersionedComponentSynchronizer- Parameters:
group- the group to updateflowContents- the proposed updated versionverifyConnectionRemoval- iftrueand synchronizing the Process Group would result in any Connection being removed, an IllegalStateException will be thrown if that Connection has data in it. Iffalse, the presence of data in removed queues will be ignored.
-
verifyCanInstantiateProcessors
private void verifyCanInstantiateProcessors(ProcessGroup group, Set<org.apache.nifi.flow.VersionedProcessor> processors, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) -
verifyCanInstantiateControllerServices
private void verifyCanInstantiateControllerServices(ProcessGroup group, Set<org.apache.nifi.flow.VersionedControllerService> controllerServices, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) -
verifyCanInstantiateConnections
private void verifyCanInstantiateConnections(ProcessGroup group, Set<org.apache.nifi.flow.VersionedConnection> connections, Set<org.apache.nifi.flow.VersionedProcessGroup> childGroups) -
addProcessGroup
private ProcessGroup addProcessGroup(ProcessGroup destination, org.apache.nifi.flow.VersionedProcessGroup proposed, ComponentIdGenerator componentIdGenerator, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, throws ProcessorInstantiationExceptionorg.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ProcessGroup topLevelGroup) - Throws:
ProcessorInstantiationException
-
addControllerService
private ControllerServiceNode addControllerService(ProcessGroup destination, org.apache.nifi.flow.VersionedControllerService proposed, ComponentIdGenerator componentIdGenerator, ProcessGroup topLevelGroup) -
verifyCanSynchronize
private void verifyCanSynchronize(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed) -
synchronize
public void synchronize(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Controller Service to match the proposed version, or deletes the Controller Service if the proposed snapshot isnull. If the given Controller Service isnull, adds the Controller Service to the given Process Group- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
controllerService- the Controller Service to synchronizeproposed- the proposed/desired state for the controller servicegroup- the ProcessGroup to which the Controller Service should belongsynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the Controller Service with the proposed versionTimeoutException- if the Controller Service must be disabled in order to synchronize it with the proposed version and disabling takes longer than the timeout allowed by thesynchronization options.InterruptedException- if interrupted while waiting for Controller Service to disable
-
waitForStopCompletion
private void waitForStopCompletion(Future<?> future, Object component, long timeout, FlowSynchronizationOptions.ComponentStopTimeoutAction timeoutAction) throws InterruptedException, FlowSynchronizationException, TimeoutException -
updateControllerService
private void updateControllerService(ControllerServiceNode service, org.apache.nifi.flow.VersionedControllerService proposed, ProcessGroup topLevelGroup) -
getSensitiveDynamicPropertyNames
private Set<String> getSensitiveDynamicPropertyNames(ComponentNode componentNode, Map<String, String> proposedProperties, Collection<org.apache.nifi.flow.VersionedPropertyDescriptor> proposedDescriptors) -
populatePropertiesMap
private Map<String,String> populatePropertiesMap(ComponentNode componentNode, Map<String, String> proposedProperties, Map<String, org.apache.nifi.flow.VersionedPropertyDescriptor> proposedPropertyDescriptors, ProcessGroup group, ProcessGroup topLevelGroup) -
getDecryptedProperties
-
decrypt
-
isValueEncrypted
-
verifyCanSynchronize
private void verifyCanSynchronize(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed) throws FlowSynchronizationException - Throws:
FlowSynchronizationException
-
synchronize
public void synchronize(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException - Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Throws:
FlowSynchronizationExceptionTimeoutExceptionInterruptedException
-
collectValueAndReferences
private void collectValueAndReferences(ParameterContext parameterContext, Map<String, StandardVersionedComponentSynchronizer.ParameterValueAndReferences> valueAndRef) -
getUpdatedParameterNames
protected Set<String> getUpdatedParameterNames(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext proposed) -
getValueAndReferences
private StandardVersionedComponentSynchronizer.ParameterValueAndReferences getValueAndReferences(Parameter parameter) -
getValueAndReferences
private StandardVersionedComponentSynchronizer.ParameterValueAndReferences getValueAndReferences(org.apache.nifi.flow.VersionedParameter parameter) -
synchronizeProcessGroupSettings
public void synchronizeProcessGroupSettings(ProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessGroup proposed, ProcessGroup parentGroup, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException - Specified by:
synchronizeProcessGroupSettingsin interfaceVersionedComponentSynchronizer- Throws:
FlowSynchronizationExceptionTimeoutExceptionInterruptedException
-
isDoneProcessing
-
bleedOut
private void bleedOut(ProcessGroup processGroup, long timeout, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException -
waitFor
- Throws:
InterruptedException
-
connectionsEmpty
-
isSourceProcessor
-
verifyNotInherited
-
updateParameterContext
private void updateParameterContext(ProcessGroup group, org.apache.nifi.flow.VersionedProcessGroup proposed, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) -
createMissingParameterProvider
private void createMissingParameterProvider(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, String parameterProviderId, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) -
getPublicPortFinalName
-
getParameterContextByName
-
createParameterContextWithoutReferences
private ParameterContext createParameterContextWithoutReferences(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext) -
getParameterProviderConfiguration
private ParameterProviderConfiguration getParameterProviderConfiguration(org.apache.nifi.flow.VersionedParameterContext context) -
createParameterContext
private ParameterContext createParameterContext(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, String parameterContextId, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) -
createParameterMap
private Map<String,Parameter> createParameterMap(Collection<org.apache.nifi.flow.VersionedParameter> versionedParameters) -
createParameterReferenceId
-
selectParameterContext
private ParameterContext selectParameterContext(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) -
addMissingConfiguration
private void addMissingConfiguration(org.apache.nifi.flow.VersionedParameterContext versionedParameterContext, ParameterContext currentParameterContext, Map<String, org.apache.nifi.flow.VersionedParameterContext> versionedParameterContexts, Map<String, org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences, ComponentIdGenerator componentIdGenerator) -
createParameter
-
isEqual
-
toCoordinate
-
synchronize
public void synchronize(Funnel funnel, org.apache.nifi.flow.VersionedFunnel proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Funnel to match the proposed one, or deletes the Funnel if the proposed isnull. If the given Funnel isnull, creates it and adds it to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
funnel- the funnel to synchronizeproposed- the proposed/desired state for the funnelgroup- the ProcessGroup to which the funnel should belongsynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the funnel with the proposed versionTimeoutException- if the funnel is being removed and downstream components take longer to stop than the timeout allowed by thesynchronization options.InterruptedException
-
synchronize
public void synchronize(Label label, org.apache.nifi.flow.VersionedLabel proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Label to match the proposed one, or deletes the Label if the proposed isnull. If the given Label isnull, creates it and adds it to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
label- the label to synchronizeproposed- the proposed/desired state for the labelgroup- the ProcessGroup to which the label should belongsynchronizationOptions- options for how to synchronize the flow
-
updateFunnel
-
addFunnel
private Funnel addFunnel(ProcessGroup destination, org.apache.nifi.flow.VersionedFunnel proposed, ComponentIdGenerator componentIdGenerator) -
isUpdateable
-
generateTemporaryPortName
-
updatePortToSetFinalName
-
verifyCanSynchronize
private void verifyCanSynchronize(Port port, org.apache.nifi.flow.VersionedPort proposed, long timeout) throws InterruptedException, TimeoutException, FlowSynchronizationException -
synchronize
public void synchronize(Port port, org.apache.nifi.flow.VersionedPort proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Port to match the proposed one, or deletes the Port if the proposed isnull. If the given Port isnull, creates it and adds it to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
port- the port to synchronizeproposed- the proposed/desired state for the portgroup- the ProcessGroup to which the port should belongsynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the port with the proposed versionTimeoutException- if the port is running and takes longer to stop than the timeout allowed by thesynchronization options.InterruptedException
-
startComponents
private void startComponents(Collection<Connectable> stoppedComponents, FlowSynchronizationOptions synchronizationOptions) -
updatePort
-
addInputPort
private Port addInputPort(ProcessGroup destination, org.apache.nifi.flow.VersionedPort proposed, ComponentIdGenerator componentIdGenerator, String temporaryName) -
addOutputPort
private Port addOutputPort(ProcessGroup destination, org.apache.nifi.flow.VersionedPort proposed, ComponentIdGenerator componentIdGenerator, String temporaryName) -
addLabel
private Label addLabel(ProcessGroup destination, org.apache.nifi.flow.VersionedLabel proposed, ComponentIdGenerator componentIdGenerator) -
updateLabel
-
addProcessor
private ProcessorNode addProcessor(ProcessGroup destination, org.apache.nifi.flow.VersionedProcessor proposed, ComponentIdGenerator componentIdGenerator, ProcessGroup topLevelGroup) throws ProcessorInstantiationException - Throws:
ProcessorInstantiationException
-
verifyCanSynchronize
private void verifyCanSynchronize(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposedProcessor, long timeout) throws InterruptedException, TimeoutException, FlowSynchronizationException -
verifyCanDelete
private void verifyCanDelete(Connectable connectable, long timeout) throws InterruptedException, TimeoutException, FlowSynchronizationException -
verifyCanDeleteConnections
private void verifyCanDeleteConnections(Connectable connectable, long timeout) throws InterruptedException, TimeoutException, FlowSynchronizationException -
verifyNoIncomingConnections
private void verifyNoIncomingConnections(Connectable connectable) throws FlowSynchronizationException - Throws:
FlowSynchronizationException
-
synchronize
public void synchronize(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposedProcessor, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Processor to match the proposed snapshot, or deletes the Processor if the proposed snapshot isnull. If the given processor isnull, adds the processor to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
processor- the processor to synchronizeproposedProcessor- the proposed/desired state for the processorgroup- the ProcessGroup to which the ProcessorNode should belong.synchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the processor with the proposed versionTimeoutException- if the processor must be stopped in order to synchronize it with the proposed version and stopping takes longer than the timeout allowed by thesynchronization options.InterruptedException- if interrupted while waiting for processor to stop or outbound connections to empty if processor is being removed
-
stopDownstreamComponents
private Set<Connectable> stopDownstreamComponents(Connectable component, long timeout, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException -
stopOrTerminate
private <T extends Connectable> Set<T> stopOrTerminate(Set<T> components, long timeout, FlowSynchronizationOptions synchronizationOptions) throws TimeoutException, FlowSynchronizationException -
notifyScheduledStateChange
private void notifyScheduledStateChange(Connectable component, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) -
notifyScheduledStateChange
private void notifyScheduledStateChange(ComponentNode component, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) -
notifyScheduledStateChange
private void notifyScheduledStateChange(Collection<ControllerServiceNode> servicesToRestart, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) -
notifyScheduledStateChange
private void notifyScheduledStateChange(Port inputPort, FlowSynchronizationOptions synchronizationOptions, org.apache.nifi.flow.ScheduledState intendedState) -
stopOrTerminate
private boolean stopOrTerminate(Connectable component, long timeout, FlowSynchronizationOptions synchronizationOptions) throws TimeoutException, FlowSynchronizationException -
stopOrTerminate
private boolean stopOrTerminate(ProcessorNode processor, long timeout, FlowSynchronizationOptions synchronizationOptions) throws TimeoutException, FlowSynchronizationException -
stopProcessor
private boolean stopProcessor(ProcessorNode processor, long timeout) throws FlowSynchronizationException, TimeoutException -
stopControllerService
private void stopControllerService(ControllerServiceNode controllerService, org.apache.nifi.flow.VersionedControllerService proposed, long timeout, FlowSynchronizationOptions.ComponentStopTimeoutAction timeoutAction, Set<ComponentNode> referencesStopped, Set<ControllerServiceNode> servicesDisabled, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException -
updateProcessor
private void updateProcessor(ProcessorNode processor, org.apache.nifi.flow.VersionedProcessor proposed, ProcessGroup topLevelGroup) throws ProcessorInstantiationException - Throws:
ProcessorInstantiationException
-
getServiceInstanceId
-
synchronize
public void synchronize(RemoteProcessGroup rpg, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Remote Process Group to match the proposed one, or deletes the rpg if the proposed isnull. If the given rpg isnull, creates it and adds it to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
rpg- the rpg to synchronizeproposed- the proposed/desired state for the rpggroup- the ProcessGroup to which the rpg should belongsynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the rpg with the proposed versionTimeoutException- if the rpg is being removed and takes longer to stop than the timeout allowed by thesynchronization options.InterruptedException
-
isTransmitting
private boolean isTransmitting(org.apache.nifi.flow.VersionedRemoteProcessGroup versionedRpg) -
getTransmittingPorts
-
addRemoteProcessGroup
private RemoteProcessGroup addRemoteProcessGroup(ProcessGroup destination, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ComponentIdGenerator componentIdGenerator) -
updateRemoteProcessGroup
private void updateRemoteProcessGroup(RemoteProcessGroup rpg, org.apache.nifi.flow.VersionedRemoteProcessGroup proposed, ComponentIdGenerator componentIdGenerator) -
synchronizeRemoteGroupPorts
private void synchronizeRemoteGroupPorts(Set<RemoteGroupPort> remoteGroupPorts, Set<org.apache.nifi.flow.VersionedRemoteGroupPort> proposedPorts) -
mapRemoteGroupPortsByTargetId
-
getRpgInputPort
private RemoteGroupPort getRpgInputPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator) -
getRpgOutputPort
private RemoteGroupPort getRpgOutputPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator) -
getRpgPort
private RemoteGroupPort getRpgPort(org.apache.nifi.flow.VersionedRemoteGroupPort port, RemoteProcessGroup rpg, ComponentIdGenerator componentIdGenerator, Function<String, RemoteGroupPort> portLookup, Set<RemoteGroupPort> ports) -
synchronizeTransmissionState
private void synchronizeTransmissionState(org.apache.nifi.flow.VersionedRemoteGroupPort versionedPort, RemoteGroupPort remoteGroupPort) -
createPortDescriptor
private RemoteProcessGroupPortDescriptor createPortDescriptor(org.apache.nifi.flow.VersionedRemoteGroupPort proposed, ComponentIdGenerator componentIdGenerator, String rpgId) -
verifyCanSynchronize
private void verifyCanSynchronize(Connection connection, org.apache.nifi.flow.VersionedConnection proposedConnection) throws FlowSynchronizationException - Throws:
FlowSynchronizationException
-
verifyCanDeleteWhenQueueEmpty
private void verifyCanDeleteWhenQueueEmpty(Connection connection) throws FlowSynchronizationException - Throws:
FlowSynchronizationException
-
getUpstreamComponents
-
findUpstreamComponents
-
getUpstreamComponents
-
findUpstreamComponents
private void findUpstreamComponents(org.apache.nifi.flow.VersionedConnection connection, Set<Connectable> components) -
synchronize
public void synchronize(Connection connection, org.apache.nifi.flow.VersionedConnection proposedConnection, ProcessGroup group, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Connection to match the proposed one, or deletes the Connection if the proposed isnull. If the given connection isnull, adds the connection to the given ProcessGroup- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
connection- the connection to synchronizeproposedConnection- the proposed/desired state for the connectiongroup- the ProcessGroup to which the connection should belongsynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the connection with the proposed versionTimeoutException- if the source or destination of the connection must be stopped in order to perform the synchronization and stopping it takes longer than the timeout allowed by thesynchronization options.
-
waitForQueueEmpty
private void waitForQueueEmpty(Connection connection, Duration duration) throws TimeoutException, InterruptedException - Throws:
TimeoutExceptionInterruptedException
-
terminateComponents
private void terminateComponents(Set<Connectable> components, FlowSynchronizationOptions synchronizationOptions) -
updateConnection
private void updateConnection(Connection connection, org.apache.nifi.flow.VersionedConnection proposed) -
addConnection
private Connection addConnection(ProcessGroup destinationGroup, org.apache.nifi.flow.VersionedConnection proposed, ComponentIdGenerator componentIdGenerator) -
getConnectable
private Connectable getConnectable(ProcessGroup group, org.apache.nifi.flow.ConnectableComponent connectableComponent) -
getConnectable
private Connectable getConnectable(ProcessGroup group, org.apache.nifi.flow.ConnectableComponent connectableComponent, Function<org.apache.nifi.flow.ConnectableComponent, String> idFunction) -
synchronize
public void synchronize(ReportingTaskNode reportingTask, org.apache.nifi.flow.VersionedReportingTask proposed, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException, ReportingTaskInstantiationException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Reporting Task to match the proposed one, or deletes the Reporting Task if the proposed isnull. If the given Reporting Task isnull, creates it- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
reportingTask- the reporting task to synchronizeproposed- the proposed/desired statesynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the reporting task with the proposed versionTimeoutException- if the reporting task is being removed and takes longer to stop than the timeout allowed by thesynchronization options.InterruptedExceptionReportingTaskInstantiationException
-
addReportingTask
private ReportingTaskNode addReportingTask(org.apache.nifi.flow.VersionedReportingTask reportingTask) throws ReportingTaskInstantiationException -
updateReportingTask
private void updateReportingTask(ReportingTaskNode reportingTask, org.apache.nifi.flow.VersionedReportingTask proposed) throws ReportingTaskInstantiationException -
synchronize
public void synchronize(FlowAnalysisRuleNode flowAnalysisRule, org.apache.nifi.flow.VersionedFlowAnalysisRule proposed, FlowSynchronizationOptions synchronizationOptions) throws FlowSynchronizationException, TimeoutException, InterruptedException, FlowAnalysisRuleInstantiationException Description copied from interface:VersionedComponentSynchronizerSynchronizes the given Flow Analysis Rule to match the proposed one, or deletes the Flow Analysis Rule if the proposed isnull. If the given Flow Analysis Rule isnull, creates it.- Specified by:
synchronizein interfaceVersionedComponentSynchronizer- Parameters:
flowAnalysisRule- the flow analysis rule to synchronizeproposed- the proposed/desired statesynchronizationOptions- options for how to synchronize the flow- Throws:
FlowSynchronizationException- if unable to synchronize the flow analysis rule with the proposed versionTimeoutException- if the flow analysis rule is being removed and takes longer to stop than the timeout allowed by thesynchronization options.InterruptedExceptionFlowAnalysisRuleInstantiationException
-
addFlowAnalysisRule
private FlowAnalysisRuleNode addFlowAnalysisRule(org.apache.nifi.flow.VersionedFlowAnalysisRule flowAnalysisRule) throws FlowAnalysisRuleInstantiationException -
updateFlowAnalysisRule
private void updateFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRule, org.apache.nifi.flow.VersionedFlowAnalysisRule proposed) throws FlowAnalysisRuleInstantiationException -
matchesId
-
matchesGroupId
-
findAllProcessors
-
findAllControllerServices
-
findAllConnections
-
verifyCanRemoveMissingComponents
private void verifyCanRemoveMissingComponents(ProcessGroup processGroup, org.apache.nifi.flow.VersionedProcessGroup proposedGroup, boolean verifyConnectionRemoval) Match components of the given process group to the proposed versioned process group and verify missing components are in a state that they can be safely removed. Specifically, check for removed child process groups and descendants. Optionally also check for removed connections with data in their queue, either because the connections were removed from a matched process group or their group itself was removed.- Parameters:
processGroup- the current process group to examineproposedGroup- the proposed versioned process group to match withverifyConnectionRemoval- whether or not to verify that connections that are not present in the proposed flow can be removed
-
getVersionedControllerService
private ControllerServiceNode getVersionedControllerService(ProcessGroup group, String versionedComponentId) -
getPropertyValues
-