Commit Graph

114 Commits

Author SHA1 Message Date
Tamas Palfy d4147ca442
NIFI-8650 Added Flow Analysis Rules
- 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>
2023-08-29 15:50:22 -05:00
Mark Payne b3c620411a
NIFI-11556: Added ability to use a Process Group as a Stateless Flow
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>
2023-08-09 12:08:22 -05:00
Pierre Villard dbb2d6905f
NIFI-11842 - remove getTargetUri() and code cleanup
This closes #7511

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-07-24 13:53:17 -05:00
Pierre Villard 150bfbe990
NIFI-11813 Removed Event Driven Scheduling Strategy
This closes #7483

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-07-18 12:22:52 -05:00
exceptionfactory 1f1c5df5a3
NIFI-11673 Removed Legacy TLS Configuration Versions
This closes #7367

Signed-off-by: Nandor Soma Abonyi <nsabonyi@apache.org>
2023-06-26 11:10:39 +02:00
timeabarna ba6797bb94
NIFI-3065 Per Process Group logging (#7315)
* NIFI-3065 Per Process Group logging
2023-06-23 21:14:34 -04:00
exceptionfactory ca6c7f7041 NIFI-11532 Removed JUnit 4 and Groovy Test from default dependencies
- 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
2023-06-13 15:36:23 -04:00
David Young ea5b303917 NIFI-11471: Define new stateless configuration points
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.
2023-06-12 14:48:01 -04:00
exceptionfactory e302f2aff7
NIFI-10976 Added Previous Cluster State Provider configuration (#7235)
- 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
2023-05-10 16:22:05 -04:00
Mark Payne 7f7cccfdc2
NIFI-11241 Initial implementation of Python-based Processor API with Py4J
- 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>
2023-04-14 15:03:34 -05:00
Pierre Villard 83d19a6e9d
NIFI-11413 Upgraded JUnit 5.9.1 to 5.9.2
- Upgraded JUnit 4.13.1 to 4.13.2

This closes #7144

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-04-10 08:42:24 -05:00
Dustin Rodrigues 2ac1388ce9
NIFI-11422 fix stateless-assembly README typo
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #7153.
2023-04-10 10:20:44 +03:00
Mark Payne 016d58612c
NIFI-11290 Run Component Primary Node State changes in background thread
- Ensure that components are notified that primary node has changed in a background thread instead of the Leader Election thread and activate/deactivate the thread in the case of Processors so that they can be viewed in the UI and terminated

- Fixed system tests that would fail intermittently because they did not wait for node disconnection to complete and did not properly switch the client to look at the connected node before checking cluster status

This closes #7052

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-03-23 12:20:37 -05:00
simonbence f062b0d1f1
NIFI-11319 Fixing TestStatelessBootstrap::testClassNotAllowed (#7070) 2023-03-22 16:23:44 -04:00
exceptionfactory 512155ba2f
NIFI-10975 Add Kubernetes Leader Election and State Provider (#6779)
* NIFI-10975 Added Kubernetes Leader Election and State Provider
- Added Kubernetes Leader Election Manager based on Kubernetes Leases
- Added Kubernetes State Provider based on Kubernetes ConfigMaps
- Added nifi-kubernetes-client for generalized access to Fabric8 Kubernetes Client
- Added nifi.cluster.leader.election.implementation Property defaulting to CuratorLeaderElectionManager
- Refactored LeaderElectionManager to nifi-framework-api for Extension Discovering Manager
- Refactored shared ZooKeeper configuration to nifi-framework-cluster-zookeeper

* NIFI-10975 Updated Kubernetes Client and StateMap
- Upgraded Kubernetes Client from 6.2.0 to 6.3.0
- Added getStateVersion to StateMap and deprecated getVersion
- Updated Docker start.sh with additional properties

* NIFI-10975 Corrected MockStateManager.assertStateSet()
* NIFI-10975 Upgraded Kubernetes Client from 6.3.0 to 6.3.1
* NIFI-10975 Corrected unregister leader and disabled release on cancel

* NIFI-10975 Corrected findLeader handling of Lease expiration
- Changed LeaderElectionManager.getLeader() return to Optional String

* NIFI-10975 Corrected StandardNiFiServiceFacade handling of Optional Leader
* NIFI-10975 Changed getLeader() to call findLeader() to avoid stale cached values
* NIFI-10975 Updated LeaderElectionCommand to run LeaderElector in loop
* NIFI-10975 Rebased on project version 2.0.0-SNAPSHOT

* NIFI-10975 Corrected Gson and AspectJ versions
- Updated versions to match current main branch and avoid reverting
2023-03-07 14:14:24 -05:00
exceptionfactory 284804ac42
NIFI-11188 Removed ProcessContext encrypt and decrypt methods
- Removed unnecessary references to PropertyEncryptor from multiple framework components

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

This closes #6962.
2023-02-16 12:16:15 -05:00
exceptionfactory 1156f4cbc5
NIFI-11165 This closes #6944. Removed optional jigsaw build profiles
- Removed jigsaw build profiles
- Removed Java 11 directories from assemblies

Signed-off-by: Joe Witt <joewitt@apache.org>
2023-02-13 13:01:58 -05:00
Joe Witt 43eab4c81d
NIFI-11103 prepping for 2.0.0 line 2023-02-09 15:32:53 -07:00
exceptionfactory 972667461b
NIFI-10580 This closes #6867. Upgraded SLF4J from 1.7.36 to 2.0.6
- Upgraded Logback from 1.2.11 to 1.3.5
- Updated Logback DelayingShutdownHook to DefaultShutdownHook
- Disabled Spring Boot Logging System in favor of standard Logback initialization
- Excluded logback-classic from ZooKeeper and other dependencies to avoid conflicts when running tests
- Excluded spring-boot-starter-logging to avoid failures related to Logback 1.2 and Spring Boot 2.7
- Removed ZooKeeperMigratorTest.groovy based on Apache Curator test server usage of Logback 1.2

NIFI-10580 Added logback-core as explicit dependency

- Set logback-core as provided in root configuration
- Added logback-core as compile dependency in assembly configurations

Signed-off-by: Joe Witt <joewitt@apache.org>
2023-01-23 11:38:10 -07:00
Peter Turcsanyi cb77a96059
NIFI-11088: This closes #6878. updated copyright year to 2023 in NOTICE files
Signed-off-by: Joe Witt <joewitt@apache.org>
2023-01-23 09:42:44 -07:00
Joe Witt 75e7c9e47c
NIFI-10854-RC1 prepare for next development iteration 2022-11-22 19:22:47 -07:00
Joe Witt ec87bf93ad
NIFI-10854-RC1 prepare release nifi-1.19.0-RC1 2022-11-22 19:22:45 -07:00
Mark Payne bda624823b
NIFI-10817: Moved the calls in StandardProcessSession to 'resetState()' and 'acknowledgeRecords()' from the outer commit(boolean) to the inner commit(Checkpoint, boolean). By moving the call here, the logic of StandardProcessSession is unaffected. But the StatelessProcessSession that inherits from it now has the benefit of having the state cleaned up when calling super.commit(Checkpoint, boolean).
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6663
2022-11-15 15:47:32 -05:00
Timea Barna 7c33516aee NIFI-9437 Flowfile Expiration cannot exceed 24 days
NIFI-9437 Addressing review comments, correcting setter in StatelessFlowQueue class

Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #6558.
2022-10-24 14:46:56 -04:00
Joe Witt c9ebdd2025
NIFI-10521-RC4 prepare for next development iteration 2022-10-03 10:59:36 -07:00
Joe Witt 109e54cd58
NIFI-10521-RC4 prepare release nifi-1.18.0-RC4 2022-10-03 10:59:34 -07:00
simonbence 94fdc794b0
NIFI-10497 Making RegistryClient an extension point (#6433)
- NIFI-10497 Mae FlowRegistryClient an extension point
2022-09-26 12:16:21 -04:00
Mark Payne 3f0ef9e977
NIFI-10406: Updated Maven assemblies to ensure that we always use at least two of the GAVC parameters for includes and excludes. Updated Maven assembly plugin to version 3.4.2. Removed some includes and excludes from dependencies that previously were not matching and were generating Maven WARNING messages.
This closes #6415

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-09-15 11:02:08 -05:00
Joe Gresock de7793e69b
NIFI-9003 Added framework support for Parameter Providers
- Added Environment Variable and File Parameter Provider implementations
- Added Parameter Provider commands to CLI
- Added component search handling for Parameter Providers
- Added documentation for integrating Parameter Providers

This closes #5369

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-09-09 13:04:56 -05:00
Mark Payne a0c705715b
NIFI-10429: Added the ability to Replay latest provenance event for a given Processor.
This closes #6359

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-09-08 15:55:26 -05:00
Mark Payne 6b424c3fd3
NIFI-10375: If a class is not allowed in the AllowListClassLoader by classname, check the class's module and allow through anything in the java. or jdk. modules.
NIFI-10375: Addressed review feedback: removed loading of classes from JMODs in the StatelessBootstrap because it only was relevant if using JDK. Instead, just inspect the module as we do when using the JRE. Also addressed issue of allow NoClassDefFoundError fly when we should use ClassNotFoundException

This closes #6317.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-08-24 16:45:31 +02:00
Joe Witt 8c66bf948c
NIFI-10272-RC2 prepare for next development iteration 2022-07-27 13:24:09 -07:00
Joe Witt 8d256784d8
NIFI-10272-RC2 prepare release nifi-1.17.0-RC2 2022-07-27 13:24:06 -07:00
Mark Payne 5e83bda9e9
NIFI-10167: Added advanced timing metrics for processors, such as CPU Usage, time reading/writing content repo, process session commit time, etc. Exposed via nifi.sh diagnostics and made configurable via nifi.properties
This closes #6156

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-06-30 10:50:24 -05:00
timeabarna d5b626f0e4
NIFI-10108 Processor scheduling via parameter (#6115)
- NIFI-10108 Processor scheduling via parameter
- Refactoring component referencing check in AbstractComponentNode and StandardParameterReferenceManager classes.
2022-06-30 10:11:13 -04:00
Mark Payne 1442dcef23
NIFI-10111: Added option to unpack NARs into an Uber Jar and updated stateless nifi to always use this.
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6117
2022-06-24 13:12:14 -04:00
Nathan Gough 62eb565daf
NIFI-5402 - Added more assembly options for different modules. Assemblies should build a zip by default, or a tar.gz with the -Ptargz profile
This closes #5694
Signed-off-by: Paul Grey <greyp@apache.org>
2022-06-23 13:52:41 -04:00
exceptionfactory bd45eb4995 NIFI-10100 Upgraded Jersey to 2.35
- Replaced individual version references with Jersey BOM dependency

Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #6106.
2022-06-16 23:09:22 -04:00
exceptionfactory 99be62be67
NIFI-9958 Add Framework Support for Sensitive Dynamic Properties (#6057)
* NIFI-9958 Implemented Sensitive Dynamic Properties

- Added SupportsSensitiveDynamicProperties annotation for components
- Added optional sensitive query parameter to Property Descriptor REST Resource methods
- Added system tests for components supporting sensitive dynamic properties
- Updated REST Resources to support Sensitive Dynamic Property Names
- Updated Documentation Writer to indicate component support for Sensitive Dynamic Properties
- Updated InvokeHTTP to support Sensitive Dynamic Properties
- Updated Auditor components to handle masking Sensitive Dynamic Properties

* Refactored Property Descriptor REST method handling

- Corrected AbstractDocumentationWriter evaluation of support for sensitive dynamic properties
- Refactored Controller Service Dynamic Properties system tests to new class

* Updated AbstractComponentNode.getProperties() to get canonical descriptor
2022-05-23 17:20:54 -04:00
exceptionfactory 85d5e2071b
NIFI-10031 Downgraded Jakarta Mail from 2.0.1 to 1.6.7 (#6052)
- Downgraded Jakarta Activation from 2.0.1 to 1.2.2 in nifi-bootstrap
- Updated assembly configurations to include Jakarta Activation in java11 directory
2022-05-18 11:38:36 -04:00
Mark Payne 9311188785
NIFI-10004: Allow loading .class files that are relative to the NAR directory, in addition to the .jar / .nar files
NIFI-10004: When determining classname from a file, consider File.separator instead of just /
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6026
2022-05-09 14:54:01 -04:00
exceptionfactory 4f423a59ba
NIFI-9952 Upgraded Jackson BOM to 2.13.2.20220328
- Removed unnecessary references to jackson.version property
- Removed unnecessary dependency management references to Jackson libraries

This closes #5992

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2022-04-23 08:23:39 -04:00
Mark Payne 5a3c7d1fbd
NIFI-9940: Renamed StandardProcessGroupSynchronizer to StandardVersionedComponentSynchronizer. Added synching for processors, input/output ports, connections, etc. Added unit tests.
This closes #5983
2022-04-21 10:28:21 -04:00
Mark Payne aeaec170d5 NIFI-9861: Removed BlockListClassLoader in favor of AllowListClassLoader
NIFI-9861: Fixed stateless-processor-tests assembly to ensure that all necessary libraries were included; removed BlockListClassLoader
NIFI-9861: Fixed issue in which we would list .class files as files that we allow through the AllowListClassLoader but didn't allow them.

This closes #5925.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-04-20 22:49:43 +02:00
Joe Witt 873d25585c
NIFI-9780 Merge branch 'NIFI-9780-RC3' 2022-04-04 08:35:23 -07:00
Mark Payne 2e66cf7114 NIFI-9854: Include slf4j-api as runtime scope for nifi-stateless-system-test-suite; When constructing the classes to block for the stateless ClassLoader, allow through any classes that come from Java Home's lib/ directory
This closes #5920.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-04-01 17:51:07 +02:00
markap14 940fd8e81c
NIFI-9847: Switched LifecycleState to use a WeakHashMap to track Acti… (#5917)
* NIFI-9847: Switched LifecycleState to use a WeakHashMap to track ActiveProcessSessionFactory instances, instead of a regular Set that removed the instance after calling onTrigger. This was necessary for processors such as MergeRecord that may stash away an ActiveProcessSessionFactory for later use, as we need to be able to force rollback on processor termination

* NIFI-9847: Fixed checkstyle violation
2022-03-30 15:25:14 -04:00
exceptionfactory 0fa4490a98
NIFI-9842 Refactored nifi-commons using JUnit 5
- Refactored nifi-bootstrap using JUnit 5
- Refactored nifi-maven-archetypes using JUnit 5
- Refactored nifi-stateless using JUnit 5

This closes #5912

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
2022-03-28 16:00:23 -04:00
Mark Payne 16c9bd535b NIFI-9834: When calling ByteArrayContentRepository.read() on a null Content Claim, return an empty ByteArrayInputStream instead of throwing NullPointerException
This closes #5903.

Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
2022-03-25 21:07:25 +01:00
Joe Witt 0419dc2939
NIFI-9780-RC3 prepare for next development iteration 2022-03-21 11:58:27 -07:00