Removed Provenance Repository from the stateless RepositoryContextFactory and added it to the DataflowTriggerContext. This was necessary because the previous design overlooked the possibility of many threads concurrently running the same dataflow. They all shared the same StatelessProvenanceRepository, but the code was designed as if only a single thread would be using the repository. As a result, the events that were registered with the stateless prov repo were being copied many times into NiFi's underlying provenance repository. This refactoring also led to the discovery of some old Java 8 syntax that could be cleaned up, and it led to the discovery of some methods that were no longer being used and could be cleaned up. Finally, in testing, I found that when a Stateless Group was scheduled, it scheduled the triggering of the stateless group before marking the state as RUNNING; as a result, the second thread could run, determine that the state is STARTING instead of RUNNING, and return without triggering the stateless group. This was addressed by ensuring that we set the state to RUNNING before triggering the stateless group to be triggered.
Signed-off-by: David Handermann <exceptionfactory@apache.org>
Ensure that when data is enqueued in the StatelessFlowFileQueue we order the data properly before adding to its internal queue. Added system tests to verify that the data is properly ordered while running within stateless and properly ordered when coming out, if using a FIFO prioritizer.
Signed-off-by: David Handermann <exceptionfactory@apache.org>
* NIFI-13721: Migrating additional details to markdown.
* NIFI-13721: Rebuilding documentation to generate mark up on the client.
* NIFI-13721: Removing old documentation approach.
* NIFI-13721: Rebase main and final fixing button colors.
* NIFI-13721: Fixing rat issues.
* NIFI-13721: Removing generated comonent documentation.
- Removing links and images from additional details markdown.
* NIFI-13721: Recreating package lock following rebase.
* NIFI-13721: Updating documentation for M3.
* NIFI-13721: Fixing broken test.
* NIFI-13721: Addressing review feedback.
* NIFI-13721: Addressing review feedback.
* NIFI-13721: Ensuring the selected item is visible after routing.
* NIFI-13721: Fixing reportingTaskTypes in finding extensions for a given type.
* NIFI-13721: Updating the see also component to handle when the referenced extension is not installed.
* NIFI-13721: Fixing expansion panel header styles.
The StatelessFlowManager should register any Process Group that it creates in its internal map in the same way that StandardFlowManager does; this ensures that the Process Group can be retrieved by ID during flow synchronization.
Signed-off-by: David Handermann <exceptionfactory@apache.org>
Fixed stateless group startup around Controller Services by changing the startup logic in two ways. First, we enable Controller Services before we create the Stateless Flow. Secondly, we do not bother enabling the ephemeral Controller Services that are created during the Stateless Flow creation/synchronization. This ensures that if Processors make use of a Controller Service during its @OnScheduled method (which is part of the Stateless Flow initialization process) that the Controller Service is Enabled. It also avoids calling @OnEnabled methods of Controller Services that will never actually be used, as Processors make use of the existing Controller Services when running within standard NiFi .
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Added REST resource methods for managing assets associated with Parameter Contexts
- Added CLI commands for managing assets
- Added and updated system test for assets and Parameter Contexts
- Updated flow synchronization to consider referenced asset changes
- Adjusted authorization for cluster nodes to read Parameter Contexts
This closes#9138
Co-authored-by: Bryan Bende <bbende@apache.org>
Co-authored-by: Mark Payne <markap14@hotmail.com>
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Add NarPersistenceProvider to framework API with standard implementation
- Add NarManager to orchestrate interactions with the persistence provider and framework
- Add REST API for upload, download, list, and delete of custom NARs
- Add CLI commands for call these REST APIs
- Implement an upload request replicator for replicating a file upload across the cluster
- Update ExtensionManager, NarLoader, and JettyServer to support unloading a NAR
- Add ability to replace a NAR in place by unloading components, loading new NAR, and reloading components
- Add system tests for uploading a NAR and verifying other APIs
- Add NAR digest to NarNode and summary DTO, fix bug in digest utils
- Sync NARs from cluster coordinator when joining the cluster
This closes#9017
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Remove nifi-socket-utils and moved remaining classes to referencing framework components
This closes#9059
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Methods for getBranches, getDefaultBranch, and createBranch in flow registry client
- Add branch as a field to all relevant objects
- Add optional branch argument to REST API for retrieving buckets
- Add new REST API for retrieving branches for a given registry client
- Enforce NiFi Registry can only receive default branch
This closes#8726
Signed-off-by: David Handermann <exceptionfactory@apache.org>
Simplified dependency management into Bill of Material dependencies as parents that align to classloader structures.
- Moved nifi-framework-bundle to root level
- Moved nifi-nar-bundle modules to root nifi-extension-bundles
- Added nifi-extension-bom for internal and external extensions
- Added nifi-framework-nar-bom and nifi-server-nar-bom for managing framework dependencies
- Renamed nifi-jetty-bundle to nifi-jetty-nar
This closes#8677
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Updated user interfaces to support String version numbers
- Also updated new UI to clear out the buckets and flows when selections change 'above' them in the form when importing from registry
This closes#8674
Co-authored-by: Rob Fellows <rob.fellows@gmail.com>
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Moved StandardValidators to nifi-api
- Moved URL creation method from UriUtils to URLValidator
- Separated FormatUtils into FormatUtils and DurationFormat classes
- Added DurationFormat to nifi-api
This closes#8442
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Upgraded Spring Framework from 5.3.31 to 6.0.15
- Upgraded Spring Security from 5.8.7 to 6.2.0
- Upgraded Spring Vault from 2.3.4 to 3.1.0
- Upgraded Jetty from 10.0.18 to 12.0.5 with EE 10
- Upgraded Jersey from 2.41 to 3.1.4
- Upgraded JAXB from 2.3.9 to 4.0.4
- Upgraded AspectJ from 1.9.20.1 to 1.9.21
- Upgraded JMS API from 2.0.1 to 3.1.0
- Upgraded ActiveMQ Broker from 5.18.2 to 6.0.1 for JMS 3
- Upgraded JJWT from 0.9.1 to 0.12.3
- Replaced jackson-module-jaxb-annotations with jackson-module-jakarta-xmlbind-annotations
- Replaced maven-jaxb2-plugin with hisrc-higherjaxb40-maven-plugin 2.1.1
- Replaced kongchen swagger-maven-plugin with swagger-codegen-maven-plugin from Swagger 3
- Replaced com.nickwongdev AspectJ Plugin with Codehaus 1.14.0 for newer Java versions
- Removed unused cglib-nodep
- Removed references to javax.validation
- Removed custom Jetty ALPN Processor not required for Java 21
- Removed several tests depending on older Jetty and Jakarta libraries
- Removed unnecessary webdefault.xml configurations
- Replaced unsupported cross-context servlet forwarding with HTTP forwarding
- Replaced javax.servlet references with jakarta.servlet
- Replaced javax.xml.bind references with jakarta.xml.bind
- Replaced javax.ws references with jakarata.ws
- Updated Spring Security CSRF implementation for Spring Security 6
- Updated web.xml versions to 6.0
- Updated REST API templates using new swagger-codegen variables
- Removed VALIDATE_DATA property from ParseCEF based on library compatibility issue with javax.validation
- Added application URL logging to NiFi JettyServer
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>
This closes#8197.
NIFI-11788 Standardized Logback maximum settings
- Set MiNiFi maxHistory to 10 and totalSizeCap to 10MB
- Set NiFi maxHistory to 30 and totalSizeCap to 3GB except for deprecation log
- Set Stateless maxHistory to 30 and totalSizeCap to 3GB
- Set Registry maxHistory to 30 and totalSizeCap to 3GB
NIFI-11788 Increased MiNiFi maxFileSize to 10MB and cap to 100MB
This closes#7465. Coauthored by David Handermann and Mike Thomsen
Signed-off-by: Joseph Witt <joewitt@apache.org>
- Removed support for Year field in Cron Expressions
- Changed numeric Day of Week field from starting with 1 to starting with 0
- Removed Quartz and C3P0 from Notice files
This closes#7951
Signed-off-by: Mike Moser <mosermw@apache.org>
NIFI-12245: Removed null check that is no longer necessary
NIFI-12245: Fixed checkstyle violation
Signed-off-by: Bence Simon <bsimon@apache.org>
This closes#7899
- Created NIFI-12203 to evaluate issues with flow comparison surfaced in JoinClusterWithDifferentFlow
This closes#7661
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Imported nifi-bom to nifi-commons and nifi-nar-bundles parent modules
- Removed explicit version and scope properties for dependencies declared in nifi-bom
- Added new extensible Component Type: FlowAnalysisRule
- Added DisallowComponentType Rule implementation
- Flow Analysis Rules can be managed from the UI under Controller Settings -> Flow Analysis Rules
- Flow Analysis Rules can be set up with an enforcement policy of WARN or ENFORCE
- Flow Analysis Rules can evaluate an individual Component or a Process Group
This closes#7191
Signed-off-by: David Handermann <exceptionfactory@apache.org>
When shutting down FlowController, wait up to gracefulShutdownSeconds seconds for the components to stop before shutting down thread pools. This allows for asynchronous operations such as disableControllerServicesAsync to complete during shutdown. Updated StandardStatelessFlow so that on shutdown it catches more general Exception to ensure that shutdown succeeds
Ensure that Max Concurrent Tasks cannot be set less than 1 for stateless group; fixed typo in ProcessGroupDTO's docs; on shutdown, we may need to disable controller services asynchronously. At that point, the thread pool used to do so may already be shutdown. If so, catch this and create a new single-thread pool, disable the service, and immediately shutdown the pool. Also, if we fail to disable services on shutdown of a stateless flow, instead of throwing an Exception, just log it and move on - it doesn't make much sense for shutdown() to throw an Exception in that case.
Updated system tests so that when emptying a queue, we check the result and if the queue still has data (because a Processor hasn't acknowledged the data, for example) then continue issuing request until the queue fully becomes empty.
When shutting down input/output ports for stateless group, ensure that we wait for the ports' active threads to complete before returning
When stopping StatelessGroupNode, ensure that all the Processors, Controller Services (even those not executed by the Stateless Engine) are stopped/disabled before considering the Stateless Group to be fully STOPPED.
This closes#7253
Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Removed hamcrest-all from default dependencies
- Added groovy-test to selected modules with Groovy test classes
- Added junit-vintage-engine to selected modules with JUnit 4 test classes
- Corrected references to JUnit 4 assertions in JUnit 5 test classes
- Removed several unnecessary test classes from nifi-socket-utils
- Removed duplicative Registry toolkit test classes
- Removed Kudu integration tests
NIFI-11532 Corrected scope for junit-vintage-engine for Elasticsearch
Signed-off-by: Matt Burgess <mattyb149@apache.org>
This closes#7233
Add two new properties:
nifi.stateless.component.enableTimeout
nifi.stateless.processor.startTimeout
to allow configuring the StatelessEngine and ProcessScheduler.
This allows an operator to configure what kind of startup time the flow can
tolerate.
Previously these values were hard coded.
- Added methods to enumerate Stored Component Identifiers on State Provider interface and implementations
- Added nifi.state.management.provider.cluster.previous to nifi.properties
- Updated State Manager Provider to restore Cluster State from Previous Cluster Provider
- Updated Configuring State Providers documentation for new property
- Updated GitHub workflow so that system tests include Python 3.9
- Updated GitHub actions to build necessary modules for system tests
This closes#7003
Co-authored-by: David Handermann <exceptionfactory@apache.org>
Signed-off-by: David Handermann <exceptionfactory@apache.org>