Commit Graph

146 Commits

Author SHA1 Message Date
Pierre Villard ee179f4acf
NIFI-13238 Added Checkstyle rules for whitespace
This closes #8832

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2024-05-15 06:41:19 -05:00
Ferenc Kis 52e257e16c
NIFI-13123 MiNiFi async C2 operation processing
Signed-off-by: Csaba Bejan <bejan.csaba@gmail.com>

This closes #8738.
2024-05-06 18:14:59 -04:00
Joseph Witt 42a4385c82
NIFI-12998 Restructured framework and extension modules
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>
2024-04-26 12:12:48 -05:00
EndzeitBegins 63fa036818 NIFI-12853 Refactor FlowFilePrioritizer using updated Java APIs
Signed-off-by: Mike Moser <mosermw@apache.org>

This closes #8461
2024-04-15 19:49:13 +00:00
David Handermann 250fe90b34
NIFI-9458 Replaced SimpleDateFormat with DateTimeFormatter (#8248)
- Added FieldConverterRegistry and Standard implementation
- Moved DateTypeUtils methods to FieldConverter implementations
2024-01-16 16:39:40 -05:00
Mark Payne 1d06185f13
NIFI-12453 Added cluster-status command to nifi.sh
NIFI-12454 Allow decommissioning cluster node without shutdown

This closes #8100

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-12-05 22:12:55 -06:00
Mark Payne b5c3e6f9aa
NIFI-12358 Fixed NPE in HostHeaderHandler
Fixed NPE in ThreadDumpTask and TrackedLeaderElectionManager

This closes #8032

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-11-15 16:57:18 -06:00
Mark Payne 754baf0a37
NIFI-12308: Create Python Environment in background thread instead of during Processor creation
This closes #7971

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-11-02 15:45:43 -05:00
Mark Payne cbdf32ab79
NIFI-12205: Moved loading of Python dependencies into background thread when processor created instead of during startup. Some code cleanup.
This closes #7863

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-10-14 15:05:17 -05:00
timeabarna d2aec89738
NIFI-12166 Add repo usage to the monitoring endpoint (#7836)
* NIFI-12166 Add repo usage to the monitoring endpoint
2023-10-10 14:55:33 -04:00
Mark Payne db727aa419
NIFI-12142: This closes #7806. Deleted many methods, classes, and references that were deprecated.
Signed-off-by: Joseph Witt <joewitt@apache.org>
2023-09-28 14:07:48 -07:00
Joseph Witt 4d4c97d091
NIFI-12050 Upgraded Mockito from 4.11.0 to 5.5.0
This closes #7689

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2023-09-14 09:49:42 -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
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
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
Joe Witt 43eab4c81d
NIFI-11103 prepping for 2.0.0 line 2023-02-09 15:32:53 -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
Ferenc Erdei 86acde2fe2
NIFI-10750 Move C2NiFiClientService to minifi-framework
Signed-off-by: Csaba Bejan <bejan.csaba@gmail.com>

This closes #6612.
2022-11-04 08:53:53 +01: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
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
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
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
Matthew Burgess d89f98f5b4
NIFI-9666 Implemented MiNiFi C2 client and refactored bootstrap
- Implemented MiNiFi C2 client using OkHttp
- Refactored MiNiFi bootstrap command handling and socket communication
- Added C2 Client Service to nifi-framework-core

This closes #6075

Co-authored-by: Matthew Burgess <mattyb149@apache.org>
Co-authored-by: Csaba Bejan <bejan.csaba@gmail.com>
Co-authored-by: Ferenc Erdei <ferdei@cloudera.com>

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2022-06-17 09:23:52 -05:00
exceptionfactory 15f7590f7a
NIFI-9901 Added nifi-xml-processing to nifi-commons
- Refactored XML parsing to use providers from nifi-xml-processing
- Configured spotbugs-maven-plugin with findsecbugs-plugin in nifi-xml-processing
- Disabled Validate DTD in default configuration for EvaluateXPath and EvaluateXQuery
- Replaced configuration of DocumentBuilder and streaming XML Readers with shared components
- Removed XML utilities from nifi-security-utils
- Moved Commons Configuration classes to nifi-lookup-services

This closes #5962
Signed-off-by: Paul Grey <greyp@apache.org>
2022-04-13 19:56:57 -04:00
Joe Witt 0419dc2939
NIFI-9780-RC3 prepare for next development iteration 2022-03-21 11:58:27 -07:00
Joe Witt b019a9191f
NIFI-9780-RC3 prepare release nifi-1.16.0-RC3 2022-03-21 11:58:09 -07:00
Mark Payne d0a23bc26b
NIFI-9704: Updated the ContentRepositoryScanTask to show details of how much content in the content repo is retained by each queue in the dataflow. Changed default for nifi.content.claim.max.appendable.size property from 1 MB to 50 KB. Updated docs to reflect the new default value and explain what the property does and how it's used.
Signed-off-by: Joe Gresock <jgresock@gmail.com>

This closes #5780.
2022-02-22 12:06:54 -05:00
Mark Payne 2aa6bd1e13
NIFI-9689: When all FlowFiles in a FlowFile Queue are penalized, do not schedule the destination to run. Also expose this fact via the ConnectionStatusSnapshotDTO, as this allows the front-end to render this information to the user in order to avoid confusion when it appears that the Processor has data but does nothing
Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #5771
2022-02-16 15:30:00 -05:00
exceptionfactory 0da3994ac8
NIFI-9606 This closes #5688. Removed nifi-security-utils from nifi-framework-api
Signed-off-by: Joe Witt <joewitt@apache.org>
2022-01-20 10:53:41 -07:00
Lehel Boér be138ab656
NIFI-9434: Added bulletin to alert FileSystemRepository backpressure (#5596) 2022-01-04 15:59:32 -05:00
Mark Payne 90b39b593a
NIFI-9069 Changed framework dataflow serialization to support JSON
- Changed framework so that it serializes the dataflow into a VersionedDataflow using JSON as well as XML, and prefers the JSON representation on load, if it's available. This also results in the need for the cluster protocol to exchange its representation of the dataflow to using JSON. Rather than re-implementing all of the complex logic of Flow Fingerprinting, updated to just inherit the cluster's flow.
- Moved logic to synchronize Process Group with Versioned Process Group into a new ProcessGroupSynchronizer class instead of having all of the logic within StandardProcessGroup
- Reworked versioned components to use an instance id.
- Renamed StandardFlowSynchronizer to XmlFlowSynchronizer; introduced new StandardFlowSynchronizer that delegates to the appropriate (Xml or Versioned)FlowSynchronzer
- Updated to allow import of VersionedProcessGroup even if not all bundles are available - will now use ghost components
- Introduced a VersionedDataflow object to hold controller-level services, reporting tasks, parameter contexts, templates, etc.
- Allow mutable requests to be made while nodes are disconnected. Also fixed issue in AbstractPolicyBasedAuthorizer that caused ClassNotFoundException / NoClassDefFoundError if the authorizations were changed and then a node attempts to rejoin the cluster. The Authorizer was attempting to use XmlUtils, which is in nifi-security-utils and so so by madking nifi-security-utils a provided dependency of nifi-framework-api, but this doesn't work, because nifi-framework-api is loaded by a higher-level classloader, so the classloader that loads AbstractPolicyBasedAuthorizer will never have the appropriate classloader to provide nifi-security-utils. Addressed this by copying the code for creating a safe document builder from XmlUtils to AbstractPolicyBasedAuthorizer.
- Fixed bug that occurred when importing a Process Group that has 2 parameter contexts, one inheriting from another, where neither is pre-defined in the existing flow
- Fixed bug that was encountered when Updating a Versioned Process Group where one version had a disabled processor and the other had the processor running.
- Increased system-tests workflow timeout to 120 minutes
- Added additional exception handling to system tests

This closes #5514

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2021-12-02 15:10:38 -06:00
Joe Witt c055895952
NIFI-9344-RC3 prepare for next development iteration 2021-11-03 08:53:37 -07:00
Joe Witt 7fdc07cccd
NIFI-9344-RC3 prepare release nifi-1.15.0-RC3 2021-11-03 08:53:32 -07:00
Lehel Boér f7df326521 NIFI-9183: Add a command-line option to save status history
Fixed typo error.

Fixed error.

Fixed review items.

Fix contrib-check. Added missing test file to excludes.

Fix review items.

Fix review items: error handling, input validation, added more unit tests.

Improved status history repository creation in HeadlessNiFiServer.
2021-10-12 16:35:20 +02:00
Mike Thomsen 6a55c6ca44
NIFI-9081 Updated nifi-framework-api tests to JUnit 5
- Updated nifi-external tests to JUnit 5
- Updated nifi-stateless to use JUnit 5
- Updated nifi-api to use JUnit 5

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2021-09-11 14:57:38 -05:00
Hsin-Ying Lee 59f0b6bac3
NIFI-8739 Penalized flowfiles should be able to be polled from the queue in some cases (#5189) 2021-08-30 11:26:02 -04:00
Mark Payne fb4edfa0d6
NIFI-8950: Added ability to optionally use a file-system backed Content Repository for Stateless NiFi
This closes #5254

Signed-off-by: David Handermann <exceptionfactory@apache.org>
2021-08-11 12:01:07 -05:00
Joe Witt 97feacc181
NIFI-8767-RC2 prepare for next development iteration 2021-07-10 12:17:09 -07:00
Joe Witt fcbf1d5f97
NIFI-8767-RC2 prepare release nifi-1.14.0-RC2 2021-07-10 12:17:05 -07:00
Jon Kessler 2309d75d3d NIFI-8126
- Added totalActiveQueuedDuration and maxActiveQueuedDuration to the ConnectionStatus object
- Updated FlowFileQueue implementations and supporting code to properly calculate and provide the totalActiveQueuedDuration and maxActiveQueuedDuration for their active queues
- Fixing failing unit test. In examining this it appears that the unit test only accidentally passed in the past and that the object mocked to always throw an exception was not actually being used in the test.
- Adding UI component via ConnectionStatusDescriptor along with updates based on PR comments.

Signed-off-by: Mark Payne <markap14@hotmail.com>
2021-05-18 17:09:53 -04:00
Mark Payne 935566ba23 NIFI-8433 Added ability to decommission a node in a cluster
This closes #5004

Signed-off-by: Joey Frazee <jfrazee@apache.org>
2021-05-01 12:45:48 -07:00
markap14 321e979673
NIFI-8353: When receiving data via load-balanced connection, throw an Exception (resulting in an ABORT_TRANSACTION status code) when attempting to add received FlowFiles to the FlowFile queue, if the node is not currently connected to cluster. In this case, ensure that we remove the received FlowFiles from the FlowFile Repository and emit a DROP event to the repository (with appropriate details) to coincide with the already-committed Provenance events. Also ensure that when a node is disconnected that we don't keep sending to that node until it reconnects. While testing the fixes via LoadBalancedQueueIT, also noticed that unit test logging was not working properly in nifi-framework-core because of the (erroneous) dependency on logback-class; removed this dependency and updated unit tests that were created that depended on its existence. (#4924) 2021-03-23 14:17:54 -04:00
Bence Simon 7730777d66 NIFI-8113 Adding persistent status history repository backed by embedded QuestDB
Signed-off-by: Mark Payne <markap14@hotmail.com>
2021-02-25 15:59:01 -05:00