You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by fg...@apache.org on 2025/02/13 17:32:48 UTC
(nifi-minifi-cpp) branch main updated: MINIFICPP-2462 Divide libminifi
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new a2f8851c0 MINIFICPP-2462 Divide libminifi
a2f8851c0 is described below
commit a2f8851c0aa47d46bbc6ae34ed6b618a7640d6d7
Author: Adam Debreceni <ad...@apache.org>
AuthorDate: Mon Sep 16 16:44:17 2024 +0200
MINIFICPP-2462 Divide libminifi
Separate libminifi into minifi-api (core api), extension-utils, utils (common
utils used both by the extensions and the minifi exe), and libminifi.
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
This closes #1902
---
CMakeLists.txt | 3 +
controller/MiNiFiController.cpp | 6 +-
controller/tests/ControllerTests.cpp | 19 +-
encrypt-config/CMakeLists.txt | 2 +-
encrypt-config/FlowConfigEncryptor.cpp | 4 +-
encrypt-config/tests/CMakeLists.txt | 2 +-
extension-utils/CMakeLists.txt | 35 ++
.../include/FlowFileRecord.h | 6 +-
.../include/ResourceClaim.h | 6 +-
.../include/controllers/AttributeProviderService.h | 10 +-
.../include/controllers/RecordSetReader.h | 10 +-
.../include/controllers/RecordSetWriter.h | 11 +-
.../include/controllers/SSLContextService.h | 6 +-
.../controllers/keyvalue/KeyValueStateManager.h | 3 +-
.../controllers/keyvalue/KeyValueStateStorage.h | 9 +-
.../include/core/AbstractProcessor.h | 8 +-
.../include/core/FlowFile.h | 7 +-
.../include/core/FlowFileStore.h | 0
.../include/core/ProcessSession.h | 9 +-
.../include/core/StateManager.h | 26 +-
.../include/core/StateStorage.h | 14 +-
.../include/properties/Configure.h | 6 +-
.../include/properties/Properties.h | 6 +-
.../include/serialization/FlowFileSerializer.h | 2 +-
.../include/serialization/FlowFileV3Serializer.h | 0
.../include/serialization/PayloadSerializer.h | 0
.../include/utils/ListingStateManager.h | 3 -
.../include/utils/OpenTelemetryLogDataModelUtils.h | 2 +-
.../include/utils/ProcessorConfigUtils.h | 0
.../include/utils/ResourceQueue.h | 10 +-
.../include/utils/file/FileManager.h | 0
.../include/utils/file/FileReaderCallback.h | 0
.../include/utils/file/FileWriterCallback.h | 2 +-
.../include/utils/file/ListedFile.h | 1 +
.../include/utils/net/ConnectionHandler.h | 4 +-
.../include/utils/net/ConnectionHandlerBase.h | 0
.../include/utils/net/IpProtocol.h | 0
.../include/utils/net/Message.h | 0
.../include/utils/net/Server.h | 0
.../include/utils/net/Ssl.h | 0
.../include/utils/net/TcpServer.h | 0
.../include/utils/net/UdpServer.h | 2 +-
.../controllers/keyvalue/KeyValueStateManager.cpp | 2 +-
.../controllers/keyvalue/KeyValueStateStorage.cpp | 2 +-
.../src/core/ProcessContext.cpp | 24 +-
.../src/serialization/FlowFileV3Serializer.cpp | 3 +-
.../src/serialization/PayloadSerializer.cpp | 12 +-
extension-utils/src/utils/CallBackTimer.cpp | 84 ++++
.../src/utils/ListingStateManager.cpp | 4 +-
.../src/utils/ProcessorConfigUtils.cpp | 0
.../src/utils/file/FileReaderCallback.cpp | 2 +-
.../src/utils/file/FileWriterCallback.cpp | 0
.../src/utils/net/Ssl.cpp | 0
.../src/utils/net/TcpServer.cpp | 0
.../src/utils/net/UdpServer.cpp | 0
extensions/ExtensionHeader.txt | 8 -
extensions/aws/AWSCredentialsProvider.cpp | 26 +-
extensions/aws/AWSCredentialsProvider.h | 8 +-
.../aws/controllerservices/AWSCredentialsService.h | 8 +-
extensions/aws/processors/S3Processor.cpp | 4 +-
extensions/aws/processors/S3Processor.h | 5 +-
extensions/aws/s3/MultipartUploadStateStorage.cpp | 1 +
extensions/aws/s3/MultipartUploadStateStorage.h | 2 +-
extensions/aws/s3/S3RequestSender.h | 2 +-
extensions/aws/s3/S3Wrapper.h | 5 +-
extensions/aws/tests/AWSCredentialsServiceTest.cpp | 4 +-
extensions/aws/utils/AWSSdkLogger.cpp | 1 +
extensions/aws/utils/AWSSdkLogger.h | 2 +-
.../AzureStorageCredentialsService.h | 8 +-
.../AzureBlobStorageSingleBlobProcessorBase.h | 2 +-
.../processors/AzureDataLakeStorageProcessorBase.h | 2 +-
.../azure/processors/AzureStorageProcessorBase.h | 6 +-
.../azure/processors/DeleteAzureBlobStorage.h | 2 +-
.../azure/processors/FetchAzureBlobStorage.h | 4 +-
extensions/azure/processors/ListAzureBlobStorage.h | 2 +-
extensions/azure/processors/PutAzureBlobStorage.h | 8 +-
extensions/azure/storage/AzureBlobStorage.h | 3 +-
.../azure/storage/AzureBlobStorageClient.cpp | 4 +-
extensions/azure/storage/AzureBlobStorageClient.h | 2 +-
extensions/azure/storage/AzureDataLakeStorage.h | 3 +-
.../azure/storage/AzureDataLakeStorageClient.h | 4 +-
extensions/azure/utils/AzureSdkLogger.h | 2 +-
extensions/bustache/ApplyTemplate.h | 8 +-
extensions/civetweb/processors/ListenHTTP.cpp | 6 +-
extensions/civetweb/processors/ListenHTTP.h | 6 +-
extensions/civetweb/tests/ListenHTTPTests.cpp | 4 +-
.../controllerservices/CouchbaseClusterService.h | 8 +-
extensions/couchbase/processors/GetCouchbaseKey.h | 2 +-
extensions/couchbase/processors/PutCouchbaseKey.h | 2 +-
.../couchbase/tests/GetCouchbaseKeyTests.cpp | 3 +-
.../couchbase/tests/PutCouchbaseKeyTests.cpp | 3 +-
.../ElasticsearchCredentialsControllerService.h | 4 +-
extensions/elasticsearch/PostElasticsearch.h | 4 +-
extensions/elasticsearch/tests/MockElastic.h | 2 +-
.../elasticsearch/tests/PostElasticsearchTests.cpp | 1 +
extensions/execute-process/ExecuteProcess.cpp | 10 +-
extensions/execute-process/ExecuteProcess.h | 6 +-
extensions/expression-language/Expression.cpp | 2 +
.../ExpressionContextBuilder.cpp | 4 +-
.../expression-language/ExpressionContextBuilder.h | 4 +-
.../expression-language/ProcessContextExpr.cpp | 16 +-
.../expression-language/ProcessContextExpr.h | 14 +-
.../impl/expression/Expression.h | 2 +-
.../tests/ExpressionLanguageTests.cpp | 348 +++++++-------
.../tests/ProcessContextExprTests.cpp | 12 +-
.../GCPCredentialsControllerService.h | 6 +-
extensions/gcp/processors/DeleteGCSObject.h | 2 +-
extensions/gcp/processors/FetchGCSObject.h | 7 +-
extensions/gcp/processors/GCSProcessor.h | 4 +-
extensions/gcp/processors/ListGCSBucket.h | 2 +-
extensions/gcp/processors/PutGCSObject.h | 9 +-
extensions/grafana-loki/PushGrafanaLoki.cpp | 2 +-
extensions/grafana-loki/PushGrafanaLoki.h | 6 +-
extensions/grafana-loki/PushGrafanaLokiGrpc.h | 9 +-
.../grafana-loki/tests/MockGrafanaLokiREST.h | 2 +-
extensions/kafka/ConsumeKafka.h | 2 +-
extensions/kafka/KafkaConnection.h | 2 +-
extensions/kafka/KafkaProcessorBase.h | 4 +-
extensions/kafka/PublishKafka.h | 2 +-
extensions/kafka/rdkafka_utils.h | 2 +-
.../KubernetesControllerService.cpp | 10 +-
.../KubernetesControllerService.h | 6 +-
.../processors/CollectKubernetesPodMetrics.h | 8 +-
extensions/libarchive/ArchiveStreamProvider.cpp | 6 +-
extensions/libarchive/BinFiles.cpp | 2 +-
extensions/libarchive/BinFiles.h | 6 +-
extensions/libarchive/CompressContent.h | 8 +-
extensions/libarchive/FocusArchiveEntry.h | 6 +-
extensions/libarchive/ManipulateArchive.h | 4 +-
extensions/libarchive/MergeContent.cpp | 2 +-
extensions/libarchive/MergeContent.h | 5 +-
extensions/libarchive/ReadArchiveStream.h | 5 +-
extensions/libarchive/UnfocusArchiveEntry.h | 6 +-
extensions/libarchive/WriteArchiveStream.h | 6 +-
.../libarchive/tests/CompressContentTests.cpp | 22 +-
extensions/libarchive/tests/MergeFileTests.cpp | 84 ++--
extensions/lua/LuaScriptExecutor.cpp | 2 +-
extensions/lua/LuaScriptProcessContext.h | 1 +
extensions/mqtt/processors/AbstractMQTTProcessor.h | 8 +-
extensions/mqtt/processors/ConsumeMQTT.h | 2 +-
extensions/mqtt/processors/PublishMQTT.cpp | 6 +-
extensions/mqtt/processors/PublishMQTT.h | 12 +-
extensions/opc/include/fetchopc.h | 2 +-
extensions/opc/include/opc.h | 2 +-
extensions/opc/include/opcbase.h | 6 +-
extensions/opc/include/putopc.h | 2 +-
extensions/opc/src/fetchopc.cpp | 1 +
extensions/opc/src/opc.cpp | 4 +-
extensions/opc/src/putopc.cpp | 1 +
extensions/opencv/CaptureRTSPFrame.h | 9 +-
extensions/opencv/MotionDetector.h | 8 +-
extensions/pdh/PerformanceDataMonitor.h | 8 +-
extensions/procfs/ProcFs.h | 2 +-
extensions/procfs/processors/ProcFsMonitor.h | 8 +-
extensions/procfs/tests/MemInfoTests.cpp | 2 +-
extensions/prometheus/PrometheusExposerWrapper.h | 2 +-
.../prometheus/PrometheusMetricsPublisher.cpp | 4 +-
extensions/prometheus/PrometheusMetricsPublisher.h | 4 +-
.../prometheus/PublishedMetricGaugeCollection.cpp | 2 +-
.../prometheus/PublishedMetricGaugeCollection.h | 3 +-
.../tests/PrometheusMetricsPublisherTest.cpp | 4 +-
extensions/python/ExecutePythonProcessor.cpp | 4 +-
extensions/python/ExecutePythonProcessor.h | 4 +-
extensions/python/PythonCreator.h | 14 +-
extensions/python/PythonDependencyInstaller.cpp | 1 +
extensions/python/PythonDependencyInstaller.h | 2 +-
extensions/python/PythonScriptEngine.h | 3 +-
extensions/python/PythonScriptExecutor.cpp | 2 +-
.../python/pythonlibloader/PythonLibLoader.cpp | 2 +-
extensions/python/tests/PythonManifestTests.cpp | 4 +-
extensions/python/types/PyRecordSetWriter.cpp | 2 +-
extensions/rocksdb-repos/CMakeLists.txt | 5 +-
.../rocksdb-repos/DatabaseContentRepository.cpp | 4 +-
.../rocksdb-repos/DatabaseContentRepository.h | 6 +-
extensions/rocksdb-repos/FlowFileLoader.cpp | 4 +-
extensions/rocksdb-repos/FlowFileLoader.h | 3 +-
extensions/rocksdb-repos/FlowFileRepository.cpp | 9 +-
extensions/rocksdb-repos/FlowFileRepository.h | 8 +-
extensions/rocksdb-repos/ProvenanceRepository.cpp | 2 +-
extensions/rocksdb-repos/ProvenanceRepository.h | 6 +-
extensions/rocksdb-repos/RocksDbRepository.cpp | 1 +
extensions/rocksdb-repos/RocksDbRepository.h | 4 +-
extensions/rocksdb-repos/RocksDbStream.cpp | 2 +-
extensions/rocksdb-repos/RocksDbStream.h | 4 +-
.../controllers/RocksDbStateStorage.cpp | 2 +-
.../controllers/RocksDbStateStorage.h | 4 +-
extensions/rocksdb-repos/database/ColumnHandle.cpp | 2 +-
extensions/rocksdb-repos/database/DbHandle.cpp | 2 +-
extensions/rocksdb-repos/database/OpenRocksDb.h | 2 +-
.../rocksdb-repos/database/RocksDatabase.cpp | 2 +-
extensions/rocksdb-repos/database/RocksDatabase.h | 2 +-
.../rocksdb-repos/database/RocksDbInstance.cpp | 2 +-
.../rocksdb-repos/database/RocksDbInstance.h | 2 +-
.../encryption/RocksDbEncryptionProvider.cpp | 2 +-
.../encryption/RocksDbEncryptionProvider.h | 2 +-
.../rocksdb-repos/tests/ContentSessionTests.cpp | 4 +-
.../tests/DBContentRepositoryTests.cpp | 42 +-
.../tests/DBProvenanceRepositoryTests.cpp | 4 +-
extensions/rocksdb-repos/tests/EncryptionTests.cpp | 6 +-
extensions/rocksdb-repos/tests/ProvenanceTests.cpp | 26 +-
extensions/rocksdb-repos/tests/RepoTests.cpp | 82 ++--
.../rocksdb-repos/tests/RocksDBUtilsTests.cpp | 2 +-
extensions/rocksdb-repos/tests/SwapTests.cpp | 18 +-
extensions/script/ExecuteScript.h | 6 +-
extensions/script/ScriptExecutor.h | 10 +-
extensions/sftp/client/SFTPClient.cpp | 2 +
extensions/sftp/client/SFTPClient.h | 15 +-
extensions/sftp/processors/FetchSFTP.h | 2 +-
extensions/sftp/processors/PutSFTP.h | 2 +-
extensions/sftp/processors/SFTPProcessorBase.cpp | 4 +-
extensions/sftp/processors/SFTPProcessorBase.h | 2 +-
extensions/sftp/tests/ListSFTPTests.cpp | 10 +-
extensions/sftp/tests/tools/SFTPTestServer.h | 2 +-
extensions/smb/FetchSmb.h | 8 +-
extensions/smb/ListSmb.h | 8 +-
extensions/smb/PutSmb.cpp | 1 +
extensions/smb/PutSmb.h | 8 +-
extensions/smb/SmbConnectionControllerService.h | 11 +-
extensions/smb/tests/FetchSmbTests.cpp | 2 +-
extensions/splunk/SplunkHECProcessor.h | 4 +-
extensions/splunk/tests/MockSplunkHEC.h | 2 +-
extensions/sql/data/SociConnectors.cpp | 2 +-
extensions/sql/data/SociConnectors.h | 2 +-
extensions/sql/processors/FlowFileSource.h | 2 +-
extensions/sql/processors/SQLProcessor.h | 4 +-
extensions/sql/services/DatabaseService.cpp | 4 +-
extensions/sql/services/DatabaseService.h | 18 +-
extensions/sql/services/ODBCConnector.h | 16 +-
extensions/sql/tests/SQLTestPlan.h | 4 +-
.../controllers/JsonRecordSetReader.h | 5 +-
.../controllers/JsonRecordSetWriter.h | 7 +-
.../controllers/PersistentMapStateStorage.cpp | 2 +-
.../controllers/PersistentMapStateStorage.h | 4 +-
.../controllers/VolatileMapStateStorage.cpp | 2 +-
.../controllers/VolatileMapStateStorage.h | 2 +-
.../standard-processors/modbus/FetchModbusTcp.cpp | 1 +
.../standard-processors/modbus/FetchModbusTcp.h | 6 +-
.../modbus/ReadModbusFunctions.h | 2 +-
.../processors/AppendHostInfo.cpp | 2 +-
.../processors/AppendHostInfo.h | 7 +-
.../processors/AttributeRollingWindow.h | 2 +-
.../processors/AttributesToJSON.h | 6 +-
.../processors/DefragmentText.cpp | 2 +-
.../processors/DefragmentText.h | 6 +-
.../standard-processors/processors/ExtractText.h | 5 +-
.../standard-processors/processors/FetchFile.h | 6 +-
.../processors/GenerateFlowFile.h | 5 +-
.../standard-processors/processors/GetFile.cpp | 3 +-
.../standard-processors/processors/GetFile.h | 18 +-
.../standard-processors/processors/GetTCP.cpp | 1 -
extensions/standard-processors/processors/GetTCP.h | 10 +-
.../standard-processors/processors/HashContent.h | 5 +-
.../standard-processors/processors/InvokeHTTP.h | 13 +-
.../processors/JoltTransformJSON.h | 4 +-
.../standard-processors/processors/ListFile.h | 6 +-
.../standard-processors/processors/ListenSyslog.h | 3 +-
.../standard-processors/processors/ListenTCP.h | 3 +-
.../standard-processors/processors/ListenUDP.h | 4 +-
.../standard-processors/processors/LogAttribute.h | 7 +-
.../processors/NetworkListenerProcessor.h | 4 +-
.../standard-processors/processors/PutFile.h | 7 +-
.../standard-processors/processors/PutTCP.cpp | 2 +-
extensions/standard-processors/processors/PutTCP.h | 4 +-
.../standard-processors/processors/PutUDP.cpp | 4 +-
extensions/standard-processors/processors/PutUDP.h | 4 +-
.../standard-processors/processors/ReplaceText.cpp | 4 +-
.../standard-processors/processors/ReplaceText.h | 3 +-
.../standard-processors/processors/RetryFlowFile.h | 8 +-
.../processors/RouteOnAttribute.h | 7 +-
.../standard-processors/processors/RouteText.cpp | 4 +-
.../standard-processors/processors/RouteText.h | 2 +-
.../processors/SegmentContent.h | 4 +-
.../standard-processors/processors/SplitContent.h | 4 +-
.../standard-processors/processors/SplitRecord.h | 2 +-
.../standard-processors/processors/SplitText.cpp | 1 +
.../standard-processors/processors/SplitText.h | 5 +-
.../standard-processors/processors/TailFile.cpp | 3 +-
.../standard-processors/processors/TailFile.h | 7 +-
.../processors/UpdateAttribute.h | 7 +-
.../tests/integration/VerifyInvokeHTTP.h | 4 +-
.../tests/unit/ConfigurationTests.cpp | 8 +-
.../tests/unit/ControllerServiceTests.cpp | 6 +-
.../tests/unit/DefragmentTextTests.cpp | 4 +-
.../tests/unit/FlowJsonTests.cpp | 4 +-
.../standard-processors/tests/unit/GetTCPTests.cpp | 6 +-
.../tests/unit/JsonRecordTests.cpp | 2 +-
.../tests/unit/ListenSyslogTests.cpp | 6 +-
.../tests/unit/ListenTcpTests.cpp | 16 +-
.../tests/unit/ProcessorTests.cpp | 77 ++--
.../standard-processors/tests/unit/PutTCPTests.cpp | 8 +-
.../tests/unit/ReplaceTextTests.cpp | 2 +-
.../tests/unit/RouteTextTests.cpp | 2 +-
.../tests/unit/TailFileTests.cpp | 6 +-
.../tests/unit/YamlConfigurationTests.cpp | 6 +-
.../tests/unit/YamlConnectionParserTest.cpp | 4 +-
.../tests/unit/YamlProcessGroupParserTests.cpp | 2 +-
extensions/standard-processors/utils/JoltUtils.h | 2 +-
extensions/systemd/CMakeLists.txt | 2 +-
extensions/systemd/ConsumeJournald.cpp | 4 +-
extensions/systemd/ConsumeJournald.h | 4 +-
extensions/test-processors/KamikazeProcessor.h | 4 +-
.../test-processors/LogOnDestructionProcessor.h | 6 +-
extensions/windows-event-log/Bookmark.h | 2 +-
.../windows-event-log/ConsumeWindowsEventLog.cpp | 4 +-
.../windows-event-log/ConsumeWindowsEventLog.h | 2 +-
extensions/windows-event-log/TailEventLog.cpp | 1 +
extensions/windows-event-log/TailEventLog.h | 6 +-
libminifi/CMakeLists.txt | 13 +-
libminifi/include/Connection.h | 71 +--
libminifi/include/FlowFileRecord.h | 17 +-
libminifi/include/ForwardingNode.h | 6 +-
libminifi/include/RemoteProcessorGroupPort.h | 7 +-
libminifi/include/ResourceClaim.h | 55 +--
libminifi/include/agent/build_description.h | 23 +-
libminifi/include/c2/C2Agent.h | 4 +-
libminifi/include/c2/C2MetricsPublisher.h | 4 +-
libminifi/include/c2/C2Payload.h | 2 +-
libminifi/include/c2/C2Protocol.h | 5 +-
libminifi/include/c2/C2Trigger.h | 4 +-
.../include/c2/ControllerSocketMetricsPublisher.h | 6 +-
libminifi/include/c2/ControllerSocketProtocol.h | 3 +-
libminifi/include/c2/HeartbeatReporter.h | 4 +-
libminifi/include/c2/PayloadParser.h | 187 --------
libminifi/include/c2/protocols/RESTProtocol.h | 1 +
libminifi/include/c2/protocols/RESTSender.h | 2 +-
libminifi/include/c2/triggers/FileUpdateTrigger.h | 6 +-
.../controllers/LinuxPowerManagementService.h | 168 -------
.../controllers/NetworkPrioritizerService.h | 16 +-
libminifi/include/controllers/SSLContextService.h | 39 +-
.../include/controllers/ThreadManagementService.h | 45 +-
.../controllers/UpdatePolicyControllerService.h | 16 +-
libminifi/include/core/ClassLoader.h | 206 ---------
libminifi/include/core/Deprecated.h | 29 --
libminifi/include/core/FlowConfiguration.h | 2 +-
libminifi/include/core/FlowFile.h | 114 ++---
libminifi/include/core/ForwardingContentSession.h | 4 +-
libminifi/include/core/ParameterContext.h | 6 +-
libminifi/include/core/ProcessGroup.h | 7 +-
libminifi/include/core/ProcessSession.h | 198 ++++----
libminifi/include/core/ProcessSessionFactory.h | 40 +-
libminifi/include/core/ProcessorNode.h | 71 +--
libminifi/include/core/PropertyValue.h | 259 -----------
libminifi/include/core/RepositoryFactory.h | 2 +-
libminifi/include/core/SerializableComponent.h | 12 +-
libminifi/include/core/WeakReference.h | 47 +-
.../core/controller/ControllerServiceLookup.h | 75 +--
.../core/controller/ControllerServiceNode.h | 49 +-
.../core/controller/ControllerServiceProvider.h | 41 +-
.../ForwardingControllerServiceProvider.h | 4 +-
.../controller/StandardControllerServiceNode.h | 16 +-
.../controller/StandardControllerServiceProvider.h | 8 +-
libminifi/include/core/extension/DynamicLibrary.h | 2 +-
.../include/core/extension/ExtensionManager.h | 12 +-
libminifi/include/core/extension/Module.h | 4 +-
libminifi/include/core/logging/LoggerBase.h | 114 +++++
.../include/core/logging/LoggerConfiguration.h | 6 +-
libminifi/include/core/logging/LoggerFactory.h | 6 +-
libminifi/include/core/logging/LoggerProperties.h | 4 +-
.../include/core/repository/FileSystemRepository.h | 8 +-
.../core/repository/VolatileContentRepository.h | 6 +-
.../include/core/repository/VolatileRepository.h | 4 +-
libminifi/include/core/state/FlowIdentifier.h | 37 +-
libminifi/include/core/state/LogMetricsPublisher.h | 8 +-
.../include/core/state/MetricsPublisherFactory.h | 2 +-
.../include/core/state/MetricsPublisherStore.h | 2 +-
.../include/core/state/nodes/AgentInformation.h | 4 +-
.../include/core/state/nodes/AssetInformation.h | 4 +-
.../core/state/nodes/ConfigurationChecksums.h | 4 +-
.../include/core/state/nodes/DeviceInformation.h | 2 -
.../include/core/state/nodes/FlowInformation.h | 2 +-
libminifi/include/core/state/nodes/MetricsBase.h | 152 +------
libminifi/include/core/state/nodes/QueueMetrics.h | 8 +-
.../include/core/state/nodes/RepositoryMetrics.h | 8 +-
.../include/core/state/nodes/ResponseNodeLoader.h | 19 +-
libminifi/include/io/AtomicEntryStream.h | 4 +-
libminifi/include/properties/Configuration.h | 178 +-------
libminifi/include/properties/Configure.h | 19 +-
libminifi/include/properties/Properties.h | 48 +-
libminifi/include/provenance/Provenance.h | 243 +++-------
libminifi/include/sitetosite/HTTPProtocol.h | 3 +-
libminifi/include/sitetosite/Peer.h | 2 +-
libminifi/include/sitetosite/RawSocketProtocol.h | 2 -
libminifi/include/sitetosite/SiteToSite.h | 2 +-
libminifi/include/sitetosite/SiteToSiteClient.h | 4 +-
libminifi/include/sitetosite/SiteToSiteFactory.h | 2 +-
libminifi/include/utils/FlowFileQueue.h | 4 +-
libminifi/include/utils/StagingQueue.h | 2 +-
libminifi/src/Configure.cpp | 31 +-
libminifi/src/Connection.cpp | 32 +-
libminifi/src/FlowFileRecord.cpp | 35 +-
libminifi/src/RemoteProcessorGroupPort.cpp | 6 +-
libminifi/src/ResourceClaim.cpp | 15 +-
libminifi/src/ThreadedSchedulingAgent.cpp | 4 +-
libminifi/src/agent/agent_docs.cpp | 13 +-
libminifi/src/c2/C2Agent.cpp | 6 +-
libminifi/src/c2/C2MetricsPublisher.cpp | 8 +-
libminifi/src/c2/C2Payload.cpp | 1 +
libminifi/src/c2/ControllerSocketProtocol.cpp | 4 +-
libminifi/src/c2/HeartbeatJsonSerializer.cpp | 12 +-
libminifi/src/c2/protocols/RESTSender.cpp | 8 +-
.../controllers/LinuxPowerManagementService.cpp | 190 --------
.../src/controllers/NetworkPrioritizerService.cpp | 4 +-
libminifi/src/controllers/SSLContextService.cpp | 79 ++--
libminifi/src/core/ClassLoader.cpp | 129 +++++-
libminifi/src/core/FlowConfiguration.cpp | 7 +-
libminifi/src/core/FlowFile.cpp | 60 +--
libminifi/src/core/ForwardingContentSession.cpp | 4 +-
libminifi/src/core/ProcessContextBuilder.cpp | 46 +-
libminifi/src/core/ProcessGroup.cpp | 14 +-
libminifi/src/core/ProcessSession.cpp | 140 +++---
libminifi/src/core/ProcessSessionFactory.cpp | 4 +-
libminifi/src/core/ProcessorNode.cpp | 10 +-
libminifi/src/core/RecordField.cpp | 2 +-
libminifi/src/core/RepositoryFactory.cpp | 4 +-
.../src/core/controller/ControllerServiceNode.cpp | 6 +-
.../core/controller/ControllerServiceProvider.cpp | 6 +-
libminifi/src/core/extension/DynamicLibrary.cpp | 2 +-
libminifi/src/core/extension/ExtensionManager.cpp | 18 +-
libminifi/src/core/extension/Module.cpp | 2 +-
.../core/logging/{Logger.cpp => LoggerBase.cpp} | 16 +-
.../src/core/repository/FileSystemRepository.cpp | 6 +-
.../src/core/repository/VolatileRepository.cpp | 6 +-
libminifi/src/core/state/LogMetricsPublisher.cpp | 2 +-
.../src/core/state/MetricsPublisherFactory.cpp | 1 +
libminifi/src/core/state/MetricsPublisherStore.cpp | 2 +-
libminifi/src/core/state/Value.cpp | 22 +-
.../src/core/state/nodes/DeviceInformation.cpp | 2 +
libminifi/src/core/state/nodes/FlowInformation.cpp | 32 +-
.../src/core/state/nodes/ResponseNodeLoader.cpp | 42 +-
libminifi/src/http/HTTPClient.cpp | 506 ---------------------
libminifi/src/properties/Properties.cpp | 20 +-
libminifi/src/provenance/Provenance.cpp | 40 +-
libminifi/src/sitetosite/HTTPProtocol.cpp | 2 +
libminifi/src/utils/FlowFileQueue.cpp | 2 +-
libminifi/src/utils/TimeUtil.cpp | 97 +---
libminifi/src/utils/tls/ExtendedKeyUsage.cpp | 2 +-
libminifi/test/flow-tests/CustomProcessors.h | 6 +-
libminifi/test/flow-tests/CycleTest.cpp | 6 +-
libminifi/test/flow-tests/FlowControllerTests.cpp | 15 +-
libminifi/test/flow-tests/LoopTest.cpp | 6 +-
libminifi/test/flow-tests/MultiLoopTest.cpp | 6 +-
libminifi/test/flow-tests/SessionTests.cpp | 14 +-
libminifi/test/integration/C2AssetSyncTest.cpp | 2 +-
.../test/integration/C2DescribeManifestTest.cpp | 2 +-
libminifi/test/integration/C2PauseResumeTest.cpp | 2 +-
.../test/integration/C2PropertiesUpdateTests.cpp | 1 -
libminifi/test/integration/C2RequestClassTest.cpp | 2 +-
libminifi/test/integration/C2UpdateAssetTest.cpp | 2 +-
libminifi/test/integration/ConfigTestAccessor.h | 2 +-
.../ControllerServiceIntegrationTests.cpp | 4 +-
.../integration/OnScheduleErrorHandlingTests.cpp | 2 +-
libminifi/test/keyvalue-tests/CMakeLists.txt | 31 +-
.../keyvalue-tests/PersistentStateStorageTest.cpp | 4 +-
.../keyvalue-tests/VolatileMapStateStorageTest.cpp | 4 +-
libminifi/test/libtest/integration/CMakeLists.txt | 2 +-
libminifi/test/libtest/integration/CivetStream.h | 2 +-
.../test/libtest/integration/IntegrationBase.cpp | 4 +-
.../test/libtest/integration/IntegrationBase.h | 1 +
libminifi/test/libtest/unit/CMakeLists.txt | 2 +-
.../libtest/unit/ConfigurationTestController.h | 2 +-
.../libtest/unit/ContentRepositoryDependentTests.h | 4 +-
libminifi/test/libtest/unit/DummyProcessor.h | 8 +-
libminifi/test/libtest/unit/MockClasses.h | 16 +-
libminifi/test/libtest/unit/ProvenanceTestHelper.h | 10 +-
.../libtest/unit/ReadFromFlowFileTestProcessor.h | 4 +-
libminifi/test/libtest/unit/RecordSetTesters.h | 5 +-
.../libtest/unit/SingleProcessorTestController.cpp | 2 +-
.../libtest/unit/SingleProcessorTestController.h | 2 +-
libminifi/test/libtest/unit/SiteToSiteHelper.h | 2 +-
libminifi/test/libtest/unit/StatefulProcessor.h | 4 +-
libminifi/test/libtest/unit/TestBase.cpp | 25 +-
libminifi/test/libtest/unit/TestBase.h | 4 +-
.../test/libtest/unit/TestControllerWithFlow.cpp | 2 +-
libminifi/test/libtest/unit/TestRecord.h | 2 +-
.../libtest/unit/WriteToFlowFileTestProcessor.h | 4 +-
.../test/persistence-tests/PersistenceTests.cpp | 35 +-
libminifi/test/resources/RocksDbStateStorage.yml | 40 +-
libminifi/test/unit/ComponentManifestTests.cpp | 8 +-
libminifi/test/unit/ConnectionTests.cpp | 26 +-
.../unit/ControllerSocketMetricsPublisherTest.cpp | 6 +-
libminifi/test/unit/CronTests.cpp | 6 +-
libminifi/test/unit/DecryptorTests.cpp | 4 +-
libminifi/test/unit/DiskSpaceWatchdogTests.cpp | 6 +-
libminifi/test/unit/DynamicPropertyTests.cpp | 4 +-
libminifi/test/unit/FileSystemRepositoryTests.cpp | 22 +-
libminifi/test/unit/FileTriggerTests.cpp | 8 +-
libminifi/test/unit/FlatMapTests.cpp | 2 +-
libminifi/test/unit/FlowFileQueueSwapTests.cpp | 8 +-
libminifi/test/unit/FlowFileQueueTests.cpp | 32 +-
libminifi/test/unit/FlowFileSerializationTests.cpp | 2 +-
libminifi/test/unit/IdTests.cpp | 28 +-
.../LineByLineInputOutputStreamCallbackTests.cpp | 2 +-
libminifi/test/unit/LogMetricsPublisherTests.cpp | 4 +-
libminifi/test/unit/LoggerTests.cpp | 2 +-
libminifi/test/unit/MetricsPublisherStoreTests.cpp | 12 +-
libminifi/test/unit/MetricsTests.cpp | 51 ++-
libminifi/test/unit/NetUtilsTest.cpp | 42 +-
libminifi/test/unit/NetworkInterfaceInfoTests.cpp | 2 +-
.../test/unit/NetworkPrioritizerServiceTests.cpp | 2 +-
.../test/unit/OpenTelemetryLogDataModelTests.cpp | 2 +
libminifi/test/unit/PayloadParserTests.cpp | 116 -----
libminifi/test/unit/ProcessContextTest.cpp | 2 +-
libminifi/test/unit/ProcessSessionTests.cpp | 7 +-
libminifi/test/unit/ProcessorConfigUtilsTests.cpp | 9 +-
libminifi/test/unit/PropertyValidationTests.cpp | 3 +-
libminifi/test/unit/ResourceQueueTests.cpp | 4 +-
libminifi/test/unit/ResponseNodeLoaderTests.cpp | 6 +-
libminifi/test/unit/ResponseNodeValueTests.cpp | 6 +-
libminifi/test/unit/SchedulingAgentTests.cpp | 22 +-
libminifi/test/unit/UpdatePolicyTests.cpp | 10 +-
minifi-api/CMakeLists.txt | 3 +
minifi-api/include/minifi-cpp/Connection.h | 75 +++
.../include/minifi-cpp}/Exception.h | 0
.../include/minifi-cpp}/FlowFileRecord.h | 44 +-
minifi-api/include/minifi-cpp/ResourceClaim.h | 61 +++
.../include/minifi-cpp}/SwapManager.h | 2 +-
minifi-api/include/minifi-cpp/agent/agent_docs.h | 71 +++
.../include/minifi-cpp}/agent/agent_version.h | 17 +-
.../include/minifi-cpp}/agent/build_description.h | 21 -
.../controllers/AttributeProviderService.h | 10 +-
.../minifi-cpp}/controllers/RecordSetReader.h | 10 +-
.../minifi-cpp}/controllers/RecordSetWriter.h | 12 +-
.../minifi-cpp/controllers/SSLContextService.h | 49 +-
.../controllers/ThreadManagementService.h | 49 +-
.../controllers/keyvalue/KeyValueStateStorage.h | 9 +-
.../minifi-cpp}/core/AgentIdentificationProvider.h | 0
.../include/minifi-cpp}/core/Annotation.h | 0
.../minifi-cpp}/core/CachedValueValidator.h | 4 +
minifi-api/include/minifi-cpp/core/ClassLoader.h | 103 +++++
.../minifi-cpp/core/ConfigurableComponent.h | 89 ++++
minifi-api/include/minifi-cpp/core/Connectable.h | 71 +++
.../include/minifi-cpp/core/ContentRepository.h | 46 +-
.../include/minifi-cpp}/core/ContentSession.h | 19 +-
.../include/minifi-cpp/core/Core.h | 63 ++-
.../include/minifi-cpp}/core/DynamicProperty.h | 0
minifi-api/include/minifi-cpp/core/FlowFile.h | 102 +++++
.../include/minifi-cpp/core/ObjectFactory.h | 30 +-
.../minifi-cpp}/core/OutputAttributeDefinition.h | 0
.../include/minifi-cpp}/core/ParameterContext.h | 0
.../include/minifi-cpp/core/ProcessContext.h | 84 ++++
.../minifi-cpp/core/ProcessContextBuilder.h | 47 ++
.../include/minifi-cpp/core/ProcessSession.h | 125 +++++
.../minifi-cpp/core/ProcessSessionFactory.h | 15 +-
minifi-api/include/minifi-cpp/core/Processor.h | 94 ++++
.../include/minifi-cpp/core/ProcessorConfig.h | 55 +--
.../include/minifi-cpp/core/ProcessorMetrics.h | 57 +++
.../include/minifi-cpp/core/ProcessorNode.h | 36 +-
.../include/minifi-cpp}/core/Property.h | 76 +---
.../include/minifi-cpp}/core/PropertyDefinition.h | 17 +-
minifi-api/include/minifi-cpp/core/PropertyType.h | 54 +++
minifi-api/include/minifi-cpp/core/PropertyValue.h | 139 ++++++
.../include/minifi-cpp}/core/Record.h | 0
.../include/minifi-cpp}/core/RecordField.h | 0
.../include/minifi-cpp}/core/Relationship.h | 8 -
.../minifi-cpp}/core/RelationshipDefinition.h | 0
minifi-api/include/minifi-cpp/core/Repository.h | 66 +++
.../minifi-cpp}/core/RepositoryMetricsSource.h | 20 +-
.../include/minifi-cpp}/core/Scheduling.h | 16 +-
.../minifi-cpp}/core/SerializableComponent.h | 6 +-
.../include/minifi-cpp}/core/StateManager.h | 16 +-
.../include/minifi-cpp}/core/StateStorage.h | 4 +-
.../include/minifi-cpp}/core/StreamManager.h | 11 +-
.../include/minifi-cpp/core/ThreadedRepository.h | 15 +-
.../include/minifi-cpp}/core/TraceableResource.h | 5 +-
.../include/minifi-cpp}/core/ValidationResult.h | 0
.../include/minifi-cpp/core/VariableRegistry.h | 16 +-
.../include/minifi-cpp/core/WeakReference.h | 39 +-
.../minifi-cpp/core/controller/ControllerService.h | 54 +++
.../core/controller/ControllerServiceLookup.h | 23 +-
.../core/controller/ControllerServiceNode.h | 33 +-
.../core/controller/ControllerServiceProvider.h | 54 +++
.../include/minifi-cpp/core/extension/Extension.h | 36 +-
.../minifi-cpp/core/extension/ExtensionManager.h | 18 +-
.../include/minifi-cpp}/core/logging/Logger.h | 107 +----
.../minifi-cpp}/core/logging/LoggerFactory.h | 17 +-
.../core/repository/FileSystemRepository.h | 9 +-
.../include/minifi-cpp/core/state/FlowIdentifier.h | 25 +-
.../minifi-cpp}/core/state/MetricsPublisher.h | 18 +-
.../core/state/PublishedMetricProvider.h | 4 +-
minifi-api/include/minifi-cpp/core/state/Value.h | 136 ++++++
.../minifi-cpp/core/state/nodes/MetricsBase.h | 72 +++
.../core/state/nodes/ResponseNodeLoader.h | 39 +-
.../include/minifi-cpp}/io/ArchiveStream.h | 6 +-
.../include/minifi-cpp}/io/BaseStream.h | 2 +-
.../include/minifi-cpp}/io/InputStream.h | 14 +-
.../include/minifi-cpp}/io/OutputStream.h | 0
.../include/minifi-cpp}/io/Stream.h | 27 +-
.../include/minifi-cpp}/io/StreamCallback.h | 0
.../include/minifi-cpp}/properties/Configuration.h | 12 +-
.../include/minifi-cpp/properties/Configure.h | 49 ++
.../include/minifi-cpp/properties/Properties.h | 69 +++
.../include/minifi-cpp/provenance/Provenance.h | 218 +++++++++
.../include/minifi-cpp}/utils/Export.h | 0
.../include/minifi-cpp}/utils/FlatMap.h | 0
minifi-api/include/minifi-cpp/utils/Id.h | 75 +++
.../include/minifi-cpp}/utils/Literals.h | 0
.../include/minifi-cpp}/utils/PropertyErrors.h | 5 +-
.../include/minifi-cpp}/utils/SmallString.h | 15 -
minifi-api/include/minifi-cpp/utils/TimeUtil.h | 55 +++
.../include/minifi-cpp}/utils/gsl.h | 0
minifi_main/AgentDocs.cpp | 1 +
minifi_main/CMakeLists.txt | 2 +-
minifi_main/MiNiFiMain.cpp | 6 +-
utils/CMakeLists.txt | 22 +
.../io/CRCStream.cpp => utils/include/Exception.h | 6 +-
.../CRCStream.cpp => utils/include/SwapManager.h | 6 +-
{libminifi => utils}/include/agent/agent_docs.h | 82 +---
.../include/agent/agent_version.h | 6 +-
.../include/core/Annotation.h | 7 +-
.../include/core/BufferedContentSession.h | 3 +-
.../include/core/ClassLoader.h | 55 +--
.../core/Core.h => utils/include/core/ClassName.h | 120 +----
.../include/core/ConfigurableComponent.h | 153 ++++---
{libminifi => utils}/include/core/Connectable.h | 69 +--
.../include/core/ContentRepository.h | 30 +-
{libminifi => utils}/include/core/ContentSession.h | 21 +-
utils/include/core/Core.h | 123 +++++
{libminifi => utils}/include/core/ObjectFactory.h | 59 +--
.../include/core/OutputAttributeDefinition.h | 7 +-
{libminifi => utils}/include/core/ProcessContext.h | 174 ++++---
.../include/core/ProcessContextBuilder.h | 32 +-
{libminifi => utils}/include/core/Processor.h | 118 ++---
.../include/core/ProcessorMetrics.h | 62 ++-
.../include/core/Property.h | 14 +-
.../include/core/PropertyDefinition.h | 7 +-
.../include/core/PropertyDefinitionBuilder.h | 17 +-
{libminifi => utils}/include/core/PropertyType.h | 62 +--
utils/include/core/PropertyValue.h | 160 +++++++
.../include/core/Relationship.h | 14 +-
.../include/core/RelationshipDefinition.h | 7 +-
{libminifi => utils}/include/core/Repository.h | 49 +-
.../include/core/RepositoryMetricsSource.h | 26 +-
{libminifi => utils}/include/core/Resource.h | 3 +
.../include/core/StreamManager.h | 30 +-
.../include/core/ThreadedRepository.h | 13 +-
{libminifi => utils}/include/core/TypedValues.h | 7 +-
.../include/core/VariableRegistry.h | 29 +-
.../include/core/controller/ControllerService.h | 61 +--
{libminifi => utils}/include/core/expect.h | 0
.../include/core/extension/Extension.h | 24 +-
.../include/core/logging/Logger.h | 7 +-
.../include/core/logging/LoggerFactory.h | 9 +-
.../include/core/state/MetricsPublisher.h | 11 +-
.../include/core/state/PublishedMetricProvider.h | 13 +-
{libminifi => utils}/include/core/state/Value.h | 185 ++------
utils/include/core/state/nodes/ResponseNode.h | 88 ++++
{libminifi => utils}/include/http/BaseHTTPClient.h | 3 +-
{libminifi => utils}/include/http/HTTPCallback.h | 2 +-
{libminifi => utils}/include/http/HTTPClient.h | 9 +-
{libminifi => utils}/include/http/HTTPStream.h | 2 +-
.../include/io/ArchiveStream.h | 5 +-
{libminifi => utils}/include/io/AsioStream.h | 2 +-
{libminifi => utils}/include/io/BaseStream.h | 8 +-
{libminifi => utils}/include/io/BufferStream.h | 2 +-
{libminifi => utils}/include/io/CRCStream.h | 8 +-
{libminifi => utils}/include/io/FileStream.h | 2 +-
.../include/io/InputStream.h | 16 +-
.../Error.h => utils/include/io/OutputStream.h | 9 +-
{libminifi => utils}/include/io/Stream.h | 24 +-
{libminifi => utils}/include/io/StreamPipe.h | 2 +-
{libminifi => utils}/include/io/StreamSlice.h | 4 +-
{libminifi => utils}/include/io/ZlibStream.h | 21 +-
{libminifi => utils}/include/io/validation.h | 0
{libminifi => utils}/include/utils/ArrayUtils.h | 29 +-
.../include/utils}/AutoPersistor.h | 0
{libminifi => utils}/include/utils/BackTrace.h | 0
.../include/utils/ByteArrayCallback.h | 3 +-
{libminifi => utils}/include/utils/CallBackTimer.h | 0
{libminifi => utils}/include/utils/ClassUtils.h | 0
.../include/utils/CollectionUtils.h | 0
{libminifi => utils}/include/utils/Cron.h | 0
{libminifi => utils}/include/utils/Deleters.h | 1 -
{libminifi => utils}/include/utils/Enum.h | 0
{libminifi => utils}/include/utils/Environment.h | 0
{libminifi => utils}/include/utils/Error.h | 0
{libminifi => utils}/include/utils/Export.h | 0
{libminifi => utils}/include/utils/FailurePolicy.h | 0
{libminifi => utils}/include/utils/FifoExecutor.h | 0
{libminifi => utils}/include/utils/FileMutex.h | 0
{libminifi => utils}/include/utils/GeneralUtils.h | 18 +-
{libminifi => utils}/include/utils/HTTPUtils.h | 0
{libminifi => utils}/include/utils/Hash.h | 0
{libminifi => utils}/include/utils/Id.h | 50 +-
.../include/utils/IntervalSwitch.h | 0
{libminifi => utils}/include/utils/JsonCallback.h | 0
.../utils/LineByLineInputOutputStreamCallback.h | 0
.../include/utils/Literals.h | 6 +-
{libminifi => utils}/include/utils/LogUtils.h | 0
{libminifi => utils}/include/utils/Macro.h | 0
{libminifi => utils}/include/utils/MapUtils.h | 0
.../include/utils/MinifiConcurrentQueue.h | 20 +-
{libminifi => utils}/include/utils/Monitors.h | 0
{libminifi => utils}/include/utils/OptionalUtils.h | 0
{libminifi => utils}/include/utils/OsUtils.h | 0
.../include/utils/ProcessCpuUsageTracker.h | 0
.../include/utils/PropertyErrors.h | 6 +-
{libminifi => utils}/include/utils/RegexUtils.h | 0
{libminifi => utils}/include/utils/Searcher.h | 0
.../include/utils/SmallString.h | 33 +-
.../include/utils/StoppableThread.h | 0
{libminifi => utils}/include/utils/StringUtils.h | 0
.../include/utils/SystemCpuUsageTracker.h | 0
{libminifi => utils}/include/utils/ThreadPool.h | 11 +-
{libminifi => utils}/include/utils/TimeUtil.h | 36 +-
{libminifi => utils}/include/utils/TryMoveCall.h | 0
.../include/utils/UnicodeConversion.h | 0
{libminifi => utils}/include/utils/ValueCaster.h | 0
{libminifi => utils}/include/utils/ValueParser.h | 0
.../include/utils/crypto/EncryptionManager.h | 0
.../include/utils/crypto/EncryptionProvider.h | 0
.../include/utils/crypto/EncryptionUtils.h | 0
.../include/utils/crypto/ciphers/Aes256Ecb.h | 0
.../include/utils/crypto/ciphers/XSalsa20.h | 0
.../property_encryption/PropertyEncryptionUtils.h | 0
.../utils/detail/MonadicOperationWrappers.h | 0
{libminifi => utils}/include/utils/expected.h | 0
.../include/utils/file/FilePattern.h | 0
.../include/utils/file/FileUtils.h | 1 -
.../include/utils/file/PathUtils.h | 0
.../io/CRCStream.cpp => utils/include/utils/gsl.h | 6 +-
{libminifi => utils}/include/utils/meta/detected.h | 0
.../include/utils/meta/type_list.h | 0
{libminifi => utils}/include/utils/net/AsioCoro.h | 0
.../include/utils/net/AsioSocketUtils.h | 5 +-
{libminifi => utils}/include/utils/net/DNS.h | 0
.../include/utils/net}/NetworkInterfaceInfo.h | 0
{libminifi => utils}/include/utils/net/Socket.h | 0
.../include/utils/requirements/Container.h | 0
.../utils/requirements/EqualityComparable.h | 0
.../utils/requirements/LegacyForwardIterator.h | 0
.../utils/requirements/LegacyInputIterator.h | 0
.../include/utils/requirements/LegacyIterator.h | 0
.../include/utils/requirements/Swappable.h | 0
{libminifi => utils}/include/utils/span.h | 0
.../src/core/BufferedContentSession.cpp | 7 +-
.../src/core/CachedValueValidator.cpp | 2 +-
.../src/core/ConfigurableComponent.cpp | 45 +-
{libminifi => utils}/src/core/Connectable.cpp | 38 +-
.../src/core/ContentRepository.cpp | 24 +-
{libminifi => utils}/src/core/ContentSession.cpp | 2 +-
{libminifi => utils}/src/core/Core.cpp | 16 +-
utils/src/core/ProcessContextBuilder.cpp | 67 +++
.../Hash.h => utils/src/core/ProcessSession.cpp | 14 +-
{libminifi => utils}/src/core/Processor.cpp | 71 +--
{libminifi => utils}/src/core/ProcessorMetrics.cpp | 64 +--
{libminifi => utils}/src/core/Property.cpp | 65 ++-
{libminifi => utils}/src/core/PropertyType.cpp | 4 +-
{libminifi => utils}/src/core/Repository.cpp | 4 +-
{libminifi => utils}/src/core/TypedValues.cpp | 2 +-
.../src/core/extension/Extension.cpp | 10 +-
{libminifi => utils}/src/http/BaseHTTPClient.cpp | 0
{libminifi => utils}/src/http/HTTPClient.cpp | 13 +-
{libminifi => utils}/src/http/HTTPStream.cpp | 0
{libminifi => utils}/src/io/BufferStream.cpp | 0
utils/src/io/CPPLINT.cfg | 3 +
{libminifi => utils}/src/io/CRCStream.cpp | 0
{libminifi => utils}/src/io/FileStream.cpp | 2 +-
{libminifi => utils}/src/io/InputStream.cpp | 8 +
{libminifi => utils}/src/io/OutputStream.cpp | 0
{libminifi => utils}/src/io/StreamSlice.cpp | 0
{libminifi => utils}/src/io/ZlibStream.cpp | 2 +-
.../keyvalue => utils/src/utils}/AutoPersistor.cpp | 2 +-
{libminifi => utils}/src/utils/BackTrace.cpp | 0
.../src/utils/ByteArrayCallback.cpp | 0
{libminifi => utils}/src/utils/ClassUtils.cpp | 0
{libminifi => utils}/src/utils/Cron.cpp | 0
{libminifi => utils}/src/utils/Environment.cpp | 0
{libminifi => utils}/src/utils/Error.cpp | 0
{libminifi => utils}/src/utils/FifoExecutor.cpp | 0
{libminifi => utils}/src/utils/FileMutex.cpp | 0
{libminifi => utils}/src/utils/HTTPUtils.cpp | 0
{libminifi => utils}/src/utils/Id.cpp | 0
.../utils/LineByLineInputOutputStreamCallback.cpp | 0
{libminifi => utils}/src/utils/OsUtils.cpp | 0
.../src/utils/ProcessCpuUsageTracker.cpp | 0
{libminifi => utils}/src/utils/RegexUtils.cpp | 0
{libminifi => utils}/src/utils/StoppableThread.cpp | 0
{libminifi => utils}/src/utils/StringUtils.cpp | 0
.../src/utils/SystemCpuUsageTracker.cpp | 0
{libminifi => utils}/src/utils/ThreadPool.cpp | 3 +-
{libminifi => utils}/src/utils/TimeUtil.cpp | 33 +-
.../src/utils/crypto/EncryptionManager.cpp | 20 +-
.../src/utils/crypto/EncryptionProvider.cpp | 0
.../src/utils/crypto/EncryptionUtils.cpp | 0
.../src/utils/crypto/ciphers/Aes256Ecb.cpp | 2 +-
.../PropertyEncryptionUtils.cpp | 0
.../src/utils/file/FilePattern.cpp | 2 +-
{libminifi => utils}/src/utils/file/FileUtils.cpp | 0
{libminifi => utils}/src/utils/file/PathUtils.cpp | 0
.../src/utils/net/AsioSocketUtils.cpp | 2 +-
{libminifi => utils}/src/utils/net/DNS.cpp | 0
.../src/utils/net}/NetworkInterfaceInfo.cpp | 4 +-
{libminifi => utils}/src/utils/net/Socket.cpp | 0
793 files changed, 6591 insertions(+), 6951 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50e31d871..c1cc6a601 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -339,6 +339,9 @@ endfunction()
SET(TEST_DIR ${CMAKE_SOURCE_DIR}/libminifi/test)
include(Extensions)
+add_subdirectory(minifi-api)
+add_subdirectory(utils)
+add_subdirectory(extension-utils)
add_subdirectory(libminifi)
if (ENABLE_ALL OR ENABLE_AZURE)
diff --git a/controller/MiNiFiController.cpp b/controller/MiNiFiController.cpp
index 673680b73..33be0ed71 100644
--- a/controller/MiNiFiController.cpp
+++ b/controller/MiNiFiController.cpp
@@ -39,7 +39,7 @@ std::shared_ptr<minifi::core::controller::ControllerService> getControllerServic
const std::string &service_name) {
std::string nifi_configuration_class_name = "adaptiveconfiguration";
- minifi::core::extension::ExtensionManager::get().initialize(configuration);
+ minifi::core::extension::ExtensionManagerImpl::get().initialize(configuration);
configuration->get(minifi::Configure::nifi_configuration_class_name, nifi_configuration_class_name);
auto flow_configuration = minifi::core::createFlowConfiguration(
@@ -78,7 +78,7 @@ std::shared_ptr<minifi::controllers::SSLContextService> getSSLContextService(con
if (nullptr == secure_context) {
std::string secureStr;
if (configuration->get(minifi::Configure::nifi_remote_input_secure, secureStr) && minifi::utils::string::toBool(secureStr).value_or(false)) {
- secure_context = std::make_shared<minifi::controllers::SSLContextService>("ControllerSocketProtocolSSL", configuration);
+ secure_context = std::make_shared<minifi::controllers::SSLContextServiceImpl>("ControllerSocketProtocolSSL", configuration);
secure_context->onEnable();
}
} else {
@@ -96,7 +96,7 @@ int main(int argc, char **argv) {
return -1;
}
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(minifi_home);
configuration->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
diff --git a/controller/tests/ControllerTests.cpp b/controller/tests/ControllerTests.cpp
index 08ae1a4bf..adbe80ca6 100644
--- a/controller/tests/ControllerTests.cpp
+++ b/controller/tests/ControllerTests.cpp
@@ -34,6 +34,7 @@
#include "controllers/SSLContextService.h"
#include "utils/StringUtils.h"
#include "state/UpdateController.h"
+#include "core/state/nodes/ResponseNodeLoader.h"
using namespace std::literals::chrono_literals;
@@ -201,10 +202,10 @@ class TestControllerSocketReporter : public c2::ControllerSocketReporter {
}
};
-class TestControllerServiceProvider : public core::controller::ControllerServiceProvider {
+class TestControllerServiceProvider : public core::controller::ControllerServiceProviderImpl {
public:
explicit TestControllerServiceProvider(std::shared_ptr<controllers::SSLContextService> ssl_context_service)
- : core::controller::ControllerServiceProvider("TestControllerServiceProvider"),
+ : core::controller::ControllerServiceProviderImpl("TestControllerServiceProvider"),
ssl_context_service_(std::move(ssl_context_service)) {
}
std::shared_ptr<core::controller::ControllerService> getControllerService(const std::string&) const override {
@@ -239,7 +240,7 @@ class ControllerTestFixture {
};
ControllerTestFixture()
- : configuration_(std::make_shared<minifi::Configure>()),
+ : configuration_(std::make_shared<minifi::ConfigureImpl>()),
controller_(std::make_shared<TestStateController>()),
update_sink_(std::make_unique<TestUpdateSink>(controller_)) {
configuration_->set(minifi::Configure::controller_socket_host, "localhost");
@@ -249,7 +250,7 @@ class ControllerTestFixture {
configuration_->set(minifi::Configure::nifi_security_client_pass_phrase, "abcdefgh");
configuration_->set(minifi::Configure::nifi_security_client_ca_certificate, (minifi::utils::file::FileUtils::get_executable_dir() / "resources" / "root-ca.pem").string());
configuration_->set(minifi::Configure::controller_ssl_context_service, "SSLContextService");
- ssl_context_service_ = std::make_shared<controllers::SSLContextService>("SSLContextService", configuration_);
+ ssl_context_service_ = std::make_shared<controllers::SSLContextServiceImpl>("SSLContextService", configuration_);
ssl_context_service_->onEnable();
controller_service_provider_ = std::make_unique<TestControllerServiceProvider>(ssl_context_service_);
controller_socket_data_.host = "localhost";
@@ -478,7 +479,7 @@ TEST_CASE_METHOD(ControllerTestFixture, "Test manifest getter", "[controllerTest
}
auto reporter = std::make_shared<minifi::c2::ControllerSocketMetricsPublisher>("ControllerSocketMetricsPublisher");
- auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoader>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
+ auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoaderImpl>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
reporter->initialize(configuration_, response_node_loader);
initalizeControllerSocket(reporter);
@@ -501,7 +502,7 @@ TEST_CASE_METHOD(ControllerTestFixture, "Test jstack getter", "[controllerTests]
}
auto reporter = std::make_shared<minifi::c2::ControllerSocketMetricsPublisher>("ControllerSocketMetricsPublisher");
- auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoader>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
+ auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoaderImpl>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
reporter->initialize(configuration_, response_node_loader);
initalizeControllerSocket(reporter);
@@ -529,7 +530,7 @@ TEST_CASE_METHOD(ControllerTestFixture, "Test debug bundle getter", "[controller
}
auto reporter = std::make_shared<minifi::c2::ControllerSocketMetricsPublisher>("ControllerSocketMetricsPublisher");
- auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoader>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
+ auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoaderImpl>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
reporter->initialize(configuration_, response_node_loader);
initalizeControllerSocket(reporter);
@@ -543,7 +544,7 @@ TEST_CASE_METHOD(ControllerTestFixture, "Test debug bundle is created to non-exi
setConnectionType(ControllerTestFixture::ConnectionType::UNSECURE);
auto reporter = std::make_shared<minifi::c2::ControllerSocketMetricsPublisher>("ControllerSocketMetricsPublisher");
- auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoader>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
+ auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoaderImpl>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
reporter->initialize(configuration_, response_node_loader);
initalizeControllerSocket(reporter);
@@ -557,7 +558,7 @@ TEST_CASE_METHOD(ControllerTestFixture, "Debug bundle retrieval fails if target
setConnectionType(ControllerTestFixture::ConnectionType::UNSECURE);
auto reporter = std::make_shared<minifi::c2::ControllerSocketMetricsPublisher>("ControllerSocketMetricsPublisher");
- auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoader>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
+ auto response_node_loader = std::make_shared<minifi::state::response::ResponseNodeLoaderImpl>(configuration_, std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{}, nullptr);
reporter->initialize(configuration_, response_node_loader);
initalizeControllerSocket(reporter);
diff --git a/encrypt-config/CMakeLists.txt b/encrypt-config/CMakeLists.txt
index cfa436564..05146bdb7 100644
--- a/encrypt-config/CMakeLists.txt
+++ b/encrypt-config/CMakeLists.txt
@@ -26,7 +26,7 @@ endif()
add_minifi_executable(encrypt-config "${ENCRYPT_CONFIG_FILES}")
target_include_directories(encrypt-config PRIVATE ../libminifi/include)
include(ArgParse)
-target_link_libraries(encrypt-config libsodium argparse ${LIBMINIFI})
+target_link_libraries(encrypt-config libsodium argparse core-minifi)
set_target_properties(encrypt-config PROPERTIES OUTPUT_NAME encrypt-config)
set_target_properties(encrypt-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
diff --git a/encrypt-config/FlowConfigEncryptor.cpp b/encrypt-config/FlowConfigEncryptor.cpp
index 9c28499dd..e5cb75cc0 100644
--- a/encrypt-config/FlowConfigEncryptor.cpp
+++ b/encrypt-config/FlowConfigEncryptor.cpp
@@ -179,7 +179,7 @@ void encryptSensitiveValuesInFlowConfig(const EncryptionKeys& keys, const std::f
throw std::runtime_error("Error: cannot re-encrypt without an .old key!");
}
- const auto configure = std::make_shared<Configure>();
+ const auto configure = std::make_shared<ConfigureImpl>();
configure->setHome(minifi_home);
configure->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
@@ -191,7 +191,7 @@ void encryptSensitiveValuesInFlowConfig(const EncryptionKeys& keys, const std::f
utils::crypto::EncryptionProvider{utils::crypto::XSalsa20Cipher{*keys.old_key}} :
utils::crypto::EncryptionProvider{utils::crypto::XSalsa20Cipher{keys.encryption_key}};
- core::extension::ExtensionManager::get().initialize(configure);
+ core::extension::ExtensionManagerImpl::get().initialize(configure);
core::flow::AdaptiveConfiguration adaptive_configuration{core::ConfigurationContext{
.flow_file_repo = nullptr,
diff --git a/encrypt-config/tests/CMakeLists.txt b/encrypt-config/tests/CMakeLists.txt
index 175e70cff..f45d82ba0 100644
--- a/encrypt-config/tests/CMakeLists.txt
+++ b/encrypt-config/tests/CMakeLists.txt
@@ -31,7 +31,7 @@ foreach(testfile ${ENCRYPT_CONFIG_TESTS})
createTests(${testfilename})
- target_link_libraries(${testfilename} Catch2WithMain ${LIBMINIFI} libminifi-unittest)
+ target_link_libraries(${testfilename} Catch2WithMain core-minifi libminifi-unittest)
add_test(NAME ${testfilename} COMMAND ${testfilename} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
math(EXPR ENCRYPT_CONFIG_TEST_COUNT "${ENCRYPT_CONFIG_TEST_COUNT}+1")
diff --git a/extension-utils/CMakeLists.txt b/extension-utils/CMakeLists.txt
new file mode 100644
index 000000000..f5c969d8f
--- /dev/null
+++ b/extension-utils/CMakeLists.txt
@@ -0,0 +1,35 @@
+file(GLOB SOURCES
+ src/*.cpp
+ src/core/*.cpp
+ src/controllers/keyvalue/*.cpp
+ src/controllers/*.cpp
+ src/io/*.cpp
+ src/serialization/*.cpp
+ src/utils/file/*.cpp
+ src/utils/net/*.cpp
+ src/utils/tls/*.cpp
+ src/utils/*.cpp)
+add_minifi_library(minifi-extension-utils STATIC ${SOURCES})
+target_include_directories(minifi-extension-utils PUBLIC include)
+target_link_libraries(minifi-extension-utils PUBLIC minifi-api)
+
+include(RangeV3)
+include(Asio)
+include(MagicEnum)
+list(APPEND CORE_LIBRARIES ZLIB::ZLIB concurrentqueue RapidJSON spdlog Threads::Threads gsl-lite range-v3 expected-lite asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON)
+if(NOT WIN32)
+ list(APPEND CORE_LIBRARIES OSSP::libuuid++)
+endif()
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
+ list(APPEND CORE_LIBRARIES stdc++fs)
+endif()
+target_link_libraries(minifi-extension-utils PUBLIC ${CMAKE_DL_LIBS} ${CORE_LIBRARIES})
+if (APPLE)
+ target_link_libraries(minifi-extension-utils PUBLIC "-framework CoreFoundation -framework SystemConfiguration")
+endif()
+if (UNIX AND (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7"))
+ target_link_libraries(minifi-extension-utils PUBLIC "-latomic")
+endif()
+
+target_link_libraries(minifi-extension-utils PRIVATE minifi-api)
+target_link_libraries(minifi-extension-utils PUBLIC minifi-utils)
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/FlowFileRecord.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/FlowFileRecord.h
index 1322dc606..8a1658e33 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/FlowFileRecord.h
@@ -16,6 +16,6 @@
* limitations under the License.
*/
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#pragma once
+
+#include "minifi-cpp/FlowFileRecord.h"
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/ResourceClaim.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/ResourceClaim.h
index 1322dc606..ff9ada8cc 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/ResourceClaim.h
@@ -16,6 +16,6 @@
* limitations under the License.
*/
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#pragma once
+
+#include "minifi-cpp/ResourceClaim.h"
\ No newline at end of file
diff --git a/libminifi/include/controllers/AttributeProviderService.h b/extension-utils/include/controllers/AttributeProviderService.h
similarity index 80%
copy from libminifi/include/controllers/AttributeProviderService.h
copy to extension-utils/include/controllers/AttributeProviderService.h
index b3a59be87..7e3836f53 100644
--- a/libminifi/include/controllers/AttributeProviderService.h
+++ b/extension-utils/include/controllers/AttributeProviderService.h
@@ -22,20 +22,18 @@
#include <vector>
#include "core/controller/ControllerService.h"
+#include "minifi-cpp/controllers/AttributeProviderService.h"
namespace org::apache::nifi::minifi::controllers {
-class AttributeProviderService : public core::controller::ControllerService {
+class AttributeProviderServiceImpl : public core::controller::ControllerServiceImpl, public virtual AttributeProviderService {
public:
- using ControllerService::ControllerService;
+ using ControllerServiceImpl::ControllerServiceImpl;
void yield() override {}
bool isRunning() const override { return getState() == core::controller::ControllerServiceState::ENABLED; }
bool isWorkAvailable() override { return false; }
-
- using AttributeMap = std::unordered_map<std::string, std::string>;
- virtual std::optional<std::vector<AttributeMap>> getAttributes() = 0;
- virtual std::string_view name() const = 0;
};
} // namespace org::apache::nifi::minifi::controllers
+
diff --git a/libminifi/include/controllers/RecordSetWriter.h b/extension-utils/include/controllers/RecordSetReader.h
similarity index 75%
copy from libminifi/include/controllers/RecordSetWriter.h
copy to extension-utils/include/controllers/RecordSetReader.h
index 34ee5d87f..ead6e019f 100644
--- a/libminifi/include/controllers/RecordSetWriter.h
+++ b/extension-utils/include/controllers/RecordSetReader.h
@@ -16,19 +16,15 @@
*/
#pragma once
+#include "minifi-cpp/controllers/RecordSetReader.h"
#include "core/controller/ControllerService.h"
-#include "core/FlowFile.h"
-#include "core/ProcessSession.h"
-#include "Record.h"
namespace org::apache::nifi::minifi::core {
-class RecordSetWriter : public controller::ControllerService {
+class RecordSetReaderImpl : public virtual controller::ControllerServiceImpl, public virtual RecordSetReader {
public:
- using ControllerService::ControllerService;
-
- virtual void write(const RecordSet& record_set, const std::shared_ptr<FlowFile>& flow_file, ProcessSession& session) = 0;
+ using ControllerServiceImpl::ControllerServiceImpl;
};
} // namespace org::apache::nifi::minifi::core
diff --git a/libminifi/include/controllers/RecordSetWriter.h b/extension-utils/include/controllers/RecordSetWriter.h
similarity index 75%
copy from libminifi/include/controllers/RecordSetWriter.h
copy to extension-utils/include/controllers/RecordSetWriter.h
index 34ee5d87f..8ba127b3d 100644
--- a/libminifi/include/controllers/RecordSetWriter.h
+++ b/extension-utils/include/controllers/RecordSetWriter.h
@@ -16,19 +16,14 @@
*/
#pragma once
+#include "minifi-cpp/controllers/RecordSetWriter.h"
#include "core/controller/ControllerService.h"
-#include "core/FlowFile.h"
-#include "core/ProcessSession.h"
-#include "Record.h"
-
namespace org::apache::nifi::minifi::core {
-class RecordSetWriter : public controller::ControllerService {
+class RecordSetWriterImpl : public virtual controller::ControllerServiceImpl, public virtual RecordSetWriter {
public:
- using ControllerService::ControllerService;
-
- virtual void write(const RecordSet& record_set, const std::shared_ptr<FlowFile>& flow_file, ProcessSession& session) = 0;
+ using ControllerServiceImpl::ControllerServiceImpl;
};
} // namespace org::apache::nifi::minifi::core
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/controllers/SSLContextService.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/controllers/SSLContextService.h
index 1322dc606..e399a734a 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/controllers/SSLContextService.h
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -15,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#pragma once
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#include "minifi-cpp/controllers/SSLContextService.h"
\ No newline at end of file
diff --git a/libminifi/include/controllers/keyvalue/KeyValueStateManager.h b/extension-utils/include/controllers/keyvalue/KeyValueStateManager.h
similarity index 94%
rename from libminifi/include/controllers/keyvalue/KeyValueStateManager.h
rename to extension-utils/include/controllers/keyvalue/KeyValueStateManager.h
index 19df88993..604a113ae 100644
--- a/libminifi/include/controllers/keyvalue/KeyValueStateManager.h
+++ b/extension-utils/include/controllers/keyvalue/KeyValueStateManager.h
@@ -29,10 +29,11 @@ namespace org::apache::nifi::minifi::controllers {
class KeyValueStateStorage;
-class KeyValueStateManager final : public core::StateManager {
+class KeyValueStateManager final : public core::StateManagerImpl {
public:
KeyValueStateManager(const utils::Identifier& id, gsl::not_null<KeyValueStateStorage*> storage);
+ using StateManagerImpl::get;
bool set(const core::StateManager::State& kvs) override;
bool get(core::StateManager::State& kvs) override;
bool clear() override;
diff --git a/libminifi/include/controllers/keyvalue/KeyValueStateStorage.h b/extension-utils/include/controllers/keyvalue/KeyValueStateStorage.h
similarity index 89%
rename from libminifi/include/controllers/keyvalue/KeyValueStateStorage.h
rename to extension-utils/include/controllers/keyvalue/KeyValueStateStorage.h
index 9fa3fca20..149c79539 100644
--- a/libminifi/include/controllers/keyvalue/KeyValueStateStorage.h
+++ b/extension-utils/include/controllers/keyvalue/KeyValueStateStorage.h
@@ -24,21 +24,20 @@
#include "core/controller/ControllerService.h"
#include "core/Core.h"
#include "core/logging/LoggerFactory.h"
-#include "core/StateManager.h"
+#include "minifi-cpp/core/StateManager.h"
#include "core/StateStorage.h"
+#include "minifi-cpp/controllers/keyvalue/KeyValueStateStorage.h"
namespace org::apache::nifi::minifi::controllers {
-constexpr const char* ALWAYS_PERSIST_PROPERTY_NAME = "Always Persist";
-constexpr const char* AUTO_PERSISTENCE_INTERVAL_PROPERTY_NAME = "Auto Persistence Interval";
-
-class KeyValueStateStorage : public core::StateStorage, public core::controller::ControllerService {
+class KeyValueStateStorage : public core::StateStorageImpl, public core::controller::ControllerServiceImpl {
public:
explicit KeyValueStateStorage(const std::string& name, const utils::Identifier& uuid = {});
static core::StateManager::State deserialize(const std::string& serialized);
static std::string serialize(const core::StateManager::State& kvs);
+ using core::StateStorageImpl::getStateManager;
std::unique_ptr<core::StateManager> getStateManager(const utils::Identifier& uuid) override;
std::unordered_map<utils::Identifier, core::StateManager::State> getAllStates() override;
diff --git a/libminifi/include/core/AbstractProcessor.h b/extension-utils/include/core/AbstractProcessor.h
similarity index 93%
rename from libminifi/include/core/AbstractProcessor.h
rename to extension-utils/include/core/AbstractProcessor.h
index 2862bbda2..113361f03 100644
--- a/libminifi/include/core/AbstractProcessor.h
+++ b/extension-utils/include/core/AbstractProcessor.h
@@ -20,17 +20,17 @@
#include <string_view>
#include <type_traits>
#include "range/v3/view/transform.hpp"
-#include "core/Annotation.h"
+#include "minifi-cpp/core/Annotation.h"
#include "core/Core.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
-#include "core/RelationshipDefinition.h"
+#include "minifi-cpp/core/RelationshipDefinition.h"
namespace org::apache::nifi::minifi::core {
template<typename ProcessorT>
-class AbstractProcessor : public Processor {
+class AbstractProcessor : public ProcessorImpl {
public:
- using Processor::Processor;
+ using ProcessorImpl::ProcessorImpl;
void initialize() final {
static_assert(std::is_same_v<typename decltype(ProcessorT::Properties)::value_type, PropertyReference>);
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/core/FlowFile.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/core/FlowFile.h
index 1322dc606..4a64a2d07 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/core/FlowFile.h
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -16,6 +15,6 @@
* limitations under the License.
*/
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#pragma once
+
+#include "minifi-cpp/core/FlowFile.h"
diff --git a/libminifi/include/core/FlowFileStore.h b/extension-utils/include/core/FlowFileStore.h
similarity index 100%
rename from libminifi/include/core/FlowFileStore.h
rename to extension-utils/include/core/FlowFileStore.h
diff --git a/libminifi/include/utils/Error.h b/extension-utils/include/core/ProcessSession.h
similarity index 78%
copy from libminifi/include/utils/Error.h
copy to extension-utils/include/core/ProcessSession.h
index 77ef4a6ac..26678bedb 100644
--- a/libminifi/include/utils/Error.h
+++ b/extension-utils/include/core/ProcessSession.h
@@ -17,10 +17,11 @@
#pragma once
-#include <system_error>
+#include "minifi-cpp/core/ProcessSession.h"
-namespace org::apache::nifi::minifi::utils {
+namespace org::apache::nifi::minifi::core::detail {
-std::error_code getLastError();
+std::string to_string(const ReadBufferResult& read_buffer_result);
+
+} // namespace org::apache::nifi::minifi::core::detail
-} // namespace org::apache::nifi::minifi::utils
diff --git a/libminifi/include/core/StateManager.h b/extension-utils/include/core/StateManager.h
similarity index 72%
copy from libminifi/include/core/StateManager.h
copy to extension-utils/include/core/StateManager.h
index 89ef8b2cd..bf5a30e66 100644
--- a/libminifi/include/core/StateManager.h
+++ b/extension-utils/include/core/StateManager.h
@@ -17,12 +17,13 @@
#pragma once
-#include "Core.h"
+#include "core/Core.h"
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
+#include "minifi-cpp/core/StateManager.h"
namespace org::apache::nifi::minifi::core {
@@ -31,35 +32,22 @@ namespace org::apache::nifi::minifi::core {
* Supported operations: get(), set(), clear(), persist().
* Behavior can be transactional. Use beginTransaction() to enter a transaction and commit() or rollback() to conclude it.
*/
-class StateManager {
+class StateManagerImpl : public virtual StateManager {
public:
- using State = std::unordered_map<std::string, std::string>;
-
- explicit StateManager(const utils::Identifier& id)
+ explicit StateManagerImpl(const utils::Identifier& id)
: id_(id) {
}
- virtual ~StateManager() = default;
-
- virtual bool set(const State& kvs) = 0;
- virtual bool get(State& kvs) = 0;
+ ~StateManagerImpl() override = default;
- std::optional<State> get() {
+ using StateManager::get;
+ std::optional<State> get() override {
if (State out; get(out)) {
return out;
}
return std::nullopt;
}
- virtual bool clear() = 0;
- virtual bool persist() = 0;
-
- [[nodiscard]] virtual bool isTransactionInProgress() const = 0;
-
- virtual bool beginTransaction() = 0;
- virtual bool commit() = 0;
- virtual bool rollback() = 0;
-
protected:
utils::Identifier id_;
};
diff --git a/libminifi/include/core/StateStorage.h b/extension-utils/include/core/StateStorage.h
similarity index 81%
copy from libminifi/include/core/StateStorage.h
copy to extension-utils/include/core/StateStorage.h
index 6870b47b9..89822310f 100644
--- a/libminifi/include/core/StateStorage.h
+++ b/extension-utils/include/core/StateStorage.h
@@ -17,29 +17,27 @@
#pragma once
-#include "Core.h"
+#include "core/Core.h"
#include "StateManager.h"
#include <memory>
#include <string>
#include <unordered_map>
+#include "minifi-cpp/core/StateStorage.h"
namespace org::apache::nifi::minifi::core {
/**
* Serves as a state storage background for the entire application, all StateManagers are created by it and use it.
*/
-class StateStorage {
+class StateStorageImpl : public virtual StateStorage {
public:
- virtual ~StateStorage() = default;
+ ~StateStorageImpl() override = default;
- virtual std::unique_ptr<StateManager> getStateManager(const utils::Identifier& uuid) = 0;
-
- std::unique_ptr<StateManager> getStateManager(const CoreComponent& component) {
+ using StateStorage::getStateManager;
+ std::unique_ptr<StateManager> getStateManager(const CoreComponent& component) override {
return getStateManager(component.getUUID());
}
-
- virtual std::unordered_map<utils::Identifier, StateManager::State> getAllStates() = 0;
};
} // namespace org::apache::nifi::minifi::core
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/properties/Configure.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/properties/Configure.h
index 1322dc606..d3d229d21 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/properties/Configure.h
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -15,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#pragma once
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#include "minifi-cpp/properties/Configure.h"
diff --git a/libminifi/src/io/CRCStream.cpp b/extension-utils/include/properties/Properties.h
similarity index 92%
copy from libminifi/src/io/CRCStream.cpp
copy to extension-utils/include/properties/Properties.h
index 1322dc606..c1e3eca4c 100644
--- a/libminifi/src/io/CRCStream.cpp
+++ b/extension-utils/include/properties/Properties.h
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -15,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#pragma once
-#include "io/CRCStream.h"
-#include <zlib.h>
-#include <memory>
+#include "minifi-cpp/properties/Properties.h"
diff --git a/libminifi/include/serialization/FlowFileSerializer.h b/extension-utils/include/serialization/FlowFileSerializer.h
similarity index 97%
rename from libminifi/include/serialization/FlowFileSerializer.h
rename to extension-utils/include/serialization/FlowFileSerializer.h
index 6948a0042..e8a612799 100644
--- a/libminifi/include/serialization/FlowFileSerializer.h
+++ b/extension-utils/include/serialization/FlowFileSerializer.h
@@ -21,7 +21,7 @@
#include <memory>
#include <utility>
#include <functional>
-#include "io/StreamCallback.h"
+#include "minifi-cpp/io/StreamCallback.h"
namespace org {
namespace apache {
diff --git a/libminifi/include/serialization/FlowFileV3Serializer.h b/extension-utils/include/serialization/FlowFileV3Serializer.h
similarity index 100%
rename from libminifi/include/serialization/FlowFileV3Serializer.h
rename to extension-utils/include/serialization/FlowFileV3Serializer.h
diff --git a/libminifi/include/serialization/PayloadSerializer.h b/extension-utils/include/serialization/PayloadSerializer.h
similarity index 100%
rename from libminifi/include/serialization/PayloadSerializer.h
rename to extension-utils/include/serialization/PayloadSerializer.h
diff --git a/libminifi/include/utils/ListingStateManager.h b/extension-utils/include/utils/ListingStateManager.h
similarity index 95%
rename from libminifi/include/utils/ListingStateManager.h
rename to extension-utils/include/utils/ListingStateManager.h
index 7fa9501a9..0b4a0b7ee 100644
--- a/libminifi/include/utils/ListingStateManager.h
+++ b/extension-utils/include/utils/ListingStateManager.h
@@ -57,9 +57,6 @@ class ListingStateManager {
void storeState(const ListingState &latest_listing_state);
private:
- static const std::string LATEST_LISTED_OBJECT_PREFIX;
- static const std::string LATEST_LISTED_OBJECT_TIMESTAMP;
-
[[nodiscard]] static uint64_t getLatestListedKeyTimestampInMilliseconds(const std::unordered_map<std::string, std::string> &state);
[[nodiscard]] static std::unordered_set<std::string> getLatestListedKeys(const std::unordered_map<std::string, std::string> &state);
diff --git a/libminifi/include/utils/OpenTelemetryLogDataModelUtils.h b/extension-utils/include/utils/OpenTelemetryLogDataModelUtils.h
similarity index 98%
rename from libminifi/include/utils/OpenTelemetryLogDataModelUtils.h
rename to extension-utils/include/utils/OpenTelemetryLogDataModelUtils.h
index c9c639116..d46d5598a 100644
--- a/libminifi/include/utils/OpenTelemetryLogDataModelUtils.h
+++ b/extension-utils/include/utils/OpenTelemetryLogDataModelUtils.h
@@ -20,7 +20,7 @@
#include <string>
#include "rapidjson/document.h"
-#include "NetworkInterfaceInfo.h"
+#include "utils/net/NetworkInterfaceInfo.h"
#include "utils/net/DNS.h"
namespace org::apache::nifi::minifi::utils {
diff --git a/libminifi/include/utils/ProcessorConfigUtils.h b/extension-utils/include/utils/ProcessorConfigUtils.h
similarity index 100%
rename from libminifi/include/utils/ProcessorConfigUtils.h
rename to extension-utils/include/utils/ProcessorConfigUtils.h
diff --git a/libminifi/include/utils/ResourceQueue.h b/extension-utils/include/utils/ResourceQueue.h
similarity index 94%
rename from libminifi/include/utils/ResourceQueue.h
rename to extension-utils/include/utils/ResourceQueue.h
index 5f326a6af..91219602e 100644
--- a/libminifi/include/utils/ResourceQueue.h
+++ b/extension-utils/include/utils/ResourceQueue.h
@@ -29,7 +29,7 @@
#include "core/logging/Logger.h"
#include "concurrentqueue.h"
-#include "MinifiConcurrentQueue.h"
+#include "utils/MinifiConcurrentQueue.h"
namespace org::apache::nifi::minifi::utils {
@@ -41,7 +41,7 @@ namespace org::apache::nifi::minifi::utils {
* */
template<class ResourceType>
-class ResourceQueue : public std::enable_shared_from_this<ResourceQueue<ResourceType>> {
+class ResourceQueue : public utils::EnableSharedFromThis {
public:
class ResourceWrapper {
public:
@@ -75,7 +75,7 @@ class ResourceQueue : public std::enable_shared_from_this<ResourceQueue<Resource
// Use an existing resource, if one is available
if (internal_queue_.tryDequeue(resource)) {
logDebug("Using available [{}] resource instance", static_cast<void*>(resource.get()));
- return ResourceWrapper(this->weak_from_this(), std::move(resource));
+ return ResourceWrapper(sharedFromThis<ResourceQueue<ResourceType>>(), std::move(resource));
} else {
const std::lock_guard<std::mutex> lock(counter_mutex_);
if (!maximum_number_of_creatable_resources_ || resources_created_ < maximum_number_of_creatable_resources_) {
@@ -85,14 +85,14 @@ class ResourceQueue : public std::enable_shared_from_this<ResourceQueue<Resource
static_cast<void*>(resource.get()),
resources_created_,
maximum_number_of_creatable_resources_ ? " / " + std::to_string(*maximum_number_of_creatable_resources_) : "");
- return ResourceWrapper(this->weak_from_this(), std::move(resource));
+ return ResourceWrapper(sharedFromThis<ResourceQueue<ResourceType>>(), std::move(resource));
}
}
logDebug("Waiting for resource");
if (!internal_queue_.dequeueWait(resource)) {
throw std::runtime_error("No resource available");
}
- return ResourceWrapper(this->weak_from_this(), std::move(resource));
+ return ResourceWrapper(sharedFromThis<ResourceQueue<ResourceType>>(), std::move(resource));
}
protected:
diff --git a/libminifi/include/utils/file/FileManager.h b/extension-utils/include/utils/file/FileManager.h
similarity index 100%
rename from libminifi/include/utils/file/FileManager.h
rename to extension-utils/include/utils/file/FileManager.h
diff --git a/libminifi/include/utils/file/FileReaderCallback.h b/extension-utils/include/utils/file/FileReaderCallback.h
similarity index 100%
rename from libminifi/include/utils/file/FileReaderCallback.h
rename to extension-utils/include/utils/file/FileReaderCallback.h
diff --git a/libminifi/include/utils/file/FileWriterCallback.h b/extension-utils/include/utils/file/FileWriterCallback.h
similarity index 96%
rename from libminifi/include/utils/file/FileWriterCallback.h
rename to extension-utils/include/utils/file/FileWriterCallback.h
index c284d9ab0..2cb8729fa 100644
--- a/libminifi/include/utils/file/FileWriterCallback.h
+++ b/extension-utils/include/utils/file/FileWriterCallback.h
@@ -21,7 +21,7 @@
#include <filesystem>
#include "io/StreamPipe.h"
#include "utils/expected.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::utils {
diff --git a/libminifi/include/utils/file/ListedFile.h b/extension-utils/include/utils/file/ListedFile.h
similarity index 99%
rename from libminifi/include/utils/file/ListedFile.h
rename to extension-utils/include/utils/file/ListedFile.h
index 9961f7e01..72677e111 100644
--- a/libminifi/include/utils/file/ListedFile.h
+++ b/extension-utils/include/utils/file/ListedFile.h
@@ -22,6 +22,7 @@
#include <string>
#include "../ListingStateManager.h"
+#include "utils/file/FileUtils.h"
namespace org::apache::nifi::minifi::utils {
diff --git a/libminifi/include/utils/net/ConnectionHandler.h b/extension-utils/include/utils/net/ConnectionHandler.h
similarity index 98%
rename from libminifi/include/utils/net/ConnectionHandler.h
rename to extension-utils/include/utils/net/ConnectionHandler.h
index d7e982560..b3d5075ec 100644
--- a/libminifi/include/utils/net/ConnectionHandler.h
+++ b/extension-utils/include/utils/net/ConnectionHandler.h
@@ -19,8 +19,8 @@
#include <asio/read.hpp>
-#include "AsioCoro.h"
-#include "AsioSocketUtils.h"
+#include "utils/net/AsioCoro.h"
+#include "utils/net/AsioSocketUtils.h"
#include "ConnectionHandlerBase.h"
namespace org::apache::nifi::minifi::utils::net {
diff --git a/libminifi/include/utils/net/ConnectionHandlerBase.h b/extension-utils/include/utils/net/ConnectionHandlerBase.h
similarity index 100%
rename from libminifi/include/utils/net/ConnectionHandlerBase.h
rename to extension-utils/include/utils/net/ConnectionHandlerBase.h
diff --git a/libminifi/include/utils/net/IpProtocol.h b/extension-utils/include/utils/net/IpProtocol.h
similarity index 100%
copy from libminifi/include/utils/net/IpProtocol.h
copy to extension-utils/include/utils/net/IpProtocol.h
diff --git a/libminifi/include/utils/net/Message.h b/extension-utils/include/utils/net/Message.h
similarity index 100%
rename from libminifi/include/utils/net/Message.h
rename to extension-utils/include/utils/net/Message.h
diff --git a/libminifi/include/utils/net/Server.h b/extension-utils/include/utils/net/Server.h
similarity index 100%
rename from libminifi/include/utils/net/Server.h
rename to extension-utils/include/utils/net/Server.h
diff --git a/libminifi/include/utils/net/Ssl.h b/extension-utils/include/utils/net/Ssl.h
similarity index 100%
rename from libminifi/include/utils/net/Ssl.h
rename to extension-utils/include/utils/net/Ssl.h
diff --git a/libminifi/include/utils/net/TcpServer.h b/extension-utils/include/utils/net/TcpServer.h
similarity index 100%
rename from libminifi/include/utils/net/TcpServer.h
rename to extension-utils/include/utils/net/TcpServer.h
diff --git a/libminifi/include/utils/net/UdpServer.h b/extension-utils/include/utils/net/UdpServer.h
similarity index 96%
rename from libminifi/include/utils/net/UdpServer.h
rename to extension-utils/include/utils/net/UdpServer.h
index 97cfa5737..510f2beaa 100644
--- a/libminifi/include/utils/net/UdpServer.h
+++ b/extension-utils/include/utils/net/UdpServer.h
@@ -24,7 +24,7 @@
#include "Server.h"
#include "utils/MinifiConcurrentQueue.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::utils::net {
diff --git a/libminifi/src/controllers/keyvalue/KeyValueStateManager.cpp b/extension-utils/src/controllers/keyvalue/KeyValueStateManager.cpp
similarity index 99%
rename from libminifi/src/controllers/keyvalue/KeyValueStateManager.cpp
rename to extension-utils/src/controllers/keyvalue/KeyValueStateManager.cpp
index a59a42117..583a3f59e 100644
--- a/libminifi/src/controllers/keyvalue/KeyValueStateManager.cpp
+++ b/extension-utils/src/controllers/keyvalue/KeyValueStateManager.cpp
@@ -25,7 +25,7 @@ namespace org::apache::nifi::minifi::controllers {
KeyValueStateManager::KeyValueStateManager(
const utils::Identifier& id,
gsl::not_null<KeyValueStateStorage*> storage)
- : StateManager(id),
+ : StateManagerImpl(id),
storage_(storage),
transaction_in_progress_(false),
change_type_(ChangeType::NONE) {
diff --git a/libminifi/src/controllers/keyvalue/KeyValueStateStorage.cpp b/extension-utils/src/controllers/keyvalue/KeyValueStateStorage.cpp
similarity index 98%
rename from libminifi/src/controllers/keyvalue/KeyValueStateStorage.cpp
rename to extension-utils/src/controllers/keyvalue/KeyValueStateStorage.cpp
index 5de969825..2339b3e33 100644
--- a/libminifi/src/controllers/keyvalue/KeyValueStateStorage.cpp
+++ b/extension-utils/src/controllers/keyvalue/KeyValueStateStorage.cpp
@@ -63,7 +63,7 @@ core::StateManager::State KeyValueStateStorage::deserialize(const std::string& s
}
KeyValueStateStorage::KeyValueStateStorage(const std::string& name, const utils::Identifier& uuid)
- : ControllerService(name, uuid) {
+ : ControllerServiceImpl(name, uuid) {
}
std::unique_ptr<core::StateManager> KeyValueStateStorage::getStateManager(const utils::Identifier& uuid) {
diff --git a/libminifi/src/core/TypedValues.cpp b/extension-utils/src/core/ProcessContext.cpp
similarity index 65%
copy from libminifi/src/core/TypedValues.cpp
copy to extension-utils/src/core/ProcessContext.cpp
index d3908a7ec..9dc9b02fa 100644
--- a/libminifi/src/core/TypedValues.cpp
+++ b/extension-utils/src/core/ProcessContext.cpp
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -16,21 +15,22 @@
* limitations under the License.
*/
-#include <memory>
-
-#include "core/Property.h"
+#include "minifi-cpp/core/ProcessContext.h"
#include "core/TypedValues.h"
-#include "core/logging/LoggerConfiguration.h"
namespace org::apache::nifi::minifi::core {
-const std::type_index DataSizeValue::type_id = typeid(uint64_t);
-const std::type_index DataTransferSpeedValue::type_id = typeid(uint64_t);
-const std::type_index TimePeriodValue::type_id = typeid(uint64_t);
-
-std::shared_ptr<logging::Logger>& DataSizeValue::getLogger() {
- static std::shared_ptr<logging::Logger> logger = logging::LoggerFactory<DataSizeValue>::getLogger();
- return logger;
+bool ProcessContext::getProperty(std::string_view name, detail::NotAFlowFile auto &value) const {
+ if constexpr (std::is_base_of_v<TransformableValue, std::decay_t<decltype(value)>>) {
+ std::string prop_str;
+ if (!getProperty(std::string{name}, prop_str)) {
+ return false;
+ }
+ value = std::decay_t<decltype(value)>(std::move(prop_str));
+ return true;
+ } else {
+ return getProperty(name, value);
+ }
}
} // namespace org::apache::nifi::minifi::core
diff --git a/libminifi/src/serialization/FlowFileV3Serializer.cpp b/extension-utils/src/serialization/FlowFileV3Serializer.cpp
similarity index 98%
rename from libminifi/src/serialization/FlowFileV3Serializer.cpp
rename to extension-utils/src/serialization/FlowFileV3Serializer.cpp
index 3ecc4a5c3..77d327c80 100644
--- a/libminifi/src/serialization/FlowFileV3Serializer.cpp
+++ b/extension-utils/src/serialization/FlowFileV3Serializer.cpp
@@ -17,8 +17,9 @@
*/
#include "serialization/FlowFileV3Serializer.h"
-#include "core/ProcessSession.h"
+#include "io/StreamPipe.h"
#include "utils/gsl.h"
+#include "core/FlowFile.h"
namespace org::apache::nifi::minifi {
diff --git a/libminifi/src/serialization/PayloadSerializer.cpp b/extension-utils/src/serialization/PayloadSerializer.cpp
similarity index 83%
rename from libminifi/src/serialization/PayloadSerializer.cpp
rename to extension-utils/src/serialization/PayloadSerializer.cpp
index 4da0d0bf3..7fd22e171 100644
--- a/libminifi/src/serialization/PayloadSerializer.cpp
+++ b/extension-utils/src/serialization/PayloadSerializer.cpp
@@ -17,18 +17,12 @@
*/
#include "serialization/PayloadSerializer.h"
-#include "core/ProcessSession.h"
+#include "io/StreamPipe.h"
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
+namespace org::apache::nifi::minifi {
int64_t PayloadSerializer::serialize(const std::shared_ptr<core::FlowFile>& flowFile, const std::shared_ptr<io::OutputStream>& out) {
return reader_(flowFile, InputStreamPipe{*out});
}
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */
+} // namespace org::apache::nifi::minifi
diff --git a/extension-utils/src/utils/CallBackTimer.cpp b/extension-utils/src/utils/CallBackTimer.cpp
new file mode 100644
index 000000000..70e26dc7a
--- /dev/null
+++ b/extension-utils/src/utils/CallBackTimer.cpp
@@ -0,0 +1,84 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "utils/CallBackTimer.h"
+#include <stdexcept>
+
+namespace org::apache::nifi::minifi::utils {
+
+CallBackTimer::CallBackTimer(std::chrono::milliseconds interval, const std::function<void(void)>& func) : execute_(false), func_(func), interval_(interval) {
+}
+
+CallBackTimer::~CallBackTimer() {
+ stop();
+ std::lock_guard<std::mutex> guard(mtx_);
+ if (thd_.joinable()) {
+ thd_.join();
+ }
+}
+
+void CallBackTimer::stop() {
+ std::lock_guard<std::mutex> guard(mtx_);
+ {
+ std::lock_guard<std::mutex> cv_guard(cv_mtx_);
+ if (!execute_) {
+ return;
+ }
+ execute_ = false;
+ cv_.notify_all();
+ }
+}
+
+void CallBackTimer::start() {
+ std::lock_guard<std::mutex> guard(mtx_);
+ {
+ std::lock_guard<std::mutex> cv_guard(cv_mtx_);
+
+ if (execute_) {
+ return;
+ }
+ }
+
+ if (thd_.joinable()) {
+ thd_.join();
+ }
+
+ {
+ std::lock_guard<std::mutex> cv_guard(cv_mtx_);
+ execute_ = true;
+ }
+
+ thd_ = std::thread([this]() {
+ std::unique_lock<std::mutex> lk(cv_mtx_);
+ while (execute_) {
+ if (cv_.wait_for(lk, interval_, [this]{return !execute_;})) {
+ break;
+ }
+ lk.unlock();
+ this->func_();
+ lk.lock();
+ }
+ });
+}
+
+bool CallBackTimer::is_running() const {
+ std::lock_guard<std::mutex> guard(mtx_);
+ return execute_ && thd_.joinable();
+}
+
+} // namespace org::apache::nifi::minifi::utils
diff --git a/libminifi/src/utils/ListingStateManager.cpp b/extension-utils/src/utils/ListingStateManager.cpp
similarity index 95%
rename from libminifi/src/utils/ListingStateManager.cpp
rename to extension-utils/src/utils/ListingStateManager.cpp
index 9df90c3c5..403601653 100644
--- a/libminifi/src/utils/ListingStateManager.cpp
+++ b/extension-utils/src/utils/ListingStateManager.cpp
@@ -22,8 +22,8 @@
namespace org::apache::nifi::minifi::utils {
-const std::string ListingStateManager::LATEST_LISTED_OBJECT_PREFIX = "listed_key.";
-const std::string ListingStateManager::LATEST_LISTED_OBJECT_TIMESTAMP = "listed_timestamp";
+static const std::string LATEST_LISTED_OBJECT_PREFIX = "listed_key.";
+static const std::string LATEST_LISTED_OBJECT_TIMESTAMP = "listed_timestamp";
bool ListingState::wasObjectListedAlready(const ListedObject &object) const {
return listed_key_timestamp > object.getLastModified() ||
diff --git a/libminifi/src/utils/ProcessorConfigUtils.cpp b/extension-utils/src/utils/ProcessorConfigUtils.cpp
similarity index 100%
rename from libminifi/src/utils/ProcessorConfigUtils.cpp
rename to extension-utils/src/utils/ProcessorConfigUtils.cpp
diff --git a/libminifi/src/utils/file/FileReaderCallback.cpp b/extension-utils/src/utils/file/FileReaderCallback.cpp
similarity index 98%
rename from libminifi/src/utils/file/FileReaderCallback.cpp
rename to extension-utils/src/utils/file/FileReaderCallback.cpp
index 8239ca88f..906f09580 100644
--- a/libminifi/src/utils/file/FileReaderCallback.cpp
+++ b/extension-utils/src/utils/file/FileReaderCallback.cpp
@@ -20,7 +20,7 @@
#include <cinttypes>
#include <cstring>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/StringUtils.h"
namespace {
diff --git a/libminifi/src/utils/file/FileWriterCallback.cpp b/extension-utils/src/utils/file/FileWriterCallback.cpp
similarity index 100%
rename from libminifi/src/utils/file/FileWriterCallback.cpp
rename to extension-utils/src/utils/file/FileWriterCallback.cpp
diff --git a/libminifi/src/utils/net/Ssl.cpp b/extension-utils/src/utils/net/Ssl.cpp
similarity index 100%
rename from libminifi/src/utils/net/Ssl.cpp
rename to extension-utils/src/utils/net/Ssl.cpp
diff --git a/libminifi/src/utils/net/TcpServer.cpp b/extension-utils/src/utils/net/TcpServer.cpp
similarity index 100%
rename from libminifi/src/utils/net/TcpServer.cpp
rename to extension-utils/src/utils/net/TcpServer.cpp
diff --git a/libminifi/src/utils/net/UdpServer.cpp b/extension-utils/src/utils/net/UdpServer.cpp
similarity index 100%
rename from libminifi/src/utils/net/UdpServer.cpp
rename to extension-utils/src/utils/net/UdpServer.cpp
diff --git a/extensions/ExtensionHeader.txt b/extensions/ExtensionHeader.txt
index 9a9da14b4..070837478 100644
--- a/extensions/ExtensionHeader.txt
+++ b/extensions/ExtensionHeader.txt
@@ -19,11 +19,3 @@
cmake_minimum_required(VERSION 3.24)
-
-include_directories(../../libminifi/include ../../libminifi/include/core)
-
-if(WIN32)
- include_directories(../../libminifi/opsys/win)
-else()
- include_directories(../../libminifi/opsys/posix)
-endif()
diff --git a/extensions/aws/AWSCredentialsProvider.cpp b/extensions/aws/AWSCredentialsProvider.cpp
index d9bc7f700..a4ed3c42e 100644
--- a/extensions/aws/AWSCredentialsProvider.cpp
+++ b/extensions/aws/AWSCredentialsProvider.cpp
@@ -23,21 +23,17 @@
#include "aws/core/auth/AWSCredentialsProviderChain.h"
#include "properties/Properties.h"
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace aws {
+namespace org::apache::nifi::minifi::aws {
AWSCredentialsProvider::AWSCredentialsProvider(
bool use_default_credentials,
- const std::string &access_key,
- const std::string &secret_key,
- const std::string &credentials_file)
+ std::string access_key,
+ std::string secret_key,
+ std::string credentials_file)
: use_default_credentials_(use_default_credentials)
- , access_key_(access_key)
- , secret_key_(secret_key)
- , credentials_file_(credentials_file) {
+ , access_key_(std::move(access_key))
+ , secret_key_(std::move(secret_key))
+ , credentials_file_(std::move(credentials_file)) {
}
void AWSCredentialsProvider::setUseDefaultCredentials(bool use_default_credentials) {
@@ -77,7 +73,7 @@ std::optional<Aws::Auth::AWSCredentials> AWSCredentialsProvider::getAWSCredentia
}
if (!credentials_file_.empty()) {
- auto properties = std::make_shared<minifi::Properties>();
+ auto properties = minifi::Properties::create();
properties->loadConfigureFile(credentials_file_.c_str());
std::string access_key;
std::string secret_key;
@@ -91,8 +87,4 @@ std::optional<Aws::Auth::AWSCredentials> AWSCredentialsProvider::getAWSCredentia
return std::nullopt;
}
-} // namespace aws
-} // namespace minifi
-} // namespace nifi
-} // namespace apache
-} // namespace org
+} // namespace org::apache::nifi::minifi::aws
diff --git a/extensions/aws/AWSCredentialsProvider.h b/extensions/aws/AWSCredentialsProvider.h
index 0a9a5a035..664f84709 100644
--- a/extensions/aws/AWSCredentialsProvider.h
+++ b/extensions/aws/AWSCredentialsProvider.h
@@ -27,7 +27,7 @@
#include "aws/core/auth/AWSCredentials.h"
#include "utils/AWSInitializer.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org {
namespace apache {
@@ -39,9 +39,9 @@ class AWSCredentialsProvider {
public:
explicit AWSCredentialsProvider(
bool use_default_credentials = false,
- const std::string &access_key = "",
- const std::string &secret_key = "",
- const std::string &credentials_file = "");
+ std::string access_key = "",
+ std::string secret_key = "",
+ std::string credentials_file = "");
void setUseDefaultCredentials(bool use_default_credentials);
void setAccessKey(const std::string &access_key);
void setSecretKey(const std::string &secret_key);
diff --git a/extensions/aws/controllerservices/AWSCredentialsService.h b/extensions/aws/controllerservices/AWSCredentialsService.h
index 42002a9fe..f06bc6da8 100644
--- a/extensions/aws/controllerservices/AWSCredentialsService.h
+++ b/extensions/aws/controllerservices/AWSCredentialsService.h
@@ -27,7 +27,7 @@
#include "utils/AWSInitializer.h"
#include "core/controller/ControllerService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
@@ -37,14 +37,14 @@ class AWSCredentialsServiceTestAccessor;
namespace org::apache::nifi::minifi::aws::controllers {
-class AWSCredentialsService : public core::controller::ControllerService {
+class AWSCredentialsService : public core::controller::ControllerServiceImpl {
public:
explicit AWSCredentialsService(std::string_view name, const minifi::utils::Identifier &uuid = {})
- : ControllerService(name, uuid) {
+ : ControllerServiceImpl(name, uuid) {
}
explicit AWSCredentialsService(std::string_view name, const std::shared_ptr<Configure>& /*configuration*/)
- : ControllerService(name) {
+ : ControllerServiceImpl(name) {
}
EXTENSIONAPI static constexpr const char* Description = "Manages the Amazon Web Services (AWS) credentials for an AWS account. This allows for multiple "
diff --git a/extensions/aws/processors/S3Processor.cpp b/extensions/aws/processors/S3Processor.cpp
index 9c40a313b..eb2b2c528 100644
--- a/extensions/aws/processors/S3Processor.cpp
+++ b/extensions/aws/processors/S3Processor.cpp
@@ -32,12 +32,12 @@
namespace org::apache::nifi::minifi::aws::processors {
S3Processor::S3Processor(std::string_view name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(std::move(logger)) {
}
S3Processor::S3Processor(std::string_view name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(std::move(logger)),
s3_wrapper_(std::move(s3_request_sender)) {
}
diff --git a/extensions/aws/processors/S3Processor.h b/extensions/aws/processors/S3Processor.h
index 3bfb8998e..df273b343 100644
--- a/extensions/aws/processors/S3Processor.h
+++ b/extensions/aws/processors/S3Processor.h
@@ -31,12 +31,13 @@
#include "aws/core/auth/AWSCredentialsProvider.h"
#include "S3Wrapper.h"
#include "AWSCredentialsProvider.h"
+#include "core/Property.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/Processor.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/OptionalUtils.h"
namespace org::apache::nifi::minifi::aws::processors {
@@ -94,7 +95,7 @@ struct CommonProperties {
std::string endpoint_override_url;
};
-class S3Processor : public core::Processor {
+class S3Processor : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto Bucket = core::PropertyDefinitionBuilder<>::createProperty("Bucket")
.withDescription("The S3 bucket")
diff --git a/extensions/aws/s3/MultipartUploadStateStorage.cpp b/extensions/aws/s3/MultipartUploadStateStorage.cpp
index aa9c49e4e..2e9a79d5e 100644
--- a/extensions/aws/s3/MultipartUploadStateStorage.cpp
+++ b/extensions/aws/s3/MultipartUploadStateStorage.cpp
@@ -17,6 +17,7 @@
#include "MultipartUploadStateStorage.h"
#include "utils/StringUtils.h"
+#include "core/Property.h"
namespace org::apache::nifi::minifi::aws::s3 {
diff --git a/extensions/aws/s3/MultipartUploadStateStorage.h b/extensions/aws/s3/MultipartUploadStateStorage.h
index 2da6df063..10360d305 100644
--- a/extensions/aws/s3/MultipartUploadStateStorage.h
+++ b/extensions/aws/s3/MultipartUploadStateStorage.h
@@ -28,7 +28,7 @@
#include "core/StateManager.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "aws/core/utils/DateTime.h"
#include "utils/file/FileUtils.h"
#include "properties/Configure.h"
diff --git a/extensions/aws/s3/S3RequestSender.h b/extensions/aws/s3/S3RequestSender.h
index 2c5a850ba..a2cd2078c 100644
--- a/extensions/aws/s3/S3RequestSender.h
+++ b/extensions/aws/s3/S3RequestSender.h
@@ -50,7 +50,7 @@
#include "aws/s3/model/AbortMultipartUploadRequest.h"
#include "aws/s3/model/AbortMultipartUploadResult.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/AWSInitializer.h"
namespace org::apache::nifi::minifi::aws::s3 {
diff --git a/extensions/aws/s3/S3Wrapper.h b/extensions/aws/s3/S3Wrapper.h
index de906654c..9bd4725a7 100644
--- a/extensions/aws/s3/S3Wrapper.h
+++ b/extensions/aws/s3/S3Wrapper.h
@@ -34,7 +34,7 @@
#include "aws/s3/model/ObjectCannedACL.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/AWSInitializer.h"
#include "utils/OptionalUtils.h"
#include "utils/StringUtils.h"
@@ -44,6 +44,9 @@
#include "Exception.h"
#include "MultipartUploadStateStorage.h"
#include "range/v3/algorithm/find.hpp"
+#include "utils/Literals.h"
+#include "io/InputStream.h"
+#include "io/OutputStream.h"
namespace org::apache::nifi::minifi::aws::s3 {
diff --git a/extensions/aws/tests/AWSCredentialsServiceTest.cpp b/extensions/aws/tests/AWSCredentialsServiceTest.cpp
index 4eacaf3cf..ccaf91aef 100644
--- a/extensions/aws/tests/AWSCredentialsServiceTest.cpp
+++ b/extensions/aws/tests/AWSCredentialsServiceTest.cpp
@@ -64,7 +64,7 @@ TEST_CASE_METHOD(AWSCredentialsServiceTestAccessor, "Test expired credentials ar
plan->setProperty(aws_credentials_service, minifi::aws::controllers::AWSCredentialsService::SecretKey, "secret");
aws_credentials_service->enable();
assert(aws_credentials_service->getControllerServiceImplementation() != nullptr);
- auto aws_credentials_impl = std::static_pointer_cast<minifi::aws::controllers::AWSCredentialsService>(aws_credentials_service->getControllerServiceImplementation());
+ auto aws_credentials_impl = std::dynamic_pointer_cast<minifi::aws::controllers::AWSCredentialsService>(aws_credentials_service->getControllerServiceImplementation());
// Check intial credentials
REQUIRE(aws_credentials_impl->getAWSCredentials());
@@ -85,7 +85,7 @@ TEST_CASE_METHOD(AWSCredentialsServiceTestAccessor, "Test credentials from defau
plan->setProperty(aws_credentials_service, minifi::aws::controllers::AWSCredentialsService::UseDefaultCredentials, "true");
aws_credentials_service->enable();
assert(aws_credentials_service->getControllerServiceImplementation() != nullptr);
- auto aws_credentials_impl = std::static_pointer_cast<minifi::aws::controllers::AWSCredentialsService>(aws_credentials_service->getControllerServiceImplementation());
+ auto aws_credentials_impl = std::dynamic_pointer_cast<minifi::aws::controllers::AWSCredentialsService>(aws_credentials_service->getControllerServiceImplementation());
// Check intial credentials
REQUIRE(aws_credentials_impl->getAWSCredentials());
diff --git a/extensions/aws/utils/AWSSdkLogger.cpp b/extensions/aws/utils/AWSSdkLogger.cpp
index 28ad55e93..cb67e4551 100644
--- a/extensions/aws/utils/AWSSdkLogger.cpp
+++ b/extensions/aws/utils/AWSSdkLogger.cpp
@@ -20,6 +20,7 @@
#include "AWSSdkLogger.h"
#include <cstdio>
+#include <cstdarg>
#include "aws/core/utils/logging/LogLevel.h"
#include "utils/gsl.h"
diff --git a/extensions/aws/utils/AWSSdkLogger.h b/extensions/aws/utils/AWSSdkLogger.h
index 04bb77c42..536336eb0 100644
--- a/extensions/aws/utils/AWSSdkLogger.h
+++ b/extensions/aws/utils/AWSSdkLogger.h
@@ -23,7 +23,7 @@
#include "aws/core/utils/logging/LogSystemInterface.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::aws::utils {
diff --git a/extensions/azure/controllerservices/AzureStorageCredentialsService.h b/extensions/azure/controllerservices/AzureStorageCredentialsService.h
index cb0a0b048..5be6a6f09 100644
--- a/extensions/azure/controllerservices/AzureStorageCredentialsService.h
+++ b/extensions/azure/controllerservices/AzureStorageCredentialsService.h
@@ -23,7 +23,7 @@
#include <utility>
#include "core/controller/ControllerService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
@@ -32,7 +32,7 @@
namespace org::apache::nifi::minifi::azure::controllers {
-class AzureStorageCredentialsService : public core::controller::ControllerService {
+class AzureStorageCredentialsService : public core::controller::ControllerServiceImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Manages the credentials for an Azure Storage account. This allows for multiple Azure Storage related processors to reference this single "
"controller service so that Azure storage credentials can be managed and controlled in a central location.";
@@ -76,11 +76,11 @@ class AzureStorageCredentialsService : public core::controller::ControllerServic
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
explicit AzureStorageCredentialsService(std::string_view name, const minifi::utils::Identifier& uuid = {})
- : ControllerService(name, uuid) {
+ : ControllerServiceImpl(name, uuid) {
}
explicit AzureStorageCredentialsService(std::string_view name, const std::shared_ptr<Configure>& /*configuration*/)
- : ControllerService(name) {
+ : ControllerServiceImpl(name) {
}
void initialize() override;
diff --git a/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h b/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h
index aff7f501d..d65e16d06 100644
--- a/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h
+++ b/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h
@@ -26,7 +26,7 @@
#include <utility>
#include "AzureBlobStorageProcessorBase.h"
-#include "PropertyDefinition.h"
+#include "core/PropertyDefinition.h"
#include "utils/ArrayUtils.h"
namespace org::apache::nifi::minifi::azure::processors {
diff --git a/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h b/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h
index a5a5030d7..3eb5aa125 100644
--- a/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h
+++ b/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h
@@ -28,7 +28,7 @@
#include "core/Property.h"
#include "core/PropertyDefinition.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "storage/AzureDataLakeStorage.h"
#include "utils/ArrayUtils.h"
#include "AzureStorageProcessorBase.h"
diff --git a/extensions/azure/processors/AzureStorageProcessorBase.h b/extensions/azure/processors/AzureStorageProcessorBase.h
index 1f2a1ce63..c014895aa 100644
--- a/extensions/azure/processors/AzureStorageProcessorBase.h
+++ b/extensions/azure/processors/AzureStorageProcessorBase.h
@@ -26,7 +26,7 @@
#include <utility>
#include <tuple>
-#include "PropertyDefinition.h"
+#include "core/PropertyDefinition.h"
#include "core/Property.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/Processor.h"
@@ -35,7 +35,7 @@
namespace org::apache::nifi::minifi::azure::processors {
-class AzureStorageProcessorBase : public core::Processor {
+class AzureStorageProcessorBase : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto AzureStorageCredentialsService = core::PropertyDefinitionBuilder<>::createProperty("Azure Storage Credentials Service")
.withDescription("Name of the Azure Storage Credentials Service used to retrieve the connection string from.")
@@ -43,7 +43,7 @@ class AzureStorageProcessorBase : public core::Processor {
EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({AzureStorageCredentialsService});
AzureStorageProcessorBase(std::string_view name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(logger) {
}
diff --git a/extensions/azure/processors/DeleteAzureBlobStorage.h b/extensions/azure/processors/DeleteAzureBlobStorage.h
index e08c55b1a..3bf2f3f81 100644
--- a/extensions/azure/processors/DeleteAzureBlobStorage.h
+++ b/extensions/azure/processors/DeleteAzureBlobStorage.h
@@ -30,7 +30,7 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "AzureBlobStorageSingleBlobProcessorBase.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
template<typename T>
diff --git a/extensions/azure/processors/FetchAzureBlobStorage.h b/extensions/azure/processors/FetchAzureBlobStorage.h
index 9a0808407..57111c54b 100644
--- a/extensions/azure/processors/FetchAzureBlobStorage.h
+++ b/extensions/azure/processors/FetchAzureBlobStorage.h
@@ -26,10 +26,10 @@
#include <utility>
#include <vector>
-#include "PropertyDefinition.h"
+#include "core/PropertyDefinition.h"
#include "core/Property.h"
#include "AzureBlobStorageSingleBlobProcessorBase.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
template<typename T>
diff --git a/extensions/azure/processors/ListAzureBlobStorage.h b/extensions/azure/processors/ListAzureBlobStorage.h
index dd1a35067..a6ee36b39 100644
--- a/extensions/azure/processors/ListAzureBlobStorage.h
+++ b/extensions/azure/processors/ListAzureBlobStorage.h
@@ -29,7 +29,7 @@
#include "core/Property.h"
#include "core/PropertyDefinition.h"
#include "AzureBlobStorageProcessorBase.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/AzureEnums.h"
namespace org::apache::nifi::minifi::azure::processors {
diff --git a/extensions/azure/processors/PutAzureBlobStorage.h b/extensions/azure/processors/PutAzureBlobStorage.h
index 60dfd964c..fb2ad6765 100644
--- a/extensions/azure/processors/PutAzureBlobStorage.h
+++ b/extensions/azure/processors/PutAzureBlobStorage.h
@@ -26,11 +26,11 @@
#include <utility>
#include <vector>
-#include "ProcessContext.h"
-#include "PropertyDefinition.h"
-#include "PropertyType.h"
+#include "core/ProcessContext.h"
+#include "core/PropertyDefinition.h"
+#include "core/PropertyType.h"
#include "core/Property.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "AzureBlobStorageSingleBlobProcessorBase.h"
#include "io/StreamPipe.h"
#include "utils/ArrayUtils.h"
diff --git a/extensions/azure/storage/AzureBlobStorage.h b/extensions/azure/storage/AzureBlobStorage.h
index 305da5451..51b0d6e1e 100644
--- a/extensions/azure/storage/AzureBlobStorage.h
+++ b/extensions/azure/storage/AzureBlobStorage.h
@@ -27,9 +27,10 @@
#include "BlobStorageClient.h"
#include "azure/storage/blobs.hpp"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/gsl.h"
#include "utils/ListingStateManager.h"
+#include "io/OutputStream.h"
namespace org::apache::nifi::minifi::azure::storage {
diff --git a/extensions/azure/storage/AzureBlobStorageClient.cpp b/extensions/azure/storage/AzureBlobStorageClient.cpp
index b64c1e367..629313b70 100644
--- a/extensions/azure/storage/AzureBlobStorageClient.cpp
+++ b/extensions/azure/storage/AzureBlobStorageClient.cpp
@@ -31,7 +31,7 @@
namespace org::apache::nifi::minifi::azure::storage {
namespace {
-class AzureBlobStorageInputStream : public io::InputStream {
+class AzureBlobStorageInputStream : public io::InputStreamImpl {
public:
explicit AzureBlobStorageInputStream(Azure::Storage::Blobs::Models::DownloadBlobResult&& result)
: result_(std::move(result)) {
@@ -102,7 +102,7 @@ std::unique_ptr<io::InputStream> AzureBlobStorageClient::fetchBlob(const FetchAz
if (params.range_start || params.range_length) {
Azure::Core::Http::HttpRange range;
if (params.range_start) {
- range.Offset = *params.range_start;
+ range.Offset = gsl::narrow<int64_t>(*params.range_start);
}
if (params.range_length) {
diff --git a/extensions/azure/storage/AzureBlobStorageClient.h b/extensions/azure/storage/AzureBlobStorageClient.h
index 29455e888..9b782114a 100644
--- a/extensions/azure/storage/AzureBlobStorageClient.h
+++ b/extensions/azure/storage/AzureBlobStorageClient.h
@@ -28,7 +28,7 @@
#include "BlobStorageClient.h"
#include "azure/storage/blobs.hpp"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::azure::storage {
diff --git a/extensions/azure/storage/AzureDataLakeStorage.h b/extensions/azure/storage/AzureDataLakeStorage.h
index 587ec5f0d..fcfbe1c5d 100644
--- a/extensions/azure/storage/AzureDataLakeStorage.h
+++ b/extensions/azure/storage/AzureDataLakeStorage.h
@@ -26,9 +26,10 @@
#include <utility>
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "DataLakeStorageClient.h"
#include "utils/ListingStateManager.h"
+#include "io/OutputStream.h"
namespace org::apache::nifi::minifi::azure::storage {
diff --git a/extensions/azure/storage/AzureDataLakeStorageClient.h b/extensions/azure/storage/AzureDataLakeStorageClient.h
index c8eecf0a2..db11cbdd4 100644
--- a/extensions/azure/storage/AzureDataLakeStorageClient.h
+++ b/extensions/azure/storage/AzureDataLakeStorageClient.h
@@ -28,7 +28,7 @@
#include "DataLakeStorageClient.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/span.h"
namespace org::apache::nifi::minifi::azure::storage {
@@ -74,7 +74,7 @@ class AzureDataLakeStorageClient : public DataLakeStorageClient {
std::vector<Azure::Storage::Files::DataLake::Models::PathItem> listDirectory(const ListAzureDataLakeStorageParameters& params) override;
private:
- class AzureDataLakeStorageInputStream : public io::InputStream {
+ class AzureDataLakeStorageInputStream : public io::InputStreamImpl {
public:
explicit AzureDataLakeStorageInputStream(Azure::Storage::Files::DataLake::Models::DownloadFileResult&& result)
: result_(std::move(result)) {
diff --git a/extensions/azure/utils/AzureSdkLogger.h b/extensions/azure/utils/AzureSdkLogger.h
index 45107e736..ce67b1472 100644
--- a/extensions/azure/utils/AzureSdkLogger.h
+++ b/extensions/azure/utils/AzureSdkLogger.h
@@ -22,7 +22,7 @@
#include <memory>
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::azure::utils {
diff --git a/extensions/bustache/ApplyTemplate.h b/extensions/bustache/ApplyTemplate.h
index f2afa7145..e06e0259f 100644
--- a/extensions/bustache/ApplyTemplate.h
+++ b/extensions/bustache/ApplyTemplate.h
@@ -23,21 +23,19 @@
#include <string>
#include <utility>
-#include "PropertyDefinition.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinitionBuilder.h"
-#include "core/FlowFile.h"
namespace org::apache::nifi::minifi::processors {
/**
* Applies a mustache template using incoming attributes as template parameters.
*/
-class ApplyTemplate : public core::Processor {
+class ApplyTemplate final : public core::ProcessorImpl {
public:
- explicit ApplyTemplate(std::string name, const utils::Identifier& uuid = {})
- : Processor(std::move(name), uuid) {}
+ explicit ApplyTemplate(const std::string_view name, const utils::Identifier& uuid = {})
+ : ProcessorImpl(name, uuid) {}
EXTENSIONAPI static constexpr const char* Description = "Applies the mustache template specified by the \"Template\" property and writes the output to the flow file content. "
"FlowFile attributes are used as template parameters.";
diff --git a/extensions/civetweb/processors/ListenHTTP.cpp b/extensions/civetweb/processors/ListenHTTP.cpp
index b50e78b57..1e12f72b1 100644
--- a/extensions/civetweb/processors/ListenHTTP.cpp
+++ b/extensions/civetweb/processors/ListenHTTP.cpp
@@ -254,7 +254,7 @@ bool ListenHTTP::processRequestBuffer(core::ProcessSession& session) {
namespace {
-class MgConnectionInputStream : public io::InputStream {
+class MgConnectionInputStream : public io::InputStreamImpl {
public:
MgConnectionInputStream(struct mg_connection* conn, std::optional<size_t> size): conn_(conn), netstream_size_limit_(size) {}
@@ -275,7 +275,7 @@ class MgConnectionInputStream : public io::InputStream {
std::optional<size_t> netstream_size_limit_; // how much can we read from conn_
};
-class MgConnectionOutputStream : public io::OutputStream {
+class MgConnectionOutputStream : public io::StreamImpl, public virtual io::OutputStreamImpl {
public:
explicit MgConnectionOutputStream(struct mg_connection* conn): conn_(conn) {}
@@ -548,7 +548,7 @@ void ListenHTTP::notifyStop() {
}
std::set<core::Connectable*> ListenHTTP::getOutGoingConnections(const std::string &relationship) {
- auto result = core::Processor::getOutGoingConnections(relationship);
+ auto result = core::ProcessorImpl::getOutGoingConnections(relationship);
if (relationship == Self.name) {
result.insert(this);
}
diff --git a/extensions/civetweb/processors/ListenHTTP.h b/extensions/civetweb/processors/ListenHTTP.h
index 1567c387a..4a0763df7 100644
--- a/extensions/civetweb/processors/ListenHTTP.h
+++ b/extensions/civetweb/processors/ListenHTTP.h
@@ -34,7 +34,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/MinifiConcurrentQueue.h"
#include "utils/gsl.h"
#include "utils/Export.h"
@@ -47,7 +47,7 @@ struct ListenHTTPTestAccessor;
namespace org::apache::nifi::minifi::processors {
-class ListenHTTP : public core::Processor {
+class ListenHTTP : public core::ProcessorImpl {
private:
static constexpr std::string_view DEFAULT_BUFFER_SIZE_STR = "5";
static constexpr core::RelationshipDefinition Self{"__self__", "Marks the FlowFile to be owned by this processor"};
@@ -56,7 +56,7 @@ class ListenHTTP : public core::Processor {
friend struct ::org::apache::nifi::minifi::test::ListenHTTPTestAccessor;
explicit ListenHTTP(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
callbacks_.log_message = &logMessage;
callbacks_.log_access = &logAccess;
}
diff --git a/extensions/civetweb/tests/ListenHTTPTests.cpp b/extensions/civetweb/tests/ListenHTTPTests.cpp
index cc9de6f54..f67a3f89f 100644
--- a/extensions/civetweb/tests/ListenHTTPTests.cpp
+++ b/extensions/civetweb/tests/ListenHTTPTests.cpp
@@ -125,7 +125,7 @@ class ListenHTTPTestsFixture {
}
void create_ssl_context_service(const char* ca, const char* client_cert) {
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
auto executable_dir = minifi::utils::file::FileUtils::get_executable_dir();
if (ca != nullptr) {
config->set(minifi::Configure::nifi_security_client_ca_certificate, (executable_dir / "resources" / ca).string());
@@ -135,7 +135,7 @@ class ListenHTTPTestsFixture {
config->set(minifi::Configure::nifi_security_client_private_key, (executable_dir / "resources" / client_cert).string());
config->set(minifi::Configure::nifi_security_client_pass_phrase, "Password12");
}
- ssl_context_service = std::make_shared<minifi::controllers::SSLContextService>("SSLContextService", config);
+ ssl_context_service = std::make_shared<minifi::controllers::SSLContextServiceImpl>("SSLContextService", config);
ssl_context_service->onEnable();
}
diff --git a/extensions/couchbase/controllerservices/CouchbaseClusterService.h b/extensions/couchbase/controllerservices/CouchbaseClusterService.h
index 217449723..ba2064004 100644
--- a/extensions/couchbase/controllerservices/CouchbaseClusterService.h
+++ b/extensions/couchbase/controllerservices/CouchbaseClusterService.h
@@ -30,7 +30,7 @@
#include "core/PropertyType.h"
#include "couchbase/cluster.hxx"
#include "core/ProcessContext.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "controllers/SSLContextService.h"
namespace org::apache::nifi::minifi::couchbase {
@@ -101,14 +101,14 @@ class CouchbaseClient {
namespace controllers {
-class CouchbaseClusterService : public core::controller::ControllerService {
+class CouchbaseClusterService : public core::controller::ControllerServiceImpl {
public:
explicit CouchbaseClusterService(std::string_view name, const minifi::utils::Identifier &uuid = {})
- : ControllerService(name, uuid) {
+ : ControllerServiceImpl(name, uuid) {
}
explicit CouchbaseClusterService(std::string_view name, const std::shared_ptr<Configure>& /*configuration*/)
- : ControllerService(name) {
+ : ControllerServiceImpl(name) {
}
EXTENSIONAPI static constexpr const char* Description = "Provides a centralized Couchbase connection and bucket passwords management. Bucket passwords can be specified via dynamic properties.";
diff --git a/extensions/couchbase/processors/GetCouchbaseKey.h b/extensions/couchbase/processors/GetCouchbaseKey.h
index 4951c18ef..bec91841c 100644
--- a/extensions/couchbase/processors/GetCouchbaseKey.h
+++ b/extensions/couchbase/processors/GetCouchbaseKey.h
@@ -23,7 +23,7 @@
#include "core/AbstractProcessor.h"
#include "core/ProcessSession.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "CouchbaseClusterService.h"
namespace org::apache::nifi::minifi::couchbase::processors {
diff --git a/extensions/couchbase/processors/PutCouchbaseKey.h b/extensions/couchbase/processors/PutCouchbaseKey.h
index 1991488ed..a1e3601af 100644
--- a/extensions/couchbase/processors/PutCouchbaseKey.h
+++ b/extensions/couchbase/processors/PutCouchbaseKey.h
@@ -24,7 +24,7 @@
#include "core/AbstractProcessor.h"
#include "core/ProcessSession.h"
#include "utils/Enum.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "CouchbaseClusterService.h"
#include "couchbase/persist_to.hxx"
#include "couchbase/replicate_to.hxx"
diff --git a/extensions/couchbase/tests/GetCouchbaseKeyTests.cpp b/extensions/couchbase/tests/GetCouchbaseKeyTests.cpp
index 0d2e5b910..185d99ac0 100644
--- a/extensions/couchbase/tests/GetCouchbaseKeyTests.cpp
+++ b/extensions/couchbase/tests/GetCouchbaseKeyTests.cpp
@@ -46,7 +46,8 @@ class GetCouchbaseKeyTestController : public TestController {
LogTestController::getInstance().setDebug<controllers::CouchbaseClusterService>();
LogTestController::getInstance().setDebug<processors::GetCouchbaseKey>();
auto controller_service_node = controller_.plan->addController("MockCouchbaseClusterService", "MockCouchbaseClusterService");
- mock_couchbase_cluster_service_ = std::static_pointer_cast<MockCouchbaseClusterService>(controller_service_node->getControllerServiceImplementation());
+ mock_couchbase_cluster_service_ = std::dynamic_pointer_cast<MockCouchbaseClusterService>(controller_service_node->getControllerServiceImplementation());
+ gsl_Assert(mock_couchbase_cluster_service_);
proc_->setProperty(processors::GetCouchbaseKey::CouchbaseClusterControllerService, "MockCouchbaseClusterService");
}
diff --git a/extensions/couchbase/tests/PutCouchbaseKeyTests.cpp b/extensions/couchbase/tests/PutCouchbaseKeyTests.cpp
index 84afe362b..56970289f 100644
--- a/extensions/couchbase/tests/PutCouchbaseKeyTests.cpp
+++ b/extensions/couchbase/tests/PutCouchbaseKeyTests.cpp
@@ -50,7 +50,8 @@ class PutCouchbaseKeyTestController : public TestController {
LogTestController::getInstance().setDebug<controllers::CouchbaseClusterService>();
LogTestController::getInstance().setDebug<processors::PutCouchbaseKey>();
auto controller_service_node = controller_.plan->addController("MockCouchbaseClusterService", "MockCouchbaseClusterService");
- mock_couchbase_cluster_service_ = std::static_pointer_cast<MockCouchbaseClusterService>(controller_service_node->getControllerServiceImplementation());
+ mock_couchbase_cluster_service_ = std::dynamic_pointer_cast<MockCouchbaseClusterService>(controller_service_node->getControllerServiceImplementation());
+ gsl_Assert(mock_couchbase_cluster_service_);
proc_->setProperty(processors::PutCouchbaseKey::CouchbaseClusterControllerService, "MockCouchbaseClusterService");
}
diff --git a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
index e9a854011..3089c3f49 100644
--- a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
+++ b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h
@@ -30,7 +30,7 @@
namespace org::apache::nifi::minifi::extensions::elasticsearch {
-class ElasticsearchCredentialsControllerService : public core::controller::ControllerService {
+class ElasticsearchCredentialsControllerService : public core::controller::ControllerServiceImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Elasticsearch/Opensearch Credentials Controller Service";
@@ -57,7 +57,7 @@ class ElasticsearchCredentialsControllerService : public core::controller::Contr
EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
- using ControllerService::ControllerService;
+ using ControllerServiceImpl::ControllerServiceImpl;
void initialize() override;
diff --git a/extensions/elasticsearch/PostElasticsearch.h b/extensions/elasticsearch/PostElasticsearch.h
index b36cc4d82..5274bf25e 100644
--- a/extensions/elasticsearch/PostElasticsearch.h
+++ b/extensions/elasticsearch/PostElasticsearch.h
@@ -34,12 +34,12 @@
namespace org::apache::nifi::minifi::extensions::elasticsearch {
-class PostElasticsearch : public core::Processor {
+class PostElasticsearch : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "An Elasticsearch/Opensearch post processor that uses the Elasticsearch/Opensearch _bulk REST API.";
explicit PostElasticsearch(const std::string& name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
~PostElasticsearch() override = default;
diff --git a/extensions/elasticsearch/tests/MockElastic.h b/extensions/elasticsearch/tests/MockElastic.h
index 2a1a6d1e5..71e60dadf 100644
--- a/extensions/elasticsearch/tests/MockElastic.h
+++ b/extensions/elasticsearch/tests/MockElastic.h
@@ -24,7 +24,7 @@
#include <CivetServer.h>
#include "integration/CivetLibrary.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
diff --git a/extensions/elasticsearch/tests/PostElasticsearchTests.cpp b/extensions/elasticsearch/tests/PostElasticsearchTests.cpp
index 8bb45c7b8..6eb68522f 100644
--- a/extensions/elasticsearch/tests/PostElasticsearchTests.cpp
+++ b/extensions/elasticsearch/tests/PostElasticsearchTests.cpp
@@ -20,6 +20,7 @@
#include "MockElastic.h"
#include "unit/SingleProcessorTestController.h"
#include "unit/Catch.h"
+#include "core/FlowFile.h"
namespace org::apache::nifi::minifi::extensions::elasticsearch::test {
diff --git a/extensions/execute-process/ExecuteProcess.cpp b/extensions/execute-process/ExecuteProcess.cpp
index 5c93279e6..21a215a2c 100644
--- a/extensions/execute-process/ExecuteProcess.cpp
+++ b/extensions/execute-process/ExecuteProcess.cpp
@@ -19,18 +19,20 @@
*/
#include "ExecuteProcess.h"
-#include <array>
+#include <unistd.h>
+#include <array>
+#include <iomanip>
#include <memory>
#include <string>
-#include <iomanip>
+
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
#include "core/Resource.h"
-#include "utils/StringUtils.h"
#include "core/TypedValues.h"
-#include "utils/gsl.h"
#include "utils/Environment.h"
+#include "utils/StringUtils.h"
+#include "utils/gsl.h"
using namespace std::literals::chrono_literals;
diff --git a/extensions/execute-process/ExecuteProcess.h b/extensions/execute-process/ExecuteProcess.h
index 44d2b59ab..199259969 100644
--- a/extensions/execute-process/ExecuteProcess.h
+++ b/extensions/execute-process/ExecuteProcess.h
@@ -35,7 +35,7 @@
#include <utility>
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
@@ -46,10 +46,10 @@
namespace org::apache::nifi::minifi::processors {
-class ExecuteProcess : public core::Processor {
+class ExecuteProcess final : public core::ProcessorImpl {
public:
explicit ExecuteProcess(const std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid),
+ : ProcessorImpl(name, uuid),
working_dir_(".") {
}
~ExecuteProcess() override {
diff --git a/extensions/expression-language/Expression.cpp b/extensions/expression-language/Expression.cpp
index 4bf00fa61..3f53915dd 100644
--- a/extensions/expression-language/Expression.cpp
+++ b/extensions/expression-language/Expression.cpp
@@ -34,6 +34,7 @@
#include "utils/OsUtils.h"
#include "expression/Expression.h"
#include "utils/RegexUtils.h"
+#include "utils/TimeUtil.h"
#ifdef WIN32
#pragma comment(lib, "wldap32.lib" )
@@ -1634,6 +1635,7 @@ Expression Expression::make_aggregate(const std::function<Value(const Parameters
#ifdef WIN32
void dateSetInstall(const std::string& install) {
+ utils::timeutils::dateSetInstall(install);
date::set_install(install);
}
#endif
diff --git a/extensions/expression-language/ExpressionContextBuilder.cpp b/extensions/expression-language/ExpressionContextBuilder.cpp
index 9c85ab778..e8d7731dc 100644
--- a/extensions/expression-language/ExpressionContextBuilder.cpp
+++ b/extensions/expression-language/ExpressionContextBuilder.cpp
@@ -26,11 +26,11 @@
namespace org::apache::nifi::minifi::core::expressions {
ExpressionContextBuilder::ExpressionContextBuilder(std::string_view name, const minifi::utils::Identifier &uuid)
- : core::ProcessContextBuilder(name, uuid) {
+ : core::ProcessContextBuilderImpl(name, uuid) {
}
ExpressionContextBuilder::ExpressionContextBuilder(std::string_view name)
- : core::ProcessContextBuilder(name) {
+ : core::ProcessContextBuilderImpl(name) {
}
ExpressionContextBuilder::~ExpressionContextBuilder() = default;
diff --git a/extensions/expression-language/ExpressionContextBuilder.h b/extensions/expression-language/ExpressionContextBuilder.h
index 5e7ae9806..ef71d86d2 100644
--- a/extensions/expression-language/ExpressionContextBuilder.h
+++ b/extensions/expression-language/ExpressionContextBuilder.h
@@ -32,13 +32,13 @@ namespace org::apache::nifi::minifi::core::expressions {
* effectively core functionality. To eliminate this awkward linking and help with disabling EL entirely
* on some platforms, this builder was placed into the class loader.
*/
-class ExpressionContextBuilder : public core::ProcessContextBuilder {
+class ExpressionContextBuilder : public core::ProcessContextBuilderImpl {
public:
ExpressionContextBuilder(std::string_view name, const minifi::utils::Identifier &uuid);
explicit ExpressionContextBuilder(std::string_view name);
- virtual ~ExpressionContextBuilder();
+ ~ExpressionContextBuilder() override;
EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
diff --git a/extensions/expression-language/ProcessContextExpr.cpp b/extensions/expression-language/ProcessContextExpr.cpp
index 04f5a7444..922b9f797 100644
--- a/extensions/expression-language/ProcessContextExpr.cpp
+++ b/extensions/expression-language/ProcessContextExpr.cpp
@@ -23,12 +23,12 @@ namespace org::apache::nifi::minifi::core {
bool ProcessContextExpr::getProperty(bool supports_expression_language, std::string_view property_name, std::string& value, const FlowFile* const flow_file) {
if (!supports_expression_language) {
- return ProcessContext::getProperty(property_name, value);
+ return ProcessContextImpl::getProperty(property_name, value);
}
std::string name{property_name};
if (expressions_.find(name) == expressions_.end()) {
std::string expression_str;
- if (!ProcessContext::getProperty(name, expression_str)) {
+ if (!ProcessContextImpl::getProperty(name, expression_str)) {
return false;
}
logger_->log_debug("Compiling expression for {}/{}: {}", getProcessorNode()->getName(), name, expression_str);
@@ -36,7 +36,7 @@ bool ProcessContextExpr::getProperty(bool supports_expression_language, std::str
expression_strs_.insert_or_assign(name, expression_str);
}
- minifi::expression::Parameters p(shared_from_this(), flow_file);
+ minifi::expression::Parameters p(sharedFromThis<VariableRegistry>(), flow_file);
value = expressions_[name](p).asString();
logger_->log_debug(R"(expression "{}" of property "{}" evaluated to: {})", expression_strs_[name], name, value);
return true;
@@ -52,17 +52,17 @@ bool ProcessContextExpr::getProperty(const PropertyReference& property, std::str
bool ProcessContextExpr::getDynamicProperty(const Property &property, std::string &value, const FlowFile* const flow_file) {
if (!property.supportsExpressionLanguage()) {
- return ProcessContext::getDynamicProperty(property.getName(), value);
+ return ProcessContextImpl::getDynamicProperty(property.getName(), value);
}
auto name = property.getName();
if (dynamic_property_expressions_.find(name) == dynamic_property_expressions_.end()) {
std::string expression_str;
- ProcessContext::getDynamicProperty(name, expression_str);
+ ProcessContextImpl::getDynamicProperty(name, expression_str);
logger_->log_debug("Compiling expression for {}/{}: {}", getProcessorNode()->getName(), name, expression_str);
dynamic_property_expressions_.emplace(name, expression::compile(expression_str));
expression_strs_.insert_or_assign(name, expression_str);
}
- minifi::expression::Parameters p(shared_from_this(), flow_file);
+ minifi::expression::Parameters p(sharedFromThis<VariableRegistry>(), flow_file);
value = dynamic_property_expressions_[name](p).asString();
logger_->log_debug(R"(expression "{}" of dynamic property "{}" evaluated to: {})", expression_strs_[name], name, value);
return true;
@@ -71,12 +71,12 @@ bool ProcessContextExpr::getDynamicProperty(const Property &property, std::strin
bool ProcessContextExpr::setProperty(const std::string& property, std::string value) {
expressions_.erase(property);
- return ProcessContext::setProperty(property, value);
+ return ProcessContextImpl::setProperty(property, value);
}
bool ProcessContextExpr::setDynamicProperty(const std::string& property, std::string value) {
dynamic_property_expressions_.erase(property);
- return ProcessContext::setDynamicProperty(property, value);
+ return ProcessContextImpl::setDynamicProperty(property, value);
}
} // namespace org::apache::nifi::minifi::core
diff --git a/extensions/expression-language/ProcessContextExpr.h b/extensions/expression-language/ProcessContextExpr.h
index b92bdcc6b..43689892e 100644
--- a/extensions/expression-language/ProcessContextExpr.h
+++ b/extensions/expression-language/ProcessContextExpr.h
@@ -21,7 +21,7 @@
#include <unordered_map>
#include <string>
-#include "ProcessContext.h"
+#include "core/ProcessContext.h"
#include "impl/expression/Expression.h"
namespace org::apache::nifi::minifi::core {
@@ -32,19 +32,19 @@ namespace org::apache::nifi::minifi::core {
* state. With this case, we can rely on instantiation of a builder to create the necessary
* ProcessContext. *
*/
-class ProcessContextExpr final : public core::ProcessContext {
+class ProcessContextExpr final : public core::ProcessContextImpl {
public:
ProcessContextExpr(const std::shared_ptr<ProcessorNode> &processor, controller::ControllerServiceProvider* controller_service_provider,
const std::shared_ptr<core::Repository> &repo, const std::shared_ptr<core::Repository> &flow_repo,
- const std::shared_ptr<core::ContentRepository> &content_repo = std::make_shared<core::repository::FileSystemRepository>())
- : core::ProcessContext(processor, controller_service_provider, repo, flow_repo, content_repo),
+ const std::shared_ptr<core::ContentRepository> &content_repo = core::repository::createFileSystemRepository())
+ : core::ProcessContextImpl(processor, controller_service_provider, repo, flow_repo, content_repo),
logger_(logging::LoggerFactory<ProcessContextExpr>::getLogger()) {
}
ProcessContextExpr(const std::shared_ptr<ProcessorNode> &processor, controller::ControllerServiceProvider* controller_service_provider,
const std::shared_ptr<core::Repository> &repo, const std::shared_ptr<core::Repository> &flow_repo, const std::shared_ptr<minifi::Configure> &configuration,
- const std::shared_ptr<core::ContentRepository> &content_repo = std::make_shared<core::repository::FileSystemRepository>())
- : core::ProcessContext(processor, controller_service_provider, repo, flow_repo, configuration, content_repo),
+ const std::shared_ptr<core::ContentRepository> &content_repo = core::repository::createFileSystemRepository())
+ : core::ProcessContextImpl(processor, controller_service_provider, repo, flow_repo, configuration, content_repo),
logger_(logging::LoggerFactory<ProcessContextExpr>::getLogger()) {
}
@@ -60,6 +60,8 @@ class ProcessContextExpr final : public core::ProcessContext {
bool setDynamicProperty(const std::string& property, std::string value) override;
+ using ProcessContextImpl::getProperty;
+
private:
bool getProperty(bool supports_expression_language, std::string_view property_name, std::string& value, const FlowFile* const flow_file);
diff --git a/extensions/expression-language/impl/expression/Expression.h b/extensions/expression-language/impl/expression/Expression.h
index 70d5149da..cfe963730 100644
--- a/extensions/expression-language/impl/expression/Expression.h
+++ b/extensions/expression-language/impl/expression/Expression.h
@@ -25,7 +25,7 @@
#include "common/Value.h"
#include "FlowFile.h"
-#include "VariableRegistry.h"
+#include "core/VariableRegistry.h"
namespace org::apache::nifi::minifi::expression {
diff --git a/extensions/expression-language/tests/ExpressionLanguageTests.cpp b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
index 319a7ea9d..76a236c16 100644
--- a/extensions/expression-language/tests/ExpressionLanguageTests.cpp
+++ b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
@@ -63,7 +63,7 @@ TEST_CASE("Text expression with escaped dollar", "[expressionLanguageTestEscaped
}
TEST_CASE("Attribute expression", "[expressionLanguageTestAttributeExpression]") {
- auto flow_file = std::make_shared<core::FlowFile>();
+ auto flow_file = std::make_shared<core::FlowFileImpl>();
flow_file->addAttribute("attr_a", "__attr_value_a__");
auto expr = expression::compile("text_before${attr_a}text_after");
REQUIRE("text_before__attr_value_a__text_after" == expr(expression::Parameters{ flow_file.get() }).asString());
@@ -76,7 +76,7 @@ TEST_CASE("Attribute expression (Null)", "[expressionLanguageTestAttributeExpres
}
TEST_CASE("Multi-attribute expression", "[expressionLanguageTestMultiAttributeExpression]") {
- auto flow_file = std::make_shared<core::FlowFile>();
+ auto flow_file = std::make_shared<core::FlowFileImpl>();
flow_file->addAttribute("attr_a", "__attr_value_a__");
flow_file->addAttribute("attr_b", "__attr_value_b__");
auto expr = expression::compile("text_before${attr_a}text_between${attr_b}text_after");
@@ -87,17 +87,17 @@ TEST_CASE("Multi-flowfile attribute expression",
"[expressionLanguageTestMultiFlowfileAttributeExpression]") {
auto expr = expression::compile("text_before${attr_a}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__flow_a_attr_value_a__");
REQUIRE("text_before__flow_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
- auto flow_file_b = std::make_shared<core::FlowFile>();
+ auto flow_file_b = std::make_shared<core::FlowFileImpl>();
flow_file_b->addAttribute("attr_a", "__flow_b_attr_value_a__");
REQUIRE("text_before__flow_b_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_b.get() }).asString());
}
TEST_CASE("Attribute expression with whitespace", "[expressionLanguageTestAttributeExpressionWhitespace]") {
- auto flow_file = std::make_shared<core::FlowFile>();
+ auto flow_file = std::make_shared<core::FlowFileImpl>();
flow_file->addAttribute("attr_a", "__attr_value_a__");
auto expr = expression::compile("text_before${\n\tattr_a \r}text_after");
REQUIRE("text_before__attr_value_a__text_after" == expr(expression::Parameters{ flow_file.get() }).asString());
@@ -106,7 +106,7 @@ TEST_CASE("Attribute expression with whitespace", "[expressionLanguageTestAttrib
TEST_CASE("Special characters expression", "[expressionLanguageTestSpecialCharactersExpression]") {
auto expr = expression::compile("text_before|{}()[],:;\\/*#'\" \t\r\n${attr_a}}()text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__flow_a_attr_value_a__");
REQUIRE("text_before|{}()[],:;\\/*#'\" \t\r\n__flow_a_attr_value_a__}()text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -114,7 +114,7 @@ TEST_CASE("Special characters expression", "[expressionLanguageTestSpecialCharac
TEST_CASE("UTF-8 characters expression", "[expressionLanguageTestUTF8Expression]") {
auto expr = expression::compile("text_before¥£€¢₡₢₣₤₥₦₧₨₩₪₫â‚₮₯₹${attr_a}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__flow_a_attr_value_a__");
REQUIRE("text_before¥£€¢₡₢₣₤₥₦₧₨₩₪₫â‚₮₯₹__flow_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -122,7 +122,7 @@ TEST_CASE("UTF-8 characters expression", "[expressionLanguageTestUTF8Expression]
TEST_CASE("UTF-8 characters attribute", "[expressionLanguageTestUTF8Attribute]") {
auto expr = expression::compile("text_before${attr_a}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__¥£€¢₡₢₣₤₥₦₧₨₩₪₫â‚₮₯₹__");
REQUIRE("text_before__¥£€¢₡₢₣₤₥₦₧₨₩₪₫â‚₮₯₹__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -130,7 +130,7 @@ TEST_CASE("UTF-8 characters attribute", "[expressionLanguageTestUTF8Attribute]")
TEST_CASE("Single quoted attribute expression", "[expressionLanguageTestSingleQuotedAttributeExpression]") {
auto expr = expression::compile("text_before${'|{}()[],:;\\\\/*# \t\r\n$'}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("|{}()[],:;\\/*# \t\r\n$", "__flow_a_attr_value_a__");
REQUIRE("text_before__flow_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -138,7 +138,7 @@ TEST_CASE("Single quoted attribute expression", "[expressionLanguageTestSingleQu
TEST_CASE("Double quoted attribute expression", "[expressionLanguageTestDoubleQuotedAttributeExpression]") {
auto expr = expression::compile("text_before${\"|{}()[],:;\\\\/*# \t\r\n$\"}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("|{}()[],:;\\/*# \t\r\n$", "__flow_a_attr_value_a__");
REQUIRE("text_before__flow_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -152,7 +152,7 @@ TEST_CASE("Hostname function", "[expressionLanguageTestHostnameFunction]") {
expected.append(hostname.data());
expected.append("text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
REQUIRE(expected == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -160,14 +160,14 @@ TEST_CASE("ToUpper function", "[expressionLanguageTestToUpperFunction]") {
auto expr = expression::compile(R"(text_before${
attr_a : toUpper()
}text_after)");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__flow_a_attr_value_a__");
REQUIRE("text_before__FLOW_A_ATTR_VALUE_A__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
TEST_CASE("ToUpper function w/o whitespace", "[expressionLanguageTestToUpperFunctionWithoutWhitespace]") {
auto expr = expression::compile(R"(text_before${attr_a:toUpper()}text_after)");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__flow_a_attr_value_a__");
REQUIRE("text_before__FLOW_A_ATTR_VALUE_A__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -176,7 +176,7 @@ TEST_CASE("ToLower function", "[expressionLanguageTestToLowerFunction]") {
auto expr = expression::compile(R"(text_before${
attr_a : toLower()
}text_after)");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr_a", "__FLOW_A_ATTR_VALUE_A__");
REQUIRE("text_before__flow_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -192,7 +192,7 @@ TEST_CASE("GetFile PutFile dynamic attribute", "[expressionLanguageTestGetFilePu
LogTestController::getInstance().setTrace<minifi::processors::LogAttribute>();
LogTestController::getInstance().setTrace<minifi::processors::UpdateAttribute>();
- auto conf = std::make_shared<minifi::Configure>();
+ auto conf = std::make_shared<minifi::ConfigureImpl>();
conf->setHome(testController.createTempDirectory());
conf->set("nifi.my.own.property", "custom_value");
@@ -251,7 +251,7 @@ TEST_CASE("GetFile PutFile dynamic attribute", "[expressionLanguageTestGetFilePu
TEST_CASE("Substring 2 arg", "[expressionLanguageSubstring2]") {
auto expr = expression::compile("text_before${attr:substring(6, 8)}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("text_before_a_attr_text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -259,7 +259,7 @@ TEST_CASE("Substring 2 arg", "[expressionLanguageSubstring2]") {
TEST_CASE("Substring 1 arg", "[expressionLanguageSubstring1]") {
auto expr = expression::compile("text_before${attr:substring(6)}text_after");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("text_before_a_attr_value_a__text_after" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -267,7 +267,7 @@ TEST_CASE("Substring 1 arg", "[expressionLanguageSubstring1]") {
TEST_CASE("Substring Before", "[expressionLanguageSubstringBefore]") {
auto expr = expression::compile("${attr:substringBefore('attr_value_a__')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("__flow_a_" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -275,7 +275,7 @@ TEST_CASE("Substring Before", "[expressionLanguageSubstringBefore]") {
TEST_CASE("Substring Before Last", "[expressionLanguageSubstringBeforeLast]") {
auto expr = expression::compile("${attr:substringBeforeLast('_a')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("__flow_a_attr_value" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -283,7 +283,7 @@ TEST_CASE("Substring Before Last", "[expressionLanguageSubstringBeforeLast]") {
TEST_CASE("Substring After", "[expressionLanguageSubstringAfter]") {
auto expr = expression::compile("${attr:substringAfter('__flow_a')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("_attr_value_a__" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -291,7 +291,7 @@ TEST_CASE("Substring After", "[expressionLanguageSubstringAfter]") {
TEST_CASE("Substring After Last", "[expressionLanguageSubstringAfterLast]") {
auto expr = expression::compile("${attr:substringAfterLast('_a')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "__flow_a_attr_value_a__");
REQUIRE("__" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -299,7 +299,7 @@ TEST_CASE("Substring After Last", "[expressionLanguageSubstringAfterLast]") {
TEST_CASE("Get Delimited", "[expressionLanguageGetDelimited]") {
auto expr = expression::compile("${attr:getDelimitedField(2)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "\"Jacobson, John\", 32, Mr.");
REQUIRE(" 32" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -307,7 +307,7 @@ TEST_CASE("Get Delimited", "[expressionLanguageGetDelimited]") {
TEST_CASE("Get Delimited 2", "[expressionLanguageGetDelimited2]") {
auto expr = expression::compile("${attr:getDelimitedField(1)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "\"Jacobson, John\", 32, Mr.");
REQUIRE("\"Jacobson, John\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -315,7 +315,7 @@ TEST_CASE("Get Delimited 2", "[expressionLanguageGetDelimited2]") {
TEST_CASE("Get Delimited 3", "[expressionLanguageGetDelimited3]") {
auto expr = expression::compile(R"(${attr:getDelimitedField(1, ',', '\"', '\\', 'true')})");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "\"Jacobson, John\", 32, Mr.");
REQUIRE("Jacobson, John" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -323,7 +323,7 @@ TEST_CASE("Get Delimited 3", "[expressionLanguageGetDelimited3]") {
TEST_CASE("Starts With", "[expressionLanguageStartsWith]") {
auto expr = expression::compile("${attr:startsWith('a brand')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "A BRAND TEST");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -331,7 +331,7 @@ TEST_CASE("Starts With", "[expressionLanguageStartsWith]") {
TEST_CASE("Starts With 2", "[expressionLanguageStartsWith2]") {
auto expr = expression::compile("${attr:startsWith('a brand')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand TEST");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -339,7 +339,7 @@ TEST_CASE("Starts With 2", "[expressionLanguageStartsWith2]") {
TEST_CASE("Ends With", "[expressionLanguageEndsWith]") {
auto expr = expression::compile("${attr:endsWith('txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.TXT");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -347,7 +347,7 @@ TEST_CASE("Ends With", "[expressionLanguageEndsWith]") {
TEST_CASE("Ends With 2", "[expressionLanguageEndsWith2]") {
auto expr = expression::compile("${attr:endsWith('TXT')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.TXT");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -355,7 +355,7 @@ TEST_CASE("Ends With 2", "[expressionLanguageEndsWith2]") {
TEST_CASE("Contains", "[expressionLanguageContains]") {
auto expr = expression::compile("${attr:contains('new')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -363,7 +363,7 @@ TEST_CASE("Contains", "[expressionLanguageContains]") {
TEST_CASE("Contains 2", "[expressionLanguageContains2]") {
auto expr = expression::compile("${attr:contains('NEW')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -371,7 +371,7 @@ TEST_CASE("Contains 2", "[expressionLanguageContains2]") {
TEST_CASE("In", "[expressionLanguageIn]") {
auto expr = expression::compile("${attr:in('PAUL', 'JOHN', 'MIKE')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "JOHN");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -379,7 +379,7 @@ TEST_CASE("In", "[expressionLanguageIn]") {
TEST_CASE("In 2", "[expressionLanguageIn2]") {
auto expr = expression::compile("${attr:in('RED', 'GREEN', 'BLUE')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "JOHN");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -395,7 +395,7 @@ TEST_CASE("Substring After No Args", "[expressionLanguageSubstringAfterNoArgs]")
TEST_CASE("Replace", "[expressionLanguageReplace]") {
auto expr = expression::compile("${attr:replace('.', '_')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a brand new filename_txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -403,7 +403,7 @@ TEST_CASE("Replace", "[expressionLanguageReplace]") {
TEST_CASE("Replace 2", "[expressionLanguageReplace2]") {
auto expr = expression::compile("${attr:replace(' ', '.')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a.brand.new.filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -411,7 +411,7 @@ TEST_CASE("Replace 2", "[expressionLanguageReplace2]") {
TEST_CASE("Replace First", "[expressionLanguageReplaceFirst]") {
auto expr = expression::compile("${attr:replaceFirst('a', 'the')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("the brand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -419,7 +419,7 @@ TEST_CASE("Replace First", "[expressionLanguageReplaceFirst]") {
TEST_CASE("Replace First Regex", "[expressionLanguageReplaceFirstRegex]") {
auto expr = expression::compile("${attr:replaceFirst('[br]', 'g')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a grand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -427,7 +427,7 @@ TEST_CASE("Replace First Regex", "[expressionLanguageReplaceFirstRegex]") {
TEST_CASE("Replace All", "[expressionLanguageReplaceAll]") {
auto expr = expression::compile("${attr:replaceAll('\\\\..*', '')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a brand new filename" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -435,7 +435,7 @@ TEST_CASE("Replace All", "[expressionLanguageReplaceAll]") {
TEST_CASE("Replace All 2", "[expressionLanguageReplaceAll2]") {
auto expr = expression::compile("${attr:replaceAll('a brand (new)', '$1')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -443,7 +443,7 @@ TEST_CASE("Replace All 2", "[expressionLanguageReplaceAll2]") {
TEST_CASE("Replace All 3", "[expressionLanguageReplaceAll3]") {
auto expr = expression::compile("${attr:replaceAll('XYZ', 'ZZZ')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a brand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -451,7 +451,7 @@ TEST_CASE("Replace All 3", "[expressionLanguageReplaceAll3]") {
TEST_CASE("Replace Null", "[expressionLanguageReplaceNull]") {
auto expr = expression::compile("${attr:replaceNull('abc')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a brand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -459,7 +459,7 @@ TEST_CASE("Replace Null", "[expressionLanguageReplaceNull]") {
TEST_CASE("Replace Null 2", "[expressionLanguageReplaceNull2]") {
auto expr = expression::compile("${attr:replaceNull('abc')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr2", "a brand new filename.txt");
REQUIRE("abc" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -467,7 +467,7 @@ TEST_CASE("Replace Null 2", "[expressionLanguageReplaceNull2]") {
TEST_CASE("Replace Empty", "[expressionLanguageReplaceEmpty]") {
auto expr = expression::compile("${attr:replaceEmpty('abc')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("a brand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -475,7 +475,7 @@ TEST_CASE("Replace Empty", "[expressionLanguageReplaceEmpty]") {
TEST_CASE("Replace Empty 2", "[expressionLanguageReplaceEmpty2]") {
auto expr = expression::compile("${attr:replaceEmpty('abc')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", " \t \r \n ");
REQUIRE("abc" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -483,7 +483,7 @@ TEST_CASE("Replace Empty 2", "[expressionLanguageReplaceEmpty2]") {
TEST_CASE("Replace Empty 3", "[expressionLanguageReplaceEmpty2]") {
auto expr = expression::compile("${attr:replaceEmpty('abc')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr2", "test");
REQUIRE("abc" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -491,7 +491,7 @@ TEST_CASE("Replace Empty 3", "[expressionLanguageReplaceEmpty2]") {
TEST_CASE("Matches", "[expressionLanguageMatches]") {
auto expr = expression::compile("${attr:matches('^(Ct|Bt|At):.*t$')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "At:est");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -499,7 +499,7 @@ TEST_CASE("Matches", "[expressionLanguageMatches]") {
TEST_CASE("Matches 2", "[expressionLanguageMatches2]") {
auto expr = expression::compile("${attr:matches('^(Ct|Bt|At):.*t$')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "At:something");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -507,7 +507,7 @@ TEST_CASE("Matches 2", "[expressionLanguageMatches2]") {
TEST_CASE("Matches 3", "[expressionLanguageMatches3]") {
auto expr = expression::compile("${attr:matches('(Ct|Bt|At):.*t')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", " At:est");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -515,7 +515,7 @@ TEST_CASE("Matches 3", "[expressionLanguageMatches3]") {
TEST_CASE("Find", "[expressionLanguageFind]") {
auto expr = expression::compile("${attr:find('a [Bb]rand [Nn]ew')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -523,7 +523,7 @@ TEST_CASE("Find", "[expressionLanguageFind]") {
TEST_CASE("Find 2", "[expressionLanguageFind2]") {
auto expr = expression::compile("${attr:find('Brand.*')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -531,7 +531,7 @@ TEST_CASE("Find 2", "[expressionLanguageFind2]") {
TEST_CASE("Find 3", "[expressionLanguageFind3]") {
auto expr = expression::compile("${attr:find('brand')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -539,7 +539,7 @@ TEST_CASE("Find 3", "[expressionLanguageFind3]") {
TEST_CASE("IndexOf", "[expressionLanguageIndexOf]") {
auto expr = expression::compile("${attr:indexOf('a.*txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("-1" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -547,7 +547,7 @@ TEST_CASE("IndexOf", "[expressionLanguageIndexOf]") {
TEST_CASE("IndexOf2", "[expressionLanguageIndexOf2]") {
auto expr = expression::compile("${attr:indexOf('.')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("20" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -555,7 +555,7 @@ TEST_CASE("IndexOf2", "[expressionLanguageIndexOf2]") {
TEST_CASE("IndexOf3", "[expressionLanguageIndexOf3]") {
auto expr = expression::compile("${attr:indexOf('a')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("0" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -563,7 +563,7 @@ TEST_CASE("IndexOf3", "[expressionLanguageIndexOf3]") {
TEST_CASE("IndexOf4", "[expressionLanguageIndexOf4]") {
auto expr = expression::compile("${attr:indexOf(' ')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("1" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -571,7 +571,7 @@ TEST_CASE("IndexOf4", "[expressionLanguageIndexOf4]") {
TEST_CASE("LastIndexOf", "[expressionLanguageLastIndexOf]") {
auto expr = expression::compile("${attr:lastIndexOf('a.*txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("-1" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -579,7 +579,7 @@ TEST_CASE("LastIndexOf", "[expressionLanguageLastIndexOf]") {
TEST_CASE("LastIndexOf2", "[expressionLanguageLastIndexOf2]") {
auto expr = expression::compile("${attr:lastIndexOf('.')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("20" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -587,7 +587,7 @@ TEST_CASE("LastIndexOf2", "[expressionLanguageLastIndexOf2]") {
TEST_CASE("LastIndexOf3", "[expressionLanguageLastIndexOf3]") {
auto expr = expression::compile("${attr:lastIndexOf('a')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("17" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -595,7 +595,7 @@ TEST_CASE("LastIndexOf3", "[expressionLanguageLastIndexOf3]") {
TEST_CASE("LastIndexOf4", "[expressionLanguageLastIndexOf4]") {
auto expr = expression::compile("${attr:lastIndexOf(' ')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "a brand new filename.txt");
REQUIRE("11" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -603,7 +603,7 @@ TEST_CASE("LastIndexOf4", "[expressionLanguageLastIndexOf4]") {
TEST_CASE("Plus Integer", "[expressionLanguagePlusInteger]") {
auto expr = expression::compile("${attr:plus(13)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11");
REQUIRE("24" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -611,7 +611,7 @@ TEST_CASE("Plus Integer", "[expressionLanguagePlusInteger]") {
TEST_CASE("Plus Decimal", "[expressionLanguagePlusDecimal]") {
auto expr = expression::compile("${attr:plus(-13.34567)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11.1");
REQUIRE("-2.24567" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -619,7 +619,7 @@ TEST_CASE("Plus Decimal", "[expressionLanguagePlusDecimal]") {
TEST_CASE("Plus Exponent", "[expressionLanguagePlusExponent]") {
auto expr = expression::compile("${attr:plus(10e+6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11");
REQUIRE("10000011" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -627,7 +627,7 @@ TEST_CASE("Plus Exponent", "[expressionLanguagePlusExponent]") {
TEST_CASE("Plus Exponent 2", "[expressionLanguagePlusExponent2]") {
auto expr = expression::compile("${attr:plus(10e+6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11.345678901234");
REQUIRE(10000011.345678901234 == Catch::Approx(expr(expression::Parameters{ flow_file_a.get() }).asLongDouble()));
}
@@ -635,7 +635,7 @@ TEST_CASE("Plus Exponent 2", "[expressionLanguagePlusExponent2]") {
TEST_CASE("Minus Integer", "[expressionLanguageMinusInteger]") {
auto expr = expression::compile("${attr:minus(13)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11");
REQUIRE("-2" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -643,7 +643,7 @@ TEST_CASE("Minus Integer", "[expressionLanguageMinusInteger]") {
TEST_CASE("Minus Decimal", "[expressionLanguageMinusDecimal]") {
auto expr = expression::compile("${attr:minus(-13.34567)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11.1");
REQUIRE("24.44567" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -651,7 +651,7 @@ TEST_CASE("Minus Decimal", "[expressionLanguageMinusDecimal]") {
TEST_CASE("Multiply Integer", "[expressionLanguageMultiplyInteger]") {
auto expr = expression::compile("${attr:multiply(13)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11");
REQUIRE("143" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -659,7 +659,7 @@ TEST_CASE("Multiply Integer", "[expressionLanguageMultiplyInteger]") {
TEST_CASE("Multiply Decimal", "[expressionLanguageMultiplyDecimal]") {
auto expr = expression::compile("${attr:multiply(-13.34567)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11.1");
REQUIRE(-148.136937 == Catch::Approx(expr(expression::Parameters{ flow_file_a.get() }).asLongDouble()));
}
@@ -667,7 +667,7 @@ TEST_CASE("Multiply Decimal", "[expressionLanguageMultiplyDecimal]") {
TEST_CASE("Divide Integer", "[expressionLanguageDivideInteger]") {
auto expr = expression::compile("${attr:divide(13)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11");
REQUIRE("0.846153846153846" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -675,7 +675,7 @@ TEST_CASE("Divide Integer", "[expressionLanguageDivideInteger]") {
TEST_CASE("Divide Decimal", "[expressionLanguageDivideDecimal]") {
auto expr = expression::compile("${attr:divide(-13.34567)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "11.1");
REQUIRE("-0.831730441409086" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -683,7 +683,7 @@ TEST_CASE("Divide Decimal", "[expressionLanguageDivideDecimal]") {
TEST_CASE("To Radix", "[expressionLanguageToRadix]") {
auto expr = expression::compile("${attr:toRadix(2,16)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "10");
REQUIRE("0000000000001010" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -691,7 +691,7 @@ TEST_CASE("To Radix", "[expressionLanguageToRadix]") {
TEST_CASE("To Radix 2", "[expressionLanguageToRadix2]") {
auto expr = expression::compile("${attr:toRadix(16)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "13");
REQUIRE("d" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -699,7 +699,7 @@ TEST_CASE("To Radix 2", "[expressionLanguageToRadix2]") {
TEST_CASE("To Radix 3", "[expressionLanguageToRadix3]") {
auto expr = expression::compile("${attr:toRadix(23,8)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "-2347");
REQUIRE("-000004a1" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -707,7 +707,7 @@ TEST_CASE("To Radix 3", "[expressionLanguageToRadix3]") {
TEST_CASE("From Radix", "[expressionLanguageFromRadix]") {
auto expr = expression::compile("${attr:fromRadix(2)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "0000000000001010");
REQUIRE("10" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -715,7 +715,7 @@ TEST_CASE("From Radix", "[expressionLanguageFromRadix]") {
TEST_CASE("From Radix 2", "[expressionLanguageFromRadix2]") {
auto expr = expression::compile("${attr:fromRadix(16)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "d");
REQUIRE("13" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -723,7 +723,7 @@ TEST_CASE("From Radix 2", "[expressionLanguageFromRadix2]") {
TEST_CASE("From Radix 3", "[expressionLanguageFromRadix3]") {
auto expr = expression::compile("${attr:fromRadix(23)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "-000004a1");
REQUIRE("-2347" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -731,7 +731,7 @@ TEST_CASE("From Radix 3", "[expressionLanguageFromRadix3]") {
TEST_CASE("Random", "[expressionLanguageRandom]") {
auto expr = expression::compile("${random()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
auto result = expr(expression::Parameters{ flow_file_a.get() }).asSignedLong();
REQUIRE(result > 0);
}
@@ -739,7 +739,7 @@ TEST_CASE("Random", "[expressionLanguageRandom]") {
TEST_CASE("Chained call", "[expressionChainedCall]") {
auto expr = expression::compile("${attr:multiply(3):plus(1)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("22" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -747,14 +747,14 @@ TEST_CASE("Chained call", "[expressionChainedCall]") {
TEST_CASE("Chained call 2", "[expressionChainedCall2]") {
auto expr = expression::compile("${literal(10):multiply(2):plus(1):multiply(2)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
REQUIRE(42 == expr(expression::Parameters{ flow_file_a.get() }).asSignedLong());
}
TEST_CASE("Chained call 3", "[expressionChainedCall3]") {
auto expr = expression::compile("${literal(10):multiply(2):plus(${attr:multiply(2)}):multiply(${attr})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("238" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -762,7 +762,7 @@ TEST_CASE("Chained call 3", "[expressionChainedCall3]") {
TEST_CASE("LiteralBool", "[expressionLiteralBool]") {
auto expr = expression::compile("${literal(true)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE(true == expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -770,7 +770,7 @@ TEST_CASE("LiteralBool", "[expressionLiteralBool]") {
TEST_CASE("LiteralBool 2", "[expressionLiteralBool2]") {
auto expr = expression::compile("${literal(false)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE(false == expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -778,7 +778,7 @@ TEST_CASE("LiteralBool 2", "[expressionLiteralBool2]") {
TEST_CASE("Is Null", "[expressionIsNull]") {
auto expr = expression::compile("${filename:isNull()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -786,7 +786,7 @@ TEST_CASE("Is Null", "[expressionIsNull]") {
TEST_CASE("Is Null 2", "[expressionIsNull2]") {
auto expr = expression::compile("${filename:isNull()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "7");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -794,7 +794,7 @@ TEST_CASE("Is Null 2", "[expressionIsNull2]") {
TEST_CASE("Not Null", "[expressionNotNull]") {
auto expr = expression::compile("${filename:notNull()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -802,7 +802,7 @@ TEST_CASE("Not Null", "[expressionNotNull]") {
TEST_CASE("Not Null 2", "[expressionNotNull2]") {
auto expr = expression::compile("${filename:notNull()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "7");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -810,7 +810,7 @@ TEST_CASE("Not Null 2", "[expressionNotNull2]") {
TEST_CASE("Is Empty", "[expressionIsEmpty]") {
auto expr = expression::compile("${filename:isEmpty()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -818,7 +818,7 @@ TEST_CASE("Is Empty", "[expressionIsEmpty]") {
TEST_CASE("Is Empty 2", "[expressionIsEmpty2]") {
auto expr = expression::compile("${attr:isEmpty()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "7");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -826,7 +826,7 @@ TEST_CASE("Is Empty 2", "[expressionIsEmpty2]") {
TEST_CASE("Is Empty 3", "[expressionIsEmpty3]") {
auto expr = expression::compile("${attr:isEmpty()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", " \t\r\n ");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -834,7 +834,7 @@ TEST_CASE("Is Empty 3", "[expressionIsEmpty3]") {
TEST_CASE("Is Empty 4", "[expressionIsEmpty4]") {
auto expr = expression::compile("${attr:isEmpty()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -842,7 +842,7 @@ TEST_CASE("Is Empty 4", "[expressionIsEmpty4]") {
TEST_CASE("Is Empty 5", "[expressionIsEmpty5]") {
auto expr = expression::compile("${attr:isEmpty()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", " \t\r\n a \t\r\n ");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -850,7 +850,7 @@ TEST_CASE("Is Empty 5", "[expressionIsEmpty5]") {
TEST_CASE("Equals", "[expressionEquals]") {
auto expr = expression::compile("${attr:equals('hello.txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "hello.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -858,7 +858,7 @@ TEST_CASE("Equals", "[expressionEquals]") {
TEST_CASE("Equals 2", "[expressionEquals2]") {
auto expr = expression::compile("${attr:equals('hello.txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "helllo.txt");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -866,7 +866,7 @@ TEST_CASE("Equals 2", "[expressionEquals2]") {
TEST_CASE("Equals 3", "[expressionEquals3]") {
auto expr = expression::compile("${attr:plus(5):equals(6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -874,7 +874,7 @@ TEST_CASE("Equals 3", "[expressionEquals3]") {
TEST_CASE("Equals Ignore Case", "[expressionEqualsIgnoreCase]") {
auto expr = expression::compile("${attr:equalsIgnoreCase('hElLo.txt')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "hello.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -882,7 +882,7 @@ TEST_CASE("Equals Ignore Case", "[expressionEqualsIgnoreCase]") {
TEST_CASE("Equals Ignore Case 2", "[expressionEqualsIgnoreCase2]") {
auto expr = expression::compile("${attr:plus(5):equalsIgnoreCase(6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -890,7 +890,7 @@ TEST_CASE("Equals Ignore Case 2", "[expressionEqualsIgnoreCase2]") {
TEST_CASE("GT", "[expressionGT]") {
auto expr = expression::compile("${attr:plus(5):gt(5)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -898,7 +898,7 @@ TEST_CASE("GT", "[expressionGT]") {
TEST_CASE("GT2", "[expressionGT2]") {
auto expr = expression::compile("${attr:plus(5.1):gt(6.05)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -906,7 +906,7 @@ TEST_CASE("GT2", "[expressionGT2]") {
TEST_CASE("GT3", "[expressionGT3]") {
auto expr = expression::compile("${attr:plus(5.1):gt(6.15)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -936,7 +936,7 @@ TEST_CASE("GT4 Value parsing errors", "[expressionGT4][outofrange]") {
REQUIRE(test_str);
REQUIRE(expected_substr);
const auto expr = expression::compile("${attr1:gt(13.37)}");
- auto flow_file = std::make_shared<core::FlowFile>();
+ auto flow_file = std::make_shared<core::FlowFileImpl>();
flow_file->addAttribute("attr1", test_str);
try {
const auto result = expr(expression::Parameters{flow_file.get()}).asString();
@@ -952,7 +952,7 @@ TEST_CASE("GT4 Value parsing errors", "[expressionGT4][outofrange]") {
TEST_CASE("GE", "[expressionGE]") {
auto expr = expression::compile("${attr:plus(5):ge(6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -960,7 +960,7 @@ TEST_CASE("GE", "[expressionGE]") {
TEST_CASE("GE2", "[expressionGE2]") {
auto expr = expression::compile("${attr:plus(5.1):ge(6.05)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -968,7 +968,7 @@ TEST_CASE("GE2", "[expressionGE2]") {
TEST_CASE("GE3", "[expressionGE3]") {
auto expr = expression::compile("${attr:plus(5.1):ge(6.15)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -976,7 +976,7 @@ TEST_CASE("GE3", "[expressionGE3]") {
TEST_CASE("LT", "[expressionLT]") {
auto expr = expression::compile("${attr:plus(5):lt(5)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -984,7 +984,7 @@ TEST_CASE("LT", "[expressionLT]") {
TEST_CASE("LT2", "[expressionLT2]") {
auto expr = expression::compile("${attr:plus(5.1):lt(6.05)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -992,7 +992,7 @@ TEST_CASE("LT2", "[expressionLT2]") {
TEST_CASE("LT3", "[expressionLT3]") {
auto expr = expression::compile("${attr:plus(5.1):lt(6.15)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1000,7 +1000,7 @@ TEST_CASE("LT3", "[expressionLT3]") {
TEST_CASE("LE", "[expressionLE]") {
auto expr = expression::compile("${attr:plus(5):le(6)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1008,7 +1008,7 @@ TEST_CASE("LE", "[expressionLE]") {
TEST_CASE("LE2", "[expressionLE2]") {
auto expr = expression::compile("${attr:plus(5.1):le(6.05)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1016,7 +1016,7 @@ TEST_CASE("LE2", "[expressionLE2]") {
TEST_CASE("LE3", "[expressionLE3]") {
auto expr = expression::compile("${attr:plus(5.1):le(6.15)}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("attr", "1");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1024,7 +1024,7 @@ TEST_CASE("LE3", "[expressionLE3]") {
TEST_CASE("And", "[expressionAnd]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):and(${filename:substring(0, 2):equals('an')})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1032,7 +1032,7 @@ TEST_CASE("And", "[expressionAnd]") {
TEST_CASE("And 2", "[expressionAnd2]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):and(${filename:substring(0, 2):equals('ab')})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1040,7 +1040,7 @@ TEST_CASE("And 2", "[expressionAnd2]") {
TEST_CASE("Or", "[expressionOr]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):or(${filename:substring(0, 2):equals('an')})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1048,7 +1048,7 @@ TEST_CASE("Or", "[expressionOr]") {
TEST_CASE("Or 2", "[expressionOr2]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):or(${filename:substring(0, 2):equals('ab')})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1056,7 +1056,7 @@ TEST_CASE("Or 2", "[expressionOr2]") {
TEST_CASE("Not", "[expressionNot]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):and(${filename:substring(0, 2):equals('an')}):not()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("false" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1064,7 +1064,7 @@ TEST_CASE("Not", "[expressionNot]") {
TEST_CASE("Not 2", "[expressionNot2]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename} ):and(${filename:substring(0, 2):equals('ab')}):not()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("true" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1072,7 +1072,7 @@ TEST_CASE("Not 2", "[expressionNot2]") {
TEST_CASE("If Else", "[expressionIfElse]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename}):ifElse('yes', 'no')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "an example file.txt");
REQUIRE("yes" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1080,7 +1080,7 @@ TEST_CASE("If Else", "[expressionIfElse]") {
TEST_CASE("If Else 2", "[expressionIfElse2]") {
auto expr = expression::compile("${filename:toLower():equals( ${filename}):ifElse('yes', 'no')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("filename", "An example file.txt");
REQUIRE("no" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1088,7 +1088,7 @@ TEST_CASE("If Else 2", "[expressionIfElse2]") {
TEST_CASE("Encode JSON", "[expressionEncodeJSON]") {
auto expr = expression::compile("${message:escapeJson()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "This is a \"test!\"");
REQUIRE("This is a \\\"test!\\\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1096,7 +1096,7 @@ TEST_CASE("Encode JSON", "[expressionEncodeJSON]") {
TEST_CASE("Decode JSON", "[expressionDecodeJSON]") {
auto expr = expression::compile("${message:unescapeJson()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", R"(This is a \"test!\")");
REQUIRE("This is a \"test!\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1104,7 +1104,7 @@ TEST_CASE("Decode JSON", "[expressionDecodeJSON]") {
TEST_CASE("Encode Decode JSON", "[expressionEncodeDecodeJSON]") {
auto expr = expression::compile("${message:escapeJson():unescapeJson()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "This is a \"test!\"");
REQUIRE("This is a \"test!\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1112,7 +1112,7 @@ TEST_CASE("Encode Decode JSON", "[expressionEncodeDecodeJSON]") {
TEST_CASE("Encode XML", "[expressionEncodeXML]") {
auto expr = expression::compile("${message:escapeXml()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < \"two!\" & 'true'");
REQUIRE("Zero > One < "two!" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1120,7 +1120,7 @@ TEST_CASE("Encode XML", "[expressionEncodeXML]") {
TEST_CASE("Decode XML", "[expressionDecodeXML]") {
auto expr = expression::compile("${message:unescapeXml()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < "two!" & 'true'");
REQUIRE("Zero > One < \"two!\" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1128,7 +1128,7 @@ TEST_CASE("Decode XML", "[expressionDecodeXML]") {
TEST_CASE("Encode Decode XML", "[expressionEncodeDecodeXML]") {
auto expr = expression::compile("${message:escapeXml():unescapeXml()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < \"two!\" & 'true'");
REQUIRE("Zero > One < \"two!\" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1136,7 +1136,7 @@ TEST_CASE("Encode Decode XML", "[expressionEncodeDecodeXML]") {
TEST_CASE("Encode HTML3", "[expressionEncodeHTML3]") {
auto expr = expression::compile("${message:escapeHtml3()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ & < «");
REQUIRE("¥ & < «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1144,7 +1144,7 @@ TEST_CASE("Encode HTML3", "[expressionEncodeHTML3]") {
TEST_CASE("Decode HTML3", "[expressionDecodeHTML3]") {
auto expr = expression::compile("${message:unescapeHtml3()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ & < «");
REQUIRE("¥ & < «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1152,7 +1152,7 @@ TEST_CASE("Decode HTML3", "[expressionDecodeHTML3]") {
TEST_CASE("Encode Decode HTML3", "[expressionEncodeDecodeHTML3]") {
auto expr = expression::compile("${message:escapeHtml3():unescapeHtml3()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ & < «");
REQUIRE("¥ & < «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1160,7 +1160,7 @@ TEST_CASE("Encode Decode HTML3", "[expressionEncodeDecodeHTML3]") {
TEST_CASE("Encode HTML4", "[expressionEncodeHTML4]") {
auto expr = expression::compile("${message:escapeHtml4()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ & Φ < «");
REQUIRE("¥ & Φ < «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1168,7 +1168,7 @@ TEST_CASE("Encode HTML4", "[expressionEncodeHTML4]") {
TEST_CASE("Decode HTML4", "[expressionDecodeHTML4]") {
auto expr = expression::compile("${message:unescapeHtml4()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ ι & < «");
REQUIRE("¥ ι & < «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1176,7 +1176,7 @@ TEST_CASE("Decode HTML4", "[expressionDecodeHTML4]") {
TEST_CASE("Encode Decode HTML4", "[expressionEncodeDecodeHTML4]") {
auto expr = expression::compile("${message:escapeHtml4():unescapeHtml4()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "¥ & < Π «");
REQUIRE("¥ & < Π «" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1184,7 +1184,7 @@ TEST_CASE("Encode Decode HTML4", "[expressionEncodeDecodeHTML4]") {
TEST_CASE("Encode CSV", "[expressionEncodeCSV]") {
auto expr = expression::compile("${message:escapeCsv()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < \"two!\" & 'true'");
REQUIRE("\"Zero > One < \"\"two!\"\" & 'true'\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1192,7 +1192,7 @@ TEST_CASE("Encode CSV", "[expressionEncodeCSV]") {
TEST_CASE("Decode CSV", "[expressionDecodeCSV]") {
auto expr = expression::compile("${message:unescapeCsv()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", R"("Zero > One < ""two!"" & 'true'")");
REQUIRE("Zero > One < \"two!\" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1200,7 +1200,7 @@ TEST_CASE("Decode CSV", "[expressionDecodeCSV]") {
TEST_CASE("Decode CSV 2", "[expressionDecodeCSV2]") {
auto expr = expression::compile("${message:unescapeCsv()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", R"("quoted")");
REQUIRE("\"quoted\"" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1208,7 +1208,7 @@ TEST_CASE("Decode CSV 2", "[expressionDecodeCSV2]") {
TEST_CASE("Encode Decode CSV", "[expressionEncodeDecodeCSV]") {
auto expr = expression::compile("${message:escapeCsv():unescapeCsv()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < \"two!\" & 'true'");
REQUIRE("Zero > One < \"two!\" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1216,7 +1216,7 @@ TEST_CASE("Encode Decode CSV", "[expressionEncodeDecodeCSV]") {
TEST_CASE("Encode URL", "[expressionEncodeURL]") {
auto expr = expression::compile("${message:urlEncode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "some value with spaces");
REQUIRE("some%20value%20with%20spaces" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1224,7 +1224,7 @@ TEST_CASE("Encode URL", "[expressionEncodeURL]") {
TEST_CASE("Decode URL", "[expressionDecodeURL]") {
auto expr = expression::compile("${message:urlDecode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "some%20value%20with%20spaces");
REQUIRE("some value with spaces" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1232,7 +1232,7 @@ TEST_CASE("Decode URL", "[expressionDecodeURL]") {
TEST_CASE("Encode Decode URL", "[expressionEncodeDecodeURL]") {
auto expr = expression::compile("${message:urlEncode():urlDecode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "some value with spaces");
REQUIRE("some value with spaces" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1241,7 +1241,7 @@ TEST_CASE("Parse Date", "[expressionParseDate]") {
#ifdef WIN32
expression::dateSetInstall(TZ_DATA_DIR);
#endif
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "2014/04/30");
CHECK("1398841200000" == expression::compile("${message:toDate('%Y/%m/%d', 'America/Los_Angeles')}")(expression::Parameters{ flow_file_a.get() }).asString());
@@ -1271,7 +1271,7 @@ TEST_CASE("Reformat Date", "[expressionReformatDate]") {
#ifdef WIN32
expression::dateSetInstall(TZ_DATA_DIR);
#endif
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "2014/03/14");
flow_file_a->addAttribute("blue", "20130917162643");
@@ -1356,7 +1356,7 @@ TEST_CASE("Format Date", "[expressionFormatDate]") {
#ifdef WIN32
expression::dateSetInstall(TZ_DATA_DIR);
#endif
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("trillion_milliseconds", "1000000000000");
CHECK(expression::compile("${trillion_milliseconds:format('%Y/%m/%d %H:%M:%SZ', 'UTC')}")(expression::Parameters{ flow_file_a.get() }).asString() == "2001/09/09 01:46:40.000Z");
CHECK(expression::compile("${trillion_milliseconds:format('%Y/%m/%d %H:%M:%SZ', 'Europe/Paris')}")(expression::Parameters{ flow_file_a.get() }).asString() == "2001/09/09 03:46:40.000Z");
@@ -1366,21 +1366,21 @@ TEST_CASE("Format Date", "[expressionFormatDate]") {
TEST_CASE("IP", "[expressionIP]") {
auto expr = expression::compile("${ip()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asString().empty());
}
TEST_CASE("Full Hostname", "[expressionFullHostname]") {
auto expr = expression::compile("${hostname('true')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asString().empty());
}
TEST_CASE("Reverse DNS lookup with valid ip", "[ExpressionLanguage][reverseDnsLookup]") {
auto expr = expression::compile("${reverseDnsLookup(${ip_addr})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
std::string expected_hostname;
SECTION("dns.google IPv6") {
@@ -1413,7 +1413,7 @@ TEST_CASE("Reverse DNS lookup with valid ip", "[ExpressionLanguage][reverseDnsLo
TEST_CASE("Reverse DNS lookup with invalid ip", "[ExpressionLanguage][reverseDnsLookup]") {
auto expr = expression::compile("${reverseDnsLookup(${ip_addr})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("ip_addr", "banana");
REQUIRE_THROWS_AS(expr(expression::Parameters{flow_file_a.get()}), std::runtime_error);
@@ -1422,7 +1422,7 @@ TEST_CASE("Reverse DNS lookup with invalid ip", "[ExpressionLanguage][reverseDns
TEST_CASE("Reverse DNS lookup with invalid timeout parameter", "[ExpressionLanguage][reverseDnsLookup]") {
auto expr = expression::compile("${reverseDnsLookup(${ip_addr}, ${timeout})}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("ip_addr", "192.0.2.1");
flow_file_a->addAttribute("timeout", "strawberry");
@@ -1433,7 +1433,7 @@ TEST_CASE("Reverse DNS lookup with valid timeout parameter", "[ExpressionLanguag
LogTestController::getInstance().setWarn<expression::Expression>();
LogTestController::getInstance().clear();
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
std::string expected_hostname;
flow_file_a->addAttribute("ip_addr", "8.8.8.8");
@@ -1447,14 +1447,14 @@ TEST_CASE("Reverse DNS lookup with valid timeout parameter", "[ExpressionLanguag
TEST_CASE("UUID", "[expressionUuid]") {
auto expr = expression::compile("${UUID()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
REQUIRE(36 == expr(expression::Parameters{ flow_file_a.get() }).asString().length());
}
TEST_CASE("Trim", "[expressionTrim]") {
auto expr = expression::compile("${message:trim()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", " 1 2 3 ");
REQUIRE("1 2 3" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1462,7 +1462,7 @@ TEST_CASE("Trim", "[expressionTrim]") {
TEST_CASE("Append", "[expressionAppend]") {
auto expr = expression::compile("${message:append('.gz')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "a brand new filename.txt");
REQUIRE("a brand new filename.txt.gz" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1470,7 +1470,7 @@ TEST_CASE("Append", "[expressionAppend]") {
TEST_CASE("Prepend", "[expressionPrepend]") {
auto expr = expression::compile("${message:prepend('a brand new ')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "filename.txt");
REQUIRE("a brand new filename.txt" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1478,7 +1478,7 @@ TEST_CASE("Prepend", "[expressionPrepend]") {
TEST_CASE("Length", "[expressionLength]") {
auto expr = expression::compile("${message:length()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "a brand new filename.txt");
REQUIRE(24 == expr(expression::Parameters{ flow_file_a.get() }).asUnsignedLong());
}
@@ -1486,7 +1486,7 @@ TEST_CASE("Length", "[expressionLength]") {
TEST_CASE("Encode B64", "[expressionEncodeB64]") {
auto expr = expression::compile("${message:base64Encode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "admin:admin");
REQUIRE("YWRtaW46YWRtaW4=" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1494,7 +1494,7 @@ TEST_CASE("Encode B64", "[expressionEncodeB64]") {
TEST_CASE("Decode B64", "[expressionDecodeB64]") {
auto expr = expression::compile("${message:base64Decode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "YWRtaW46YWRtaW4=");
REQUIRE("admin:admin" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1502,7 +1502,7 @@ TEST_CASE("Decode B64", "[expressionDecodeB64]") {
TEST_CASE("Encode Decode B64", "[expressionEncodeDecodeB64]") {
auto expr = expression::compile("${message:base64Encode():base64Decode()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("message", "Zero > One < \"two!\" & 'true'");
REQUIRE("Zero > One < \"two!\" & 'true'" == expr(expression::Parameters{ flow_file_a.get() }).asString());
}
@@ -1510,7 +1510,7 @@ TEST_CASE("Encode Decode B64", "[expressionEncodeDecodeB64]") {
TEST_CASE("All Contains", "[expressionAllContains]") {
auto expr = expression::compile("${allAttributes('a', 'b'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello 1");
flow_file_a->addAttribute("b", "hello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1519,7 +1519,7 @@ TEST_CASE("All Contains", "[expressionAllContains]") {
TEST_CASE("All Contains 2", "[expressionAllContains2]") {
auto expr = expression::compile("${allAttributes('a', 'b'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello 1");
flow_file_a->addAttribute("b", "mello 2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1528,7 +1528,7 @@ TEST_CASE("All Contains 2", "[expressionAllContains2]") {
TEST_CASE("Any Contains", "[expressionAnyContains]") {
auto expr = expression::compile("${anyAttribute('a', 'b'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello 1");
flow_file_a->addAttribute("b", "mello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1537,7 +1537,7 @@ TEST_CASE("Any Contains", "[expressionAnyContains]") {
TEST_CASE("Any Contains 2", "[expressionAnyContains2]") {
auto expr = expression::compile("${anyAttribute('a', 'b'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "mello 1");
flow_file_a->addAttribute("b", "mello 2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1546,7 +1546,7 @@ TEST_CASE("Any Contains 2", "[expressionAnyContains2]") {
TEST_CASE("All Matching Contains", "[expressionAllMatchingContains]") {
auto expr = expression::compile("${allMatchingAttributes('xyz_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "hello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1555,7 +1555,7 @@ TEST_CASE("All Matching Contains", "[expressionAllMatchingContains]") {
TEST_CASE("All Matching Contains 2", "[expressionAllMatchingContains2]") {
auto expr = expression::compile("${allMatchingAttributes('abc_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "hello 2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1564,7 +1564,7 @@ TEST_CASE("All Matching Contains 2", "[expressionAllMatchingContains2]") {
TEST_CASE("All Matching Contains 3", "[expressionAllMatchingContains3]") {
auto expr = expression::compile("${allMatchingAttributes('abc_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("abc_2", "hello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1573,7 +1573,7 @@ TEST_CASE("All Matching Contains 3", "[expressionAllMatchingContains3]") {
TEST_CASE("All Matching Contains 4", "[expressionAllMatchingContains4]") {
auto expr = expression::compile("${allMatchingAttributes('xyz_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1582,7 +1582,7 @@ TEST_CASE("All Matching Contains 4", "[expressionAllMatchingContains4]") {
TEST_CASE("Any Matching Contains", "[expressionAnyMatchingContains]") {
auto expr = expression::compile("${anyMatchingAttribute('xyz_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "mello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1591,7 +1591,7 @@ TEST_CASE("Any Matching Contains", "[expressionAnyMatchingContains]") {
TEST_CASE("Any Matching Contains 2", "[expressionAnyMatchingContains2]") {
auto expr = expression::compile("${anyMatchingAttribute('abc_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "mello 2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1600,7 +1600,7 @@ TEST_CASE("Any Matching Contains 2", "[expressionAnyMatchingContains2]") {
TEST_CASE("Any Matching Contains 3", "[expressionAnyMatchingContains3]") {
auto expr = expression::compile("${anyMatchingAttribute('abc_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("abc_1", "hello 1");
flow_file_a->addAttribute("xyz_2", "mello 2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1609,7 +1609,7 @@ TEST_CASE("Any Matching Contains 3", "[expressionAnyMatchingContains3]") {
TEST_CASE("Any Matching Contains 4", "[expressionAnyMatchingContains4]") {
auto expr = expression::compile("${anyMatchingAttribute('abc_.*'):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("xyz_1", "mello 1");
flow_file_a->addAttribute("xyz_2", "mello 2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
@@ -1618,7 +1618,7 @@ TEST_CASE("Any Matching Contains 4", "[expressionAnyMatchingContains4]") {
TEST_CASE("All Delineated Contains", "[expressionAllDelineatedContains]") {
auto expr = expression::compile("${allDelineatedValues(${word_list}, \",\"):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("word_list", "hello_1,hello_2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -1626,7 +1626,7 @@ TEST_CASE("All Delineated Contains", "[expressionAllDelineatedContains]") {
TEST_CASE("All Delineated Contains 2", "[expressionAllDelineatedContains2]") {
auto expr = expression::compile("${allDelineatedValues(${word_list}, \",\"):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("word_list", "hello_1,mello_2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -1634,7 +1634,7 @@ TEST_CASE("All Delineated Contains 2", "[expressionAllDelineatedContains2]") {
TEST_CASE("All Delineated Contains 3", "[expressionAllDelineatedContains3]") {
auto expr = expression::compile("${allDelineatedValues(${word_list}, \" \"):contains('1,h')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("word_list", "hello_1,hello_2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -1642,7 +1642,7 @@ TEST_CASE("All Delineated Contains 3", "[expressionAllDelineatedContains3]") {
TEST_CASE("Any Delineated Contains", "[expressionAnyDelineatedContains]") {
auto expr = expression::compile("${anyDelineatedValue(${word_list}, \",\"):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("word_list", "hello_1,mello_2");
REQUIRE(expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -1650,7 +1650,7 @@ TEST_CASE("Any Delineated Contains", "[expressionAnyDelineatedContains]") {
TEST_CASE("Any Delineated Contains 2", "[expressionAnyDelineatedContains2]") {
auto expr = expression::compile("${anyDelineatedValue(${word_list}, \",\"):contains('hello')}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("word_list", "mello_1,mello_2");
REQUIRE(!expr(expression::Parameters{ flow_file_a.get() }).asBoolean());
}
@@ -1658,7 +1658,7 @@ TEST_CASE("Any Delineated Contains 2", "[expressionAnyDelineatedContains2]") {
TEST_CASE("Count", "[expressionCount]") {
auto expr = expression::compile("${allAttributes('a', 'b'):contains('hello'):count()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello 1");
flow_file_a->addAttribute("b", "mello 2");
REQUIRE(1 == expr(expression::Parameters{ flow_file_a.get() }).asUnsignedLong());
@@ -1667,7 +1667,7 @@ TEST_CASE("Count", "[expressionCount]") {
TEST_CASE("Count 2", "[expressionCount2]") {
auto expr = expression::compile("${allAttributes('a', 'b'):contains('mello'):count()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "mello 1");
flow_file_a->addAttribute("b", "mello 2");
flow_file_a->addAttribute("c", "hello 3");
@@ -1677,7 +1677,7 @@ TEST_CASE("Count 2", "[expressionCount2]") {
TEST_CASE("Count 3", "[expressionCount3]") {
auto expr = expression::compile("abc${allAttributes('a', 'b'):contains('mello'):count()}xyz");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "mello 1");
flow_file_a->addAttribute("b", "mello 2");
flow_file_a->addAttribute("c", "hello 3");
@@ -1687,7 +1687,7 @@ TEST_CASE("Count 3", "[expressionCount3]") {
TEST_CASE("Join", "[expressionJoin]") {
auto expr = expression::compile("abc_${allAttributes('a', 'b'):prepend('def_'):append('_ghi'):join(\"|\")}_xyz");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello");
flow_file_a->addAttribute("b", "mello");
REQUIRE("abc_def_hello_ghi|def_mello_ghi_xyz" == expr(expression::Parameters{ flow_file_a.get() }).asString());
@@ -1696,7 +1696,7 @@ TEST_CASE("Join", "[expressionJoin]") {
TEST_CASE("Join 2", "[expressionJoin2]") {
auto expr = expression::compile("abc_${allAttributes('a', 'b'):join(\"|\"):prepend('def_'):append('_ghi')}_xyz");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
flow_file_a->addAttribute("a", "hello");
flow_file_a->addAttribute("b", "mello");
REQUIRE("abc_def_hello|mello_ghi_xyz" == expr(expression::Parameters{ flow_file_a.get() }).asString());
@@ -1705,7 +1705,7 @@ TEST_CASE("Join 2", "[expressionJoin2]") {
TEST_CASE("resolve_user_id_test", "[resolve_user_id tests]") {
auto expr = expression::compile("${attribute_sid:resolve_user_id()}");
- auto flow_file_a = std::make_shared<core::FlowFile>();
+ auto flow_file_a = std::make_shared<core::FlowFileImpl>();
SECTION("TEST 0") {
flow_file_a->addAttribute("attribute_sid", "0");
diff --git a/extensions/expression-language/tests/ProcessContextExprTests.cpp b/extensions/expression-language/tests/ProcessContextExprTests.cpp
index 89da89d83..563961b1f 100644
--- a/extensions/expression-language/tests/ProcessContextExprTests.cpp
+++ b/extensions/expression-language/tests/ProcessContextExprTests.cpp
@@ -21,18 +21,18 @@
#include "core/ProcessContext.h"
#include "core/Resource.h"
#include "ProcessContextExpr.h"
-#include "Processor.h"
-#include "PropertyDefinition.h"
-#include "PropertyDefinitionBuilder.h"
-#include "RelationshipDefinition.h"
+#include "core/Processor.h"
+#include "core/PropertyDefinition.h"
+#include "core/PropertyDefinitionBuilder.h"
+#include "core/RelationshipDefinition.h"
#include "unit/TestBase.h"
#include "unit/Catch.h"
namespace org::apache::nifi::minifi {
-class DummyProcessor : public core::Processor {
+class DummyProcessor : public core::ProcessorImpl {
public:
- using core::Processor::Processor;
+ using core::ProcessorImpl::ProcessorImpl;
static constexpr const char* Description = "A processor that does nothing.";
static constexpr auto SimpleProperty = core::PropertyDefinitionBuilder<>::createProperty("Simple Property")
diff --git a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
index ded5f184d..87c100d27 100644
--- a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
+++ b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h
@@ -23,7 +23,7 @@
#include "core/controller/ControllerService.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "utils/Enum.h"
@@ -63,7 +63,7 @@ constexpr customize_t enum_name<CredentialsLocation>(CredentialsLocation value)
namespace org::apache::nifi::minifi::extensions::gcp {
-class GCPCredentialsControllerService : public core::controller::ControllerService {
+class GCPCredentialsControllerService : public core::controller::ControllerServiceImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Manages the credentials for Google Cloud Platform. This allows for multiple Google Cloud Platform related processors "
"to reference this single controller service so that Google Cloud Platform credentials can be managed and controlled in a central location.";
@@ -93,7 +93,7 @@ class GCPCredentialsControllerService : public core::controller::ControllerServi
EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
- using ControllerService::ControllerService;
+ using ControllerServiceImpl::ControllerServiceImpl;
void initialize() override;
diff --git a/extensions/gcp/processors/DeleteGCSObject.h b/extensions/gcp/processors/DeleteGCSObject.h
index 93e56ccb7..93e71c766 100644
--- a/extensions/gcp/processors/DeleteGCSObject.h
+++ b/extensions/gcp/processors/DeleteGCSObject.h
@@ -23,7 +23,7 @@
#include "../GCPAttributes.h"
#include "GCSProcessor.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/OutputAttributeDefinition.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
diff --git a/extensions/gcp/processors/FetchGCSObject.h b/extensions/gcp/processors/FetchGCSObject.h
index ab51ae5d2..cd030b237 100644
--- a/extensions/gcp/processors/FetchGCSObject.h
+++ b/extensions/gcp/processors/FetchGCSObject.h
@@ -23,11 +23,10 @@
#include "../GCPAttributes.h"
#include "GCSProcessor.h"
-#include "PropertyDefinition.h"
-#include "RelationshipDefinition.h"
+#include "core/PropertyDefinition.h"
+#include "core/RelationshipDefinition.h"
#include "google/cloud/storage/well_known_headers.h"
-#include "RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
namespace org::apache::nifi::minifi::extensions::gcp {
diff --git a/extensions/gcp/processors/GCSProcessor.h b/extensions/gcp/processors/GCSProcessor.h
index d161064ca..ff9163310 100644
--- a/extensions/gcp/processors/GCSProcessor.h
+++ b/extensions/gcp/processors/GCSProcessor.h
@@ -32,10 +32,10 @@
#include "google/cloud/storage/retry_policy.h"
namespace org::apache::nifi::minifi::extensions::gcp {
-class GCSProcessor : public core::Processor {
+class GCSProcessor : public core::ProcessorImpl {
public:
GCSProcessor(std::string_view name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(std::move(logger)) {
}
diff --git a/extensions/gcp/processors/ListGCSBucket.h b/extensions/gcp/processors/ListGCSBucket.h
index 229385aa6..87dece09b 100644
--- a/extensions/gcp/processors/ListGCSBucket.h
+++ b/extensions/gcp/processors/ListGCSBucket.h
@@ -23,7 +23,7 @@
#include "../GCPAttributes.h"
#include "GCSProcessor.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/OutputAttributeDefinition.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
diff --git a/extensions/gcp/processors/PutGCSObject.h b/extensions/gcp/processors/PutGCSObject.h
index dae546b94..bdfe30fc1 100644
--- a/extensions/gcp/processors/PutGCSObject.h
+++ b/extensions/gcp/processors/PutGCSObject.h
@@ -23,11 +23,10 @@
#include "../GCPAttributes.h"
#include "GCSProcessor.h"
-#include "PropertyDefinition.h"
-#include "PropertyType.h"
-#include "RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
-#include "RelationshipDefinition.h"
+#include "core/PropertyDefinition.h"
+#include "core/PropertyType.h"
+#include "core/RelationshipDefinition.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
#include "utils/Enum.h"
#include "google/cloud/storage/well_known_headers.h"
diff --git a/extensions/grafana-loki/PushGrafanaLoki.cpp b/extensions/grafana-loki/PushGrafanaLoki.cpp
index a3c14b58c..191aade6a 100644
--- a/extensions/grafana-loki/PushGrafanaLoki.cpp
+++ b/extensions/grafana-loki/PushGrafanaLoki.cpp
@@ -233,7 +233,7 @@ void PushGrafanaLoki::restore(const std::shared_ptr<core::FlowFile>& flow_file)
}
std::set<core::Connectable*> PushGrafanaLoki::getOutGoingConnections(const std::string &relationship) {
- auto result = core::Connectable::getOutGoingConnections(relationship);
+ auto result = core::ConnectableImpl::getOutGoingConnections(relationship);
if (relationship == Self.getName()) {
result.insert(this);
}
diff --git a/extensions/grafana-loki/PushGrafanaLoki.h b/extensions/grafana-loki/PushGrafanaLoki.h
index 445677d20..20148d0a2 100644
--- a/extensions/grafana-loki/PushGrafanaLoki.h
+++ b/extensions/grafana-loki/PushGrafanaLoki.h
@@ -32,10 +32,10 @@
namespace org::apache::nifi::minifi::extensions::grafana::loki {
-class PushGrafanaLoki : public core::Processor {
+class PushGrafanaLoki : public core::ProcessorImpl {
public:
- PushGrafanaLoki(const std::string& name, const utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger)
- : Processor(name, uuid),
+ PushGrafanaLoki(const std::string_view name, const utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger)
+ : ProcessorImpl(name, uuid),
logger_(logger),
log_batch_(logger_) {
}
diff --git a/extensions/grafana-loki/PushGrafanaLokiGrpc.h b/extensions/grafana-loki/PushGrafanaLokiGrpc.h
index 1817c0614..78bc5f897 100644
--- a/extensions/grafana-loki/PushGrafanaLokiGrpc.h
+++ b/extensions/grafana-loki/PushGrafanaLokiGrpc.h
@@ -18,19 +18,20 @@
#include "PushGrafanaLoki.h"
+#include "core/logging/LoggerFactory.h"
#include "core/StateManager.h"
-#include "grafana-loki-push.pb.h"
#include "grafana-loki-push.grpc.pb.h"
+#include "grafana-loki-push.pb.h"
#include "grpc/grpc.h"
namespace org::apache::nifi::minifi::extensions::grafana::loki {
-class PushGrafanaLokiGrpc : public PushGrafanaLoki {
+class PushGrafanaLokiGrpc final : public PushGrafanaLoki {
public:
EXTENSIONAPI static constexpr const char* Description = "A Grafana Loki push processor that uses the Grafana Loki Grpc port. The processor expects each flow file to contain a single log line to be "
"pushed to Grafana Loki, therefore it is usually used together with the TailFile processor.";
- explicit PushGrafanaLokiGrpc(const std::string& name, const utils::Identifier& uuid = {})
+ explicit PushGrafanaLokiGrpc(const std::string_view name, const utils::Identifier& uuid = {})
: PushGrafanaLoki(name, uuid, core::logging::LoggerFactory<PushGrafanaLokiGrpc>::getLogger(uuid)) {
}
~PushGrafanaLokiGrpc() override = default;
@@ -64,7 +65,7 @@ class PushGrafanaLokiGrpc : public PushGrafanaLoki {
void setUpGrpcChannel(const std::string& url, core::ProcessContext& context);
std::string stream_labels_;
- std::chrono::milliseconds connection_timeout_ms_;
+ std::chrono::milliseconds connection_timeout_ms_{};
std::optional<std::string> tenant_id_;
std::shared_ptr<::grpc::Channel> push_channel_;
std::unique_ptr<logproto::Pusher::Stub> push_stub_;
diff --git a/extensions/grafana-loki/tests/MockGrafanaLokiREST.h b/extensions/grafana-loki/tests/MockGrafanaLokiREST.h
index 0a92d3e07..e09ad21c2 100644
--- a/extensions/grafana-loki/tests/MockGrafanaLokiREST.h
+++ b/extensions/grafana-loki/tests/MockGrafanaLokiREST.h
@@ -24,7 +24,7 @@
#include <CivetServer.h>
#include "integration/CivetLibrary.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
diff --git a/extensions/kafka/ConsumeKafka.h b/extensions/kafka/ConsumeKafka.h
index 616c4eb95..79a99e0de 100644
--- a/extensions/kafka/ConsumeKafka.h
+++ b/extensions/kafka/ConsumeKafka.h
@@ -29,7 +29,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "io/StreamPipe.h"
#include "rdkafka.h"
#include "rdkafka_utils.h"
diff --git a/extensions/kafka/KafkaConnection.h b/extensions/kafka/KafkaConnection.h
index 186c50647..93f5bc08e 100644
--- a/extensions/kafka/KafkaConnection.h
+++ b/extensions/kafka/KafkaConnection.h
@@ -24,7 +24,7 @@
#include <string>
#include <unordered_map>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/logging/Logger.h"
#include "rdkafka.h"
#include "KafkaTopic.h"
diff --git a/extensions/kafka/KafkaProcessorBase.h b/extensions/kafka/KafkaProcessorBase.h
index 87f0fc78c..fa0c05a33 100644
--- a/extensions/kafka/KafkaProcessorBase.h
+++ b/extensions/kafka/KafkaProcessorBase.h
@@ -35,7 +35,7 @@ enum class SecurityProtocolOption { plaintext, ssl, sasl_plaintext, sasl_ssl };
enum class SASLMechanismOption { GSSAPI, PLAIN };
} // namespace kafka
-class KafkaProcessorBase : public core::Processor {
+class KafkaProcessorBase : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto SSLContextService =
core::PropertyDefinitionBuilder<>::createProperty("SSL Context Service")
@@ -90,7 +90,7 @@ class KafkaProcessorBase : public core::Processor {
KafkaProcessorBase(
const std::string_view name, const utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(std::move(logger)) {}
KafkaProcessorBase(const KafkaProcessorBase&) = delete;
diff --git a/extensions/kafka/PublishKafka.h b/extensions/kafka/PublishKafka.h
index 1fd5e3408..5ddf035b2 100644
--- a/extensions/kafka/PublishKafka.h
+++ b/extensions/kafka/PublishKafka.h
@@ -38,7 +38,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rdkafka.h"
#include "utils/ArrayUtils.h"
#include "utils/RegexUtils.h"
diff --git a/extensions/kafka/rdkafka_utils.h b/extensions/kafka/rdkafka_utils.h
index 36a20d20b..6d9214825 100644
--- a/extensions/kafka/rdkafka_utils.h
+++ b/extensions/kafka/rdkafka_utils.h
@@ -24,7 +24,7 @@
#include <utility>
#include <vector>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rdkafka.h"
#include "utils/net/Ssl.h"
diff --git a/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp b/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
index ac2ef0f61..e114457e4 100644
--- a/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
+++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.cpp
@@ -24,19 +24,19 @@ extern "C" {
}
#include "core/Resource.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "Exception.h"
#include "utils/gsl.h"
#include "utils/StringUtils.h"
namespace org::apache::nifi::minifi::controllers {
-KubernetesControllerService::KubernetesControllerService(const std::string& name, const utils::Identifier& uuid)
- : AttributeProviderService(name, uuid),
+KubernetesControllerService::KubernetesControllerService(const std::string_view name, const utils::Identifier& uuid)
+ : AttributeProviderServiceImpl(name, uuid),
logger_{core::logging::LoggerFactory<KubernetesControllerService>::getLogger(uuid)} {
}
-KubernetesControllerService::KubernetesControllerService(const std::string& name, const std::shared_ptr<Configure>& configuration)
+KubernetesControllerService::KubernetesControllerService(const std::string_view name, const std::shared_ptr<Configure>& configuration)
: KubernetesControllerService{name} {
setConfiguration(configuration);
initialize();
@@ -46,7 +46,7 @@ void KubernetesControllerService::initialize() {
std::lock_guard<std::mutex> lock(initialization_mutex_);
if (initialized_) { return; }
- ControllerService::initialize();
+ ControllerServiceImpl::initialize();
setSupportedProperties(Properties);
initialized_ = true;
}
diff --git a/extensions/kubernetes/controllerservice/KubernetesControllerService.h b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
index ffe1f5046..b75ba9848 100644
--- a/extensions/kubernetes/controllerservice/KubernetesControllerService.h
+++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
@@ -31,10 +31,10 @@
namespace org::apache::nifi::minifi::controllers {
-class KubernetesControllerService : public AttributeProviderService {
+class KubernetesControllerService : public AttributeProviderServiceImpl {
public:
- explicit KubernetesControllerService(const std::string& name, const utils::Identifier& uuid = {});
- KubernetesControllerService(const std::string& name, const std::shared_ptr<Configure>& configuration);
+ explicit KubernetesControllerService(const std::string_view name, const utils::Identifier& uuid = {});
+ KubernetesControllerService(const std::string_view name, const std::shared_ptr<Configure>& configuration);
EXTENSIONAPI static constexpr const char* Description = "Controller service that provides access to the Kubernetes API";
diff --git a/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h b/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h
index 37ebcf41b..64ea72723 100644
--- a/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h
+++ b/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h
@@ -20,17 +20,17 @@
#include <string>
#include "../controllerservice/KubernetesControllerService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
namespace org::apache::nifi::minifi::processors {
-class CollectKubernetesPodMetrics : public core::Processor {
+class CollectKubernetesPodMetrics : public core::ProcessorImpl {
public:
- explicit CollectKubernetesPodMetrics(const std::string& name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ explicit CollectKubernetesPodMetrics(const std::string_view name, const utils::Identifier& uuid = {})
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "A processor which collects pod metrics when MiNiFi is run inside Kubernetes.";
diff --git a/extensions/libarchive/ArchiveStreamProvider.cpp b/extensions/libarchive/ArchiveStreamProvider.cpp
index d9ebf3eee..d7bfae95c 100644
--- a/extensions/libarchive/ArchiveStreamProvider.cpp
+++ b/extensions/libarchive/ArchiveStreamProvider.cpp
@@ -23,9 +23,9 @@
namespace org::apache::nifi::minifi::io {
-class ArchiveStreamProviderImpl : public ArchiveStreamProvider {
+class ArchiveStreamProviderImpl : public core::CoreComponentImpl, public virtual ArchiveStreamProvider {
public:
- using ArchiveStreamProvider::ArchiveStreamProvider;
+ using CoreComponentImpl::CoreComponentImpl;
EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
@@ -48,6 +48,6 @@ class ArchiveStreamProviderImpl : public ArchiveStreamProvider {
}
};
-REGISTER_RESOURCE_AS(ArchiveStreamProviderImpl, InternalResource, ("ArchiveStreamProvider"));
+REGISTER_RESOURCE_IMPLEMENTATION(ArchiveStreamProviderImpl, "ArchiveStreamProvider", InternalResource);
} // namespace org::apache::nifi::minifi::io
diff --git a/extensions/libarchive/BinFiles.cpp b/extensions/libarchive/BinFiles.cpp
index b0687d46e..0d0e10984 100644
--- a/extensions/libarchive/BinFiles.cpp
+++ b/extensions/libarchive/BinFiles.cpp
@@ -318,7 +318,7 @@ void BinFiles::restore(const std::shared_ptr<core::FlowFile>& flowFile) {
}
std::set<core::Connectable*> BinFiles::getOutGoingConnections(const std::string &relationship) {
- auto result = core::Connectable::getOutGoingConnections(relationship);
+ auto result = core::ConnectableImpl::getOutGoingConnections(relationship);
if (relationship == Self.getName()) {
result.insert(this);
}
diff --git a/extensions/libarchive/BinFiles.h b/extensions/libarchive/BinFiles.h
index ad2638254..e90b708c0 100644
--- a/extensions/libarchive/BinFiles.h
+++ b/extensions/libarchive/BinFiles.h
@@ -32,7 +32,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/gsl.h"
#include "utils/Id.h"
#include "utils/Export.h"
@@ -177,12 +177,12 @@ class BinManager {
std::shared_ptr<core::logging::Logger> logger_{core::logging::LoggerFactory<BinManager>::getLogger()};
};
-class BinFiles : public core::Processor {
+class BinFiles : public core::ProcessorImpl {
protected:
static const core::Relationship Self;
public:
- using core::Processor::Processor;
+ using core::ProcessorImpl::ProcessorImpl;
~BinFiles() override = default;
EXTENSIONAPI static constexpr const char* Description = "Bins flow files into buckets based on the number of entries or size of entries";
diff --git a/extensions/libarchive/CompressContent.h b/extensions/libarchive/CompressContent.h
index 99f6d792b..ec136918c 100644
--- a/extensions/libarchive/CompressContent.h
+++ b/extensions/libarchive/CompressContent.h
@@ -26,7 +26,7 @@
#include <map>
#include <string>
-#include "PropertyType.h"
+#include "core/PropertyType.h"
#include "archive_entry.h"
#include "archive.h"
@@ -36,7 +36,7 @@
#include "core/Core.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "io/ZlibStream.h"
#include "utils/Enum.h"
#include "utils/gsl.h"
@@ -83,10 +83,10 @@ constexpr customize_t enum_name<ExtendedCompressionFormat>(ExtendedCompressionFo
namespace org::apache::nifi::minifi::processors {
-class CompressContent : public core::Processor {
+class CompressContent : public core::ProcessorImpl {
public:
explicit CompressContent(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~CompressContent() override = default;
diff --git a/extensions/libarchive/FocusArchiveEntry.h b/extensions/libarchive/FocusArchiveEntry.h
index 09d54e06f..551802a32 100644
--- a/extensions/libarchive/FocusArchiveEntry.h
+++ b/extensions/libarchive/FocusArchiveEntry.h
@@ -30,16 +30,16 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/file/FileManager.h"
#include "utils/Export.h"
namespace org::apache::nifi::minifi::processors {
-class FocusArchiveEntry : public core::Processor {
+class FocusArchiveEntry : public core::ProcessorImpl {
public:
explicit FocusArchiveEntry(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~FocusArchiveEntry() override = default;
diff --git a/extensions/libarchive/ManipulateArchive.h b/extensions/libarchive/ManipulateArchive.h
index ce6c0e5c3..712965b3d 100644
--- a/extensions/libarchive/ManipulateArchive.h
+++ b/extensions/libarchive/ManipulateArchive.h
@@ -36,10 +36,10 @@ namespace org::apache::nifi::minifi::processors {
using core::logging::Logger;
-class ManipulateArchive : public core::Processor {
+class ManipulateArchive : public core::ProcessorImpl {
public:
explicit ManipulateArchive(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~ManipulateArchive() override = default;
diff --git a/extensions/libarchive/MergeContent.cpp b/extensions/libarchive/MergeContent.cpp
index 45a7c13f9..591b7b1b1 100644
--- a/extensions/libarchive/MergeContent.cpp
+++ b/extensions/libarchive/MergeContent.cpp
@@ -213,7 +213,7 @@ bool MergeContent::processBin(core::ProcessSession &session, std::unique_ptr<Bin
});
}
- std::shared_ptr<core::FlowFile> merge_flow = std::static_pointer_cast<FlowFileRecord>(session.create());
+ std::shared_ptr<core::FlowFile> merge_flow = session.create();
auto removeMergeFlow = gsl::finally([&](){
if (!session.hasBeenTransferred(*merge_flow)) {
session.remove(merge_flow);
diff --git a/extensions/libarchive/MergeContent.h b/extensions/libarchive/MergeContent.h
index 4995732b8..cf88b7e1a 100644
--- a/extensions/libarchive/MergeContent.h
+++ b/extensions/libarchive/MergeContent.h
@@ -28,13 +28,14 @@
#include "archive_entry.h"
#include "archive.h"
#include "SmartArchivePtrs.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "serialization/FlowFileSerializer.h"
#include "utils/ArrayUtils.h"
#include "utils/gsl.h"
#include "utils/Export.h"
+#include "io/Stream.h"
namespace org::apache::nifi::minifi::processors {
@@ -122,7 +123,7 @@ class BinaryConcatenationMerge : public MergeBin {
class ArchiveMerge {
public:
- class ArchiveWriter : public io::OutputStream {
+ class ArchiveWriter : public io::StreamImpl, public io::OutputStream {
public:
ArchiveWriter(archive& arch, archive_entry& entry) : arch_(arch), entry_(entry) {}
size_t write(const uint8_t* data, const size_t size) override {
diff --git a/extensions/libarchive/ReadArchiveStream.h b/extensions/libarchive/ReadArchiveStream.h
index 0d1b87abd..910f808e4 100644
--- a/extensions/libarchive/ReadArchiveStream.h
+++ b/extensions/libarchive/ReadArchiveStream.h
@@ -23,7 +23,8 @@
#include "io/OutputStream.h"
#include "io/ArchiveStream.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "io/InputStream.h"
+#include "core/logging/LoggerFactory.h"
#include "archive_entry.h"
#include "archive.h"
@@ -31,7 +32,7 @@
namespace org::apache::nifi::minifi::io {
-class ReadArchiveStreamImpl final : public ReadArchiveStream {
+class ReadArchiveStreamImpl final : public InputStreamImpl, public ReadArchiveStream {
class BufferedReader {
public:
explicit BufferedReader(std::shared_ptr<InputStream> input) : input_(std::move(input)) {}
diff --git a/extensions/libarchive/UnfocusArchiveEntry.h b/extensions/libarchive/UnfocusArchiveEntry.h
index bdaa5ec0c..db6cd738a 100644
--- a/extensions/libarchive/UnfocusArchiveEntry.h
+++ b/extensions/libarchive/UnfocusArchiveEntry.h
@@ -32,16 +32,16 @@
#include "core/ProcessSession.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::processors {
using core::logging::Logger;
-class UnfocusArchiveEntry : public core::Processor {
+class UnfocusArchiveEntry : public core::ProcessorImpl {
public:
explicit UnfocusArchiveEntry(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~UnfocusArchiveEntry() override = default;
diff --git a/extensions/libarchive/WriteArchiveStream.h b/extensions/libarchive/WriteArchiveStream.h
index 7d86c6db5..4369543ad 100644
--- a/extensions/libarchive/WriteArchiveStream.h
+++ b/extensions/libarchive/WriteArchiveStream.h
@@ -27,7 +27,9 @@
#include "archive.h"
#include "SmartArchivePtrs.h"
#include "utils/Enum.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/Core.h"
+#include "core/logging/LoggerFactory.h"
+#include "io/Stream.h"
namespace org::apache::nifi::minifi::io {
@@ -61,7 +63,7 @@ constexpr customize_t enum_name<CompressionFormat>(CompressionFormat value) noex
namespace org::apache::nifi::minifi::io {
-class WriteArchiveStreamImpl final: public WriteArchiveStream {
+class WriteArchiveStreamImpl final: public StreamImpl, public WriteArchiveStream {
[[nodiscard]] processors::archive_write_unique_ptr createWriteArchive() const;
public:
diff --git a/extensions/libarchive/tests/CompressContentTests.cpp b/extensions/libarchive/tests/CompressContentTests.cpp
index 31d266b2b..aa9459b3d 100644
--- a/extensions/libarchive/tests/CompressContentTests.cpp
+++ b/extensions/libarchive/tests/CompressContentTests.cpp
@@ -123,21 +123,21 @@ class CompressDecompressionTestController : public TestController {
REQUIRE(processoruuid);
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- content_repo->initialize(std::make_shared<minifi::Configure>());
+ content_repo->initialize(std::make_shared<minifi::ConfigureImpl>());
// connection from compress processor to success
- output = std::make_shared<minifi::Connection>(repo, content_repo, "Output");
+ output = std::make_shared<minifi::ConnectionImpl>(repo, content_repo, "Output");
output->addRelationship(core::Relationship("success", "compress successful output"));
output->setSource(processor.get());
output->setSourceUUID(processoruuid);
processor->addConnection(output.get());
// connection to compress processor
- input = std::make_shared<minifi::Connection>(repo, content_repo, "Input");
+ input = std::make_shared<minifi::ConnectionImpl>(repo, content_repo, "Input");
input->setDestination(processor.get());
input->setDestinationUUID(processoruuid);
processor->addConnection(input.get());
// connection from compress processor to failure
- failure_output = std::make_shared<minifi::Connection>(repo, content_repo, "FailureOutput");
+ failure_output = std::make_shared<minifi::ConnectionImpl>(repo, content_repo, "FailureOutput");
failure_output->addRelationship(core::Relationship("failure", "compress failure output"));
failure_output->setSource(processor.get());
failure_output->setSourceUUID(processoruuid);
@@ -146,8 +146,8 @@ class CompressDecompressionTestController : public TestController {
processor->incrementActiveTasks();
processor->setScheduledState(core::ScheduledState::RUNNING);
- context = std::make_shared<core::ProcessContext>(std::make_shared<core::ProcessorNode>(processor.get()), nullptr, repo, repo, content_repo);
- helper_session = std::make_shared<core::ProcessSession>(context);
+ context = std::make_shared<core::ProcessContextImpl>(std::make_shared<core::ProcessorNodeImpl>(processor.get()), nullptr, repo, repo, content_repo);
+ helper_session = std::make_shared<core::ProcessSessionImpl>(context);
}
[[nodiscard]] std::shared_ptr<core::FlowFile> importFlowFile(const std::filesystem::path& content_path) const {
@@ -168,9 +168,9 @@ class CompressDecompressionTestController : public TestController {
}
void trigger() const {
- auto factory = core::ProcessSessionFactory(context);
+ auto factory = core::ProcessSessionFactoryImpl(context);
processor->onSchedule(*context, factory);
- auto session = core::ProcessSession(context);
+ auto session = core::ProcessSessionImpl(context);
processor->onTrigger(*context, session);
session.commit();
}
@@ -645,12 +645,12 @@ TEST_CASE_METHOD(CompressTestController, "Batch CompressFileGZip", "[compressFil
}
REQUIRE(processor->getName() == "compresscontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
processor->onSchedule(*context, *factory);
// Trigger once to process batchSize
{
- auto session = std::make_shared<core::ProcessSession>(context);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context);
processor->onTrigger(*context, *session);
session->commit();
}
@@ -665,7 +665,7 @@ TEST_CASE_METHOD(CompressTestController, "Batch CompressFileGZip", "[compressFil
// Trigger a second time to process the remaining files
{
- auto session = std::make_unique<core::ProcessSession>(context);
+ auto session = std::make_unique<core::ProcessSessionImpl>(context);
processor->onTrigger(*context, *session);
session->commit();
}
diff --git a/extensions/libarchive/tests/MergeFileTests.cpp b/extensions/libarchive/tests/MergeFileTests.cpp
index d5fd73d7e..f49139806 100644
--- a/extensions/libarchive/tests/MergeFileTests.cpp
+++ b/extensions/libarchive/tests/MergeFileTests.cpp
@@ -25,7 +25,7 @@
#include <sstream>
#include <string>
-#include "Relationship.h"
+#include "core/Relationship.h"
#include "core/Core.h"
#include "core/Processor.h"
#include "core/ProcessContext.h"
@@ -162,7 +162,7 @@ class MergeTestController : public TestController {
std::shared_ptr<TestRepository> repo = std::make_shared<TestRepository>();
auto content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- content_repo->initialize(std::make_shared<minifi::Configure>());
+ content_repo->initialize(std::make_shared<minifi::ConfigureImpl>());
merge_content_processor_ = std::make_unique<minifi::processors::MergeContent>("mergecontent");
merge_content_processor_->initialize();
@@ -173,7 +173,7 @@ class MergeTestController : public TestController {
REQUIRE(logAttributeuuid);
// output from merge processor to log attribute
- output_ = std::make_unique<minifi::Connection>(repo, content_repo, "logattributeconnection");
+ output_ = std::make_unique<minifi::ConnectionImpl>(repo, content_repo, "logattributeconnection");
output_->addRelationship(minifi::processors::MergeContent::Merge);
output_->setSource(merge_content_processor_.get());
output_->setDestination(log_attribute_processor_.get());
@@ -181,7 +181,7 @@ class MergeTestController : public TestController {
output_->setDestinationUUID(logAttributeuuid);
merge_content_processor_->addConnection(output_.get());
// input to merge processor
- input_ = std::make_unique<minifi::Connection>(repo, content_repo, "mergeinput");
+ input_ = std::make_unique<minifi::ConnectionImpl>(repo, content_repo, "mergeinput");
input_->setDestination(merge_content_processor_.get());
input_->setDestinationUUID(processoruuid);
merge_content_processor_->addConnection(input_.get());
@@ -193,7 +193,7 @@ class MergeTestController : public TestController {
log_attribute_processor_->incrementActiveTasks();
log_attribute_processor_->setScheduledState(core::ScheduledState::RUNNING);
- context_ = std::make_shared<core::ProcessContext>(std::make_shared<core::ProcessorNode>(merge_content_processor_.get()), nullptr, repo, repo, content_repo);
+ context_ = std::make_shared<core::ProcessContextImpl>(std::make_shared<core::ProcessorNodeImpl>(merge_content_processor_.get()), nullptr, repo, repo, content_repo);
for (size_t i = 0; i < 6; ++i) {
flowFileContents_[i] = utils::string::repeat(std::to_string(i), 32);
@@ -227,7 +227,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragment", "[mergefiletest1]")
context_->setProperty(minifi::processors::MergeContent::MergeStrategy, minifi::processors::merge_content_options::MERGE_STRATEGY_DEFRAGMENT);
context_->setProperty(minifi::processors::MergeContent::DelimiterStrategy, minifi::processors::merge_content_options::DELIMITER_STRATEGY_TEXT);
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, first three merged to one, second three merged to one
for (const int i : {0, 2, 5, 4, 1, 3}) {
const auto flow = sessionGenFlowFile.create();
@@ -246,10 +246,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragment", "[mergefiletest1]")
input_->put(flow);
}
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -288,7 +288,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragmentDelimiter", "[mergefil
context_->setProperty(minifi::processors::MergeContent::Footer, FOOTER_FILE);
context_->setProperty(minifi::processors::MergeContent::Demarcator, DEMARCATOR_FILE);
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, first three merged to one, second three merged to one
for (const int i : {0, 2, 5, 4, 1, 3}) {
const auto flow = sessionGenFlowFile.create();
@@ -308,10 +308,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragmentDelimiter", "[mergefil
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -345,7 +345,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragmentDropFlow", "[mergefile
context_->setProperty(minifi::processors::MergeContent::DelimiterStrategy, minifi::processors::merge_content_options::DELIMITER_STRATEGY_TEXT);
context_->setProperty(minifi::processors::MergeContent::MaxBinAge, "1 sec");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 5 flowfiles, first threes merged to one, the other two merged to one
for (const int i : {0, 2, 5, 1, 3}) {
const auto flow = sessionGenFlowFile.create();
@@ -365,16 +365,16 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileDefragmentDropFlow", "[mergefile
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 5; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
{
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -408,7 +408,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileBinPack", "[mergefiletest4]") {
context_->setProperty(minifi::processors::MergeContent::MinSize, "96");
context_->setProperty(minifi::processors::MergeContent::CorrelationAttributeName, "tag");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, first threes merged to one, second thress merged to one
for (const int i : {0, 1, 2, 3, 4, 5}) {
const auto flow = sessionGenFlowFile.create();
@@ -419,10 +419,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileBinPack", "[mergefiletest4]") {
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -452,7 +452,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileTar", "[mergefiletest4]") {
context_->setProperty(minifi::processors::MergeContent::MinSize, "96");
context_->setProperty(minifi::processors::MergeContent::CorrelationAttributeName, "tag");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, first threes merged to one, second thress merged to one
for (const int i : {0, 1, 2, 3, 4, 5}) {
const auto flow = sessionGenFlowFile.create();
@@ -463,10 +463,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileTar", "[mergefiletest4]") {
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -503,7 +503,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileZip", "[mergefiletest5]") {
context_->setProperty(minifi::processors::MergeContent::MinSize, "96");
context_->setProperty(minifi::processors::MergeContent::CorrelationAttributeName, "tag");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, first threes merged to one, second thress merged to one
for (const int i : {0, 1, 2, 3, 4, 5}) {
const auto flow = sessionGenFlowFile.create();
@@ -514,10 +514,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileZip", "[mergefiletest5]") {
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -559,7 +559,7 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileOnAttribute", "[mergefiletest5]"
context_->setProperty(minifi::processors::MergeContent::MinEntries, "3");
context_->setProperty(minifi::processors::MergeContent::CorrelationAttributeName, "tag");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 6 flowfiles, even files are merged to one, odd files are merged to an other
for (const int i : {0, 1, 2, 3, 4, 5}) {
const auto flow = sessionGenFlowFile.create();
@@ -573,10 +573,10 @@ TEST_CASE_METHOD(MergeTestController, "MergeFileOnAttribute", "[mergefiletest5]"
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 6; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -601,7 +601,7 @@ TEST_CASE_METHOD(MergeTestController, "Test Merge File Attributes Keeping Only C
context_->setProperty(minifi::processors::MergeContent::MergeStrategy, minifi::processors::merge_content_options::MERGE_STRATEGY_DEFRAGMENT);
context_->setProperty(minifi::processors::MergeContent::DelimiterStrategy, minifi::processors::merge_content_options::DELIMITER_STRATEGY_TEXT);
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 3 flowfiles merging all into one
for (const int i : {1, 2, 0}) {
@@ -626,10 +626,10 @@ TEST_CASE_METHOD(MergeTestController, "Test Merge File Attributes Keeping Only C
input_->put(flow);
}
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 3; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -651,7 +651,7 @@ TEST_CASE_METHOD(MergeTestController, "Test Merge File Attributes Keeping All Un
context_->setProperty(minifi::processors::MergeContent::DelimiterStrategy, minifi::processors::merge_content_options::DELIMITER_STRATEGY_TEXT);
context_->setProperty(minifi::processors::MergeContent::AttributeStrategy, minifi::processors::merge_content_options::ATTRIBUTE_STRATEGY_KEEP_ALL_UNIQUE);
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// Generate 3 flowfiles merging all into one
for (const int i : {1, 2, 0}) {
const auto flow = sessionGenFlowFile.create();
@@ -675,10 +675,10 @@ TEST_CASE_METHOD(MergeTestController, "Test Merge File Attributes Keeping All Un
input_->put(flow);
}
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
for (int i = 0; i < 3; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -709,7 +709,7 @@ TEST_CASE("FlowFile serialization", "[testFlowFileSerialization]") {
std::string footer = "}END";
std::string demarcator = "_";
- core::ProcessSession session(context);
+ core::ProcessSessionImpl session(context);
minifi::PayloadSerializer payloadSerializer([&] (const std::shared_ptr<core::FlowFile>& ff, const minifi::io::InputStreamCallback& cb) {
return session.read(ff, cb);
@@ -768,10 +768,10 @@ TEST_CASE("FlowFile serialization", "[testFlowFileSerialization]") {
const auto expected = utils::span_to<std::string>(utils::as_span<const char>(result->getBuffer()));
- auto factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
merge_content_processor->onSchedule(*context, *factory);
for (int i = 0; i < 3; i++) {
- auto mergeSession = std::make_shared<core::ProcessSession>(context);
+ auto mergeSession = std::make_shared<core::ProcessSessionImpl>(context);
merge_content_processor->onTrigger(*context, *mergeSession);
mergeSession->commit();
}
@@ -800,7 +800,7 @@ TEST_CASE_METHOD(MergeTestController, "Batch Size", "[testMergeFileBatchSize]")
context_->setProperty(minifi::processors::MergeContent::DelimiterStrategy, minifi::processors::merge_content_options::DELIMITER_STRATEGY_TEXT);
context_->setProperty(minifi::processors::BinFiles::BatchSize, "3");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// enqueue 5 (five) flowFiles
for (const int i : {0, 1, 2, 3, 4}) {
const auto flow = sessionGenFlowFile.create();
@@ -810,11 +810,11 @@ TEST_CASE_METHOD(MergeTestController, "Batch Size", "[testMergeFileBatchSize]")
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
// two trigger is enough to process all five flowFiles
for (int i = 0; i < 2; i++) {
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
@@ -859,7 +859,7 @@ TEST_CASE_METHOD(MergeTestController, "Maximum Group Size is respected", "[testM
context_->setProperty(minifi::processors::BinFiles::MinEntries, "3");
context_->setProperty(minifi::processors::BinFiles::MaxEntries, "3");
- core::ProcessSession sessionGenFlowFile(context_);
+ core::ProcessSessionImpl sessionGenFlowFile(context_);
// enqueue 6 (six) flowFiles
for (const int i : {0, 1, 2, 3, 4, 5}) {
const auto flow = sessionGenFlowFile.create();
@@ -869,11 +869,11 @@ TEST_CASE_METHOD(MergeTestController, "Maximum Group Size is respected", "[testM
}
REQUIRE(merge_content_processor_->getName() == "mergecontent");
- auto factory = std::make_shared<core::ProcessSessionFactory>(context_);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context_);
merge_content_processor_->onSchedule(*context_, *factory);
// a single trigger is enough to process all five flowFiles
{
- auto session = std::make_shared<core::ProcessSession>(context_);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context_);
merge_content_processor_->onTrigger(*context_, *session);
session->commit();
}
diff --git a/extensions/lua/LuaScriptExecutor.cpp b/extensions/lua/LuaScriptExecutor.cpp
index 665d98d98..775778d84 100644
--- a/extensions/lua/LuaScriptExecutor.cpp
+++ b/extensions/lua/LuaScriptExecutor.cpp
@@ -20,7 +20,7 @@
#include "LuaScriptExecutor.h"
#include "range/v3/range/conversion.hpp"
-#include "Resource.h"
+#include "core/Resource.h"
namespace org::apache::nifi::minifi::extensions::lua {
diff --git a/extensions/lua/LuaScriptProcessContext.h b/extensions/lua/LuaScriptProcessContext.h
index 98fa3c949..49dd86747 100644
--- a/extensions/lua/LuaScriptProcessContext.h
+++ b/extensions/lua/LuaScriptProcessContext.h
@@ -23,6 +23,7 @@
#include "core/ProcessSession.h"
#include "LuaScriptStateManager.h"
+#include "minifi-cpp/core/ProcessContext.h"
namespace org::apache::nifi::minifi::extensions::lua {
diff --git a/extensions/mqtt/processors/AbstractMQTTProcessor.h b/extensions/mqtt/processors/AbstractMQTTProcessor.h
index 4b957a23b..7556826c3 100644
--- a/extensions/mqtt/processors/AbstractMQTTProcessor.h
+++ b/extensions/mqtt/processors/AbstractMQTTProcessor.h
@@ -23,12 +23,12 @@
#include <vector>
#include <shared_mutex>
-#include "PropertyDefinition.h"
+#include "core/PropertyDefinition.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "MQTTAsync.h"
@@ -84,10 +84,10 @@ namespace org::apache::nifi::minifi::processors {
static constexpr const char* const MQTT_SECURITY_PROTOCOL_SSL = "ssl";
-class AbstractMQTTProcessor : public core::Processor {
+class AbstractMQTTProcessor : public core::ProcessorImpl {
public:
explicit AbstractMQTTProcessor(std::string_view name, const utils::Identifier& uuid = {}, std::shared_ptr<core::ProcessorMetrics> metrics = {})
- : core::Processor(name, uuid, std::move(metrics)) {
+ : core::ProcessorImpl(name, uuid, std::move(metrics)) {
}
~AbstractMQTTProcessor() override {
diff --git a/extensions/mqtt/processors/ConsumeMQTT.h b/extensions/mqtt/processors/ConsumeMQTT.h
index 857555726..e7cb23c5c 100644
--- a/extensions/mqtt/processors/ConsumeMQTT.h
+++ b/extensions/mqtt/processors/ConsumeMQTT.h
@@ -29,7 +29,7 @@
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "concurrentqueue.h"
#include "AbstractMQTTProcessor.h"
#include "utils/ArrayUtils.h"
diff --git a/extensions/mqtt/processors/PublishMQTT.cpp b/extensions/mqtt/processors/PublishMQTT.cpp
index 22ce8a8da..3c800fee9 100644
--- a/extensions/mqtt/processors/PublishMQTT.cpp
+++ b/extensions/mqtt/processors/PublishMQTT.cpp
@@ -295,12 +295,12 @@ uint16_t PublishMQTT::InFlightMessageCounter::getCounter() const {
}
PublishMQTT::PublishMQTTMetrics::PublishMQTTMetrics(const core::Processor& source_processor, const InFlightMessageCounter& in_flight_message_counter)
- : core::ProcessorMetrics(source_processor),
+ : core::ProcessorMetricsImpl(source_processor),
in_flight_message_counter_(&in_flight_message_counter) {
}
std::vector<state::response::SerializedResponseNode> PublishMQTT::PublishMQTTMetrics::serialize() {
- auto metrics_vector = core::ProcessorMetrics::serialize();
+ auto metrics_vector = core::ProcessorMetricsImpl::serialize();
gsl_Expects(!metrics_vector.empty());
auto& metrics = metrics_vector[0];
@@ -311,7 +311,7 @@ std::vector<state::response::SerializedResponseNode> PublishMQTT::PublishMQTTMet
}
std::vector<state::PublishedMetric> PublishMQTT::PublishMQTTMetrics::calculateMetrics() {
- auto metrics = core::ProcessorMetrics::calculateMetrics();
+ auto metrics = core::ProcessorMetricsImpl::calculateMetrics();
metrics.push_back({"in_flight_message_count", static_cast<double>(in_flight_message_counter_->getCounter()), getCommonLabels()});
return metrics;
}
diff --git a/extensions/mqtt/processors/PublishMQTT.h b/extensions/mqtt/processors/PublishMQTT.h
index 8e8d09bc1..2c2dfef11 100644
--- a/extensions/mqtt/processors/PublishMQTT.h
+++ b/extensions/mqtt/processors/PublishMQTT.h
@@ -23,25 +23,25 @@
#include <utility>
#include <vector>
-#include "FlowFileRecord.h"
-#include "RelationshipDefinition.h"
+#include "core/RelationshipDefinition.h"
#include "core/Processor.h"
-#include "RelationshipDefinition.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/Core.h"
#include "core/Property.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "AbstractMQTTProcessor.h"
#include "utils/ArrayUtils.h"
#include "utils/gsl.h"
+#include "core/ProcessorMetrics.h"
namespace org::apache::nifi::minifi::processors {
class PublishMQTT : public processors::AbstractMQTTProcessor {
public:
explicit PublishMQTT(std::string_view name, const utils::Identifier& uuid = {})
- : processors::AbstractMQTTProcessor(name, uuid, std::make_shared<PublishMQTTMetrics>(*this, in_flight_message_counter_)) {
+ : processors::AbstractMQTTProcessor(name, uuid) {
+ metrics_ = gsl::make_not_null(std::make_shared<PublishMQTTMetrics>(*this, in_flight_message_counter_));
}
EXTENSIONAPI static constexpr const char* Description = "PublishMQTT serializes FlowFile content as an MQTT payload, sending the message to the configured topic and broker.";
@@ -108,7 +108,7 @@ class PublishMQTT : public processors::AbstractMQTTProcessor {
uint16_t limit_{MQTT_MAX_RECEIVE_MAXIMUM};
};
- class PublishMQTTMetrics : public core::ProcessorMetrics {
+ class PublishMQTTMetrics : public core::ProcessorMetricsImpl {
public:
PublishMQTTMetrics(const core::Processor& source_processor, const InFlightMessageCounter& in_flight_message_counter);
std::vector<state::response::SerializedResponseNode> serialize() override;
diff --git a/extensions/opc/include/fetchopc.h b/extensions/opc/include/fetchopc.h
index 0edfcc0d7..92b903264 100644
--- a/extensions/opc/include/fetchopc.h
+++ b/extensions/opc/include/fetchopc.h
@@ -32,7 +32,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "controllers/SSLContextService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
#include "utils/Id.h"
#include "utils/gsl.h"
diff --git a/extensions/opc/include/opc.h b/extensions/opc/include/opc.h
index 20c78cbc2..04cda4f85 100644
--- a/extensions/opc/include/opc.h
+++ b/extensions/opc/include/opc.h
@@ -28,7 +28,7 @@
#include <utility>
#include "open62541/client.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "Exception.h"
namespace org::apache::nifi::minifi::opc {
diff --git a/extensions/opc/include/opcbase.h b/extensions/opc/include/opcbase.h
index 2fc5ff90d..c60cbd2b8 100644
--- a/extensions/opc/include/opcbase.h
+++ b/extensions/opc/include/opcbase.h
@@ -25,14 +25,14 @@
#include "opc.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
-#include "PropertyDefinition.h"
+#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/Core.h"
#include "core/Property.h"
namespace org::apache::nifi::minifi::processors {
-class BaseOPCProcessor : public core::Processor {
+class BaseOPCProcessor : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto OPCServerEndPoint = core::PropertyDefinitionBuilder<>::createProperty("OPC server endpoint")
.withDescription("Specifies the address, port and relative path of an OPC endpoint")
@@ -70,7 +70,7 @@ class BaseOPCProcessor : public core::Processor {
explicit BaseOPCProcessor(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& factory) override;
diff --git a/extensions/opc/include/putopc.h b/extensions/opc/include/putopc.h
index 849ad6e75..7e3088d8e 100644
--- a/extensions/opc/include/putopc.h
+++ b/extensions/opc/include/putopc.h
@@ -31,7 +31,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "controllers/SSLContextService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
#include "utils/Id.h"
diff --git a/extensions/opc/src/fetchopc.cpp b/extensions/opc/src/fetchopc.cpp
index c6adc7c71..878a909e5 100644
--- a/extensions/opc/src/fetchopc.cpp
+++ b/extensions/opc/src/fetchopc.cpp
@@ -26,6 +26,7 @@
#include "core/Resource.h"
#include "utils/StringUtils.h"
#include "utils/Enum.h"
+#include "core/ProcessContext.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/opc/src/opc.cpp b/extensions/opc/src/opc.cpp
index 8d7af7c96..ffc466e82 100644
--- a/extensions/opc/src/opc.cpp
+++ b/extensions/opc/src/opc.cpp
@@ -25,7 +25,7 @@
#include <array>
#include "utils/StringUtils.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "Exception.h"
#include "utils/gsl.h"
@@ -565,7 +565,7 @@ std::string OPCDateTime2String(UA_DateTime raw_date) {
void logFunc(void *context, UA_LogLevel level, UA_LogCategory /*category*/, const char *msg, va_list args) {
std::array<char, 1024> buffer{};
(void)vsnprintf(buffer.data(), buffer.size(), msg, args);
- auto loggerPtr = reinterpret_cast<core::logging::BaseLogger*>(context);
+ auto loggerPtr = reinterpret_cast<core::logging::Logger*>(context);
loggerPtr->log_string(MapOPCLogLevel(level), buffer.data());
}
diff --git a/extensions/opc/src/putopc.cpp b/extensions/opc/src/putopc.cpp
index 76d1b3e06..1ca976a04 100644
--- a/extensions/opc/src/putopc.cpp
+++ b/extensions/opc/src/putopc.cpp
@@ -23,6 +23,7 @@
#include "core/ProcessSession.h"
#include "core/Resource.h"
#include "utils/StringUtils.h"
+#include "core/ProcessContext.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/opencv/CaptureRTSPFrame.h b/extensions/opencv/CaptureRTSPFrame.h
index 5c8d068d3..244956523 100644
--- a/extensions/opencv/CaptureRTSPFrame.h
+++ b/extensions/opencv/CaptureRTSPFrame.h
@@ -20,13 +20,12 @@
#include <atomic>
#include <iomanip>
#include <ctime>
-#include <utility>
#include <vector>
#include <memory>
#include <string>
#include <opencv2/opencv.hpp>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/PropertyDefinitionBuilder.h"
#include "io/StreamPipe.h"
@@ -35,10 +34,10 @@
namespace org::apache::nifi::minifi::processors {
-class CaptureRTSPFrame : public core::Processor {
+class CaptureRTSPFrame final : public core::ProcessorImpl {
public:
- explicit CaptureRTSPFrame(std::string name, const utils::Identifier &uuid = {})
- : Processor(std::move(name), uuid) {
+ explicit CaptureRTSPFrame(const std::string_view name, const utils::Identifier &uuid = {})
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Captures a frame from the RTSP stream at specified intervals.";
diff --git a/extensions/opencv/MotionDetector.h b/extensions/opencv/MotionDetector.h
index 55a9c2c30..e24eec523 100644
--- a/extensions/opencv/MotionDetector.h
+++ b/extensions/opencv/MotionDetector.h
@@ -22,7 +22,7 @@
#include <string>
#include <utility>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
@@ -33,10 +33,10 @@
namespace org::apache::nifi::minifi::processors {
-class MotionDetector : public core::Processor {
+class MotionDetector final : public core::ProcessorImpl {
public:
- explicit MotionDetector(std::string name, const utils::Identifier &uuid = {})
- : Processor(std::move(name), uuid) {
+ explicit MotionDetector(const std::string_view name, const utils::Identifier &uuid = {})
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Detect motion from captured images.";
diff --git a/extensions/pdh/PerformanceDataMonitor.h b/extensions/pdh/PerformanceDataMonitor.h
index 867643c44..024d0333a 100644
--- a/extensions/pdh/PerformanceDataMonitor.h
+++ b/extensions/pdh/PerformanceDataMonitor.h
@@ -24,7 +24,7 @@
#include <utility>
#include <vector>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
@@ -42,15 +42,15 @@ namespace nifi {
namespace minifi {
namespace processors {
-class PerformanceDataMonitor : public core::Processor {
+class PerformanceDataMonitor final : public core::ProcessorImpl {
public:
static constexpr const char* JSON_FORMAT_STR = "JSON";
static constexpr const char* OPEN_TELEMETRY_FORMAT_STR = "OpenTelemetry";
static constexpr const char* PRETTY_FORMAT_STR = "Pretty";
static constexpr const char* COMPACT_FORMAT_STR = "Compact";
- explicit PerformanceDataMonitor(const std::string& name, utils::Identifier uuid = utils::Identifier())
- : Processor(name, uuid), output_format_(OutputFormat::JSON), pretty_output_(false),
+ explicit PerformanceDataMonitor(const std::string_view name, utils::Identifier uuid = utils::Identifier())
+ : ProcessorImpl(name, uuid), output_format_(OutputFormat::JSON), pretty_output_(false),
decimal_places_(std::nullopt), logger_(core::logging::LoggerFactory<PerformanceDataMonitor>::getLogger()),
pdh_query_(nullptr), resource_consumption_counters_() {}
diff --git a/extensions/procfs/ProcFs.h b/extensions/procfs/ProcFs.h
index 6816f6b1a..c989ad77b 100644
--- a/extensions/procfs/ProcFs.h
+++ b/extensions/procfs/ProcFs.h
@@ -33,7 +33,7 @@
#include "NetDev.h"
#include "DiskStat.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/logging/Logger.h"
namespace org::apache::nifi::minifi::extensions::procfs {
diff --git a/extensions/procfs/processors/ProcFsMonitor.h b/extensions/procfs/processors/ProcFsMonitor.h
index 0f25ea76d..ae12031df 100644
--- a/extensions/procfs/processors/ProcFsMonitor.h
+++ b/extensions/procfs/processors/ProcFsMonitor.h
@@ -29,7 +29,7 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/logging/Logger.h"
#include "utils/Enum.h"
@@ -53,10 +53,10 @@ enum class ResultRelativeness {
Absolute
};
-class ProcFsMonitor : public core::Processor {
+class ProcFsMonitor final : public core::ProcessorImpl {
public:
- explicit ProcFsMonitor(std::string name, utils::Identifier uuid = utils::Identifier())
- : Processor(std::move(name), uuid) {
+ explicit ProcFsMonitor(const std::string_view name, utils::Identifier uuid = utils::Identifier())
+ : ProcessorImpl(name, uuid) {
}
~ProcFsMonitor() override = default;
diff --git a/extensions/procfs/tests/MemInfoTests.cpp b/extensions/procfs/tests/MemInfoTests.cpp
index ca5ee64c3..9a8c7164b 100644
--- a/extensions/procfs/tests/MemInfoTests.cpp
+++ b/extensions/procfs/tests/MemInfoTests.cpp
@@ -17,7 +17,7 @@
#include "unit/Catch.h"
#include "ProcFs.h"
-#include "Literals.h"
+#include "utils/Literals.h"
#include "MockProcFs.h"
namespace org::apache::nifi::minifi::extensions::procfs::tests {
diff --git a/extensions/prometheus/PrometheusExposerWrapper.h b/extensions/prometheus/PrometheusExposerWrapper.h
index b77bea3a0..7d5d157a7 100644
--- a/extensions/prometheus/PrometheusExposerWrapper.h
+++ b/extensions/prometheus/PrometheusExposerWrapper.h
@@ -23,7 +23,7 @@
#include "MetricsExposer.h"
#include "prometheus/exposer.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "controllers/SSLContextService.h"
namespace org::apache::nifi::minifi::extensions::prometheus {
diff --git a/extensions/prometheus/PrometheusMetricsPublisher.cpp b/extensions/prometheus/PrometheusMetricsPublisher.cpp
index f4a010f08..3d3ff1f37 100644
--- a/extensions/prometheus/PrometheusMetricsPublisher.cpp
+++ b/extensions/prometheus/PrometheusMetricsPublisher.cpp
@@ -27,11 +27,11 @@
namespace org::apache::nifi::minifi::extensions::prometheus {
PrometheusMetricsPublisher::PrometheusMetricsPublisher(const std::string &name, const utils::Identifier &uuid, std::unique_ptr<MetricsExposer> exposer)
- : state::MetricsPublisher(name, uuid),
+ : state::MetricsPublisherImpl(name, uuid),
exposer_(std::move(exposer)) {}
void PrometheusMetricsPublisher::initialize(const std::shared_ptr<Configure>& configuration, const std::shared_ptr<state::response::ResponseNodeLoader>& response_node_loader) {
- state::MetricsPublisher::initialize(configuration, response_node_loader);
+ state::MetricsPublisherImpl::initialize(configuration, response_node_loader);
if (!exposer_) {
exposer_ = std::make_unique<PrometheusExposerWrapper>(readExposerConfig());
}
diff --git a/extensions/prometheus/PrometheusMetricsPublisher.h b/extensions/prometheus/PrometheusMetricsPublisher.h
index 64a4fb410..cd1f68443 100644
--- a/extensions/prometheus/PrometheusMetricsPublisher.h
+++ b/extensions/prometheus/PrometheusMetricsPublisher.h
@@ -25,13 +25,13 @@
#include "PublishedMetricGaugeCollection.h"
#include "core/Core.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Id.h"
#include "PrometheusExposerWrapper.h"
namespace org::apache::nifi::minifi::extensions::prometheus {
-class PrometheusMetricsPublisher : public state::MetricsPublisher {
+class PrometheusMetricsPublisher : public state::MetricsPublisherImpl {
public:
explicit PrometheusMetricsPublisher(const std::string &name, const utils::Identifier &uuid = {}, std::unique_ptr<MetricsExposer> exposer = nullptr);
diff --git a/extensions/prometheus/PublishedMetricGaugeCollection.cpp b/extensions/prometheus/PublishedMetricGaugeCollection.cpp
index 0469b6dbd..c55c5822b 100644
--- a/extensions/prometheus/PublishedMetricGaugeCollection.cpp
+++ b/extensions/prometheus/PublishedMetricGaugeCollection.cpp
@@ -20,7 +20,7 @@
#include <algorithm>
#include "prometheus/client_metric.h"
-#include "state/PublishedMetricProvider.h"
+#include "core/state/PublishedMetricProvider.h"
#include "range/v3/range/conversion.hpp"
#include "range/v3/view/transform.hpp"
diff --git a/extensions/prometheus/PublishedMetricGaugeCollection.h b/extensions/prometheus/PublishedMetricGaugeCollection.h
index c86f53e57..bafa6acaa 100644
--- a/extensions/prometheus/PublishedMetricGaugeCollection.h
+++ b/extensions/prometheus/PublishedMetricGaugeCollection.h
@@ -20,11 +20,10 @@
#include <vector>
#include <string>
-#include "state/PublishedMetricProvider.h"
+#include "core/state/PublishedMetricProvider.h"
#include "prometheus/collectable.h"
#include "prometheus/metric_family.h"
#include "utils/gsl.h"
-#include "core/logging/LoggerConfiguration.h"
namespace org::apache::nifi::minifi::extensions::prometheus {
diff --git a/extensions/prometheus/tests/PrometheusMetricsPublisherTest.cpp b/extensions/prometheus/tests/PrometheusMetricsPublisherTest.cpp
index 878ef888a..33c078898 100644
--- a/extensions/prometheus/tests/PrometheusMetricsPublisherTest.cpp
+++ b/extensions/prometheus/tests/PrometheusMetricsPublisherTest.cpp
@@ -49,11 +49,11 @@ class DummyMetricsExposer : public MetricsExposer {
class PrometheusPublisherTestFixture {
public:
explicit PrometheusPublisherTestFixture(bool user_dummy_exposer)
- : configuration_(std::make_shared<Configure>()),
+ : configuration_(std::make_shared<ConfigureImpl>()),
provenance_repo_(core::createRepository("provenancerepository")),
flow_file_repo_(core::createRepository("flowfilerepository")),
content_repo_(core::createContentRepository("volatilecontentrepository")),
- response_node_loader_(std::make_shared<state::response::ResponseNodeLoader>(configuration_,
+ response_node_loader_(std::make_shared<state::response::ResponseNodeLoaderImpl>(configuration_,
std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{provenance_repo_, flow_file_repo_, content_repo_}, nullptr)) {
std::unique_ptr<DummyMetricsExposer> dummy_exposer;
if (user_dummy_exposer) {
diff --git a/extensions/python/ExecutePythonProcessor.cpp b/extensions/python/ExecutePythonProcessor.cpp
index 3cc282514..0fd8e0c96 100644
--- a/extensions/python/ExecutePythonProcessor.cpp
+++ b/extensions/python/ExecutePythonProcessor.cpp
@@ -189,7 +189,7 @@ void ExecutePythonProcessor::addProperty(const std::string &name, const std::str
}
const core::Property* ExecutePythonProcessor::findProperty(const std::string& name) const {
- if (auto prop_ptr = core::ConfigurableComponent::findProperty(name)) {
+ if (auto prop_ptr = core::ConfigurableComponentImpl::findProperty(name)) {
return prop_ptr;
}
@@ -206,7 +206,7 @@ const core::Property* ExecutePythonProcessor::findProperty(const std::string& na
}
std::map<std::string, core::Property> ExecutePythonProcessor::getProperties() const {
- auto result = ConfigurableComponent::getProperties();
+ auto result = ConfigurableComponentImpl::getProperties();
std::lock_guard<std::mutex> lock(python_properties_mutex_);
diff --git a/extensions/python/ExecutePythonProcessor.h b/extensions/python/ExecutePythonProcessor.h
index 8eec7011a..0cbf2416e 100644
--- a/extensions/python/ExecutePythonProcessor.h
+++ b/extensions/python/ExecutePythonProcessor.h
@@ -38,10 +38,10 @@
namespace org::apache::nifi::minifi::extensions::python::processors {
-class ExecutePythonProcessor : public core::Processor {
+class ExecutePythonProcessor : public core::ProcessorImpl {
public:
explicit ExecutePythonProcessor(std::string_view name, const utils::Identifier &uuid = {})
- : Processor(name, uuid),
+ : ProcessorImpl(name, uuid),
processor_initialized_(false),
python_dynamic_(false),
reload_on_script_change_(true) {
diff --git a/extensions/python/PythonCreator.h b/extensions/python/PythonCreator.h
index ad2e5164f..e86ddc526 100644
--- a/extensions/python/PythonCreator.h
+++ b/extensions/python/PythonCreator.h
@@ -19,23 +19,21 @@
#pragma once
#include <vector>
-#include <utility>
#include <algorithm>
#include <string>
#include <memory>
#include <filesystem>
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Resource.h"
#include "ExecutePythonProcessor.h"
#include "PythonConfigState.h"
#include "PythonObjectFactory.h"
-#include "agent/agent_version.h"
-#include "agent/build_description.h"
+#include "minifi-cpp/agent/agent_version.h"
+#include "minifi-cpp/agent/build_description.h"
#include "utils/file/FileUtils.h"
#include "utils/StringUtils.h"
#include "range/v3/algorithm.hpp"
-#include "properties/Configuration.h"
#include "utils/file/FilePattern.h"
#include "range/v3/view/filter.hpp"
#include "PythonDependencyInstaller.h"
@@ -46,10 +44,10 @@ namespace org::apache::nifi::minifi::extensions::python {
/**
* Can be used to load the python processors from NiFi properties.
*/
-class PythonCreator : public minifi::core::CoreComponent {
+class PythonCreator : public minifi::core::CoreComponentImpl {
public:
- explicit PythonCreator(std::string name, const utils::Identifier &uuid = {})
- : minifi::core::CoreComponent(std::move(name), uuid) {
+ explicit PythonCreator(const std::string_view name, const utils::Identifier &uuid = {})
+ : minifi::core::CoreComponentImpl(name, uuid) {
}
~PythonCreator() override {
diff --git a/extensions/python/PythonDependencyInstaller.cpp b/extensions/python/PythonDependencyInstaller.cpp
index e0a100198..2f2b8854a 100644
--- a/extensions/python/PythonDependencyInstaller.cpp
+++ b/extensions/python/PythonDependencyInstaller.cpp
@@ -21,6 +21,7 @@
#include "PythonInterpreter.h"
#include "PyException.h"
#include "types/Types.h"
+#include "utils/OptionalUtils.h"
namespace org::apache::nifi::minifi::extensions::python {
diff --git a/extensions/python/PythonDependencyInstaller.h b/extensions/python/PythonDependencyInstaller.h
index dd989d661..87a99b90c 100644
--- a/extensions/python/PythonDependencyInstaller.h
+++ b/extensions/python/PythonDependencyInstaller.h
@@ -21,7 +21,7 @@
#include <filesystem>
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "properties/Configure.h"
namespace org::apache::nifi::minifi::extensions::python {
diff --git a/extensions/python/PythonScriptEngine.h b/extensions/python/PythonScriptEngine.h
index 6a0d90e29..e7d4d6466 100644
--- a/extensions/python/PythonScriptEngine.h
+++ b/extensions/python/PythonScriptEngine.h
@@ -33,10 +33,9 @@
#include "PythonProcessor.h"
#include "types/PyProcessSession.h"
#include "PythonScriptException.h"
-#include "properties/Configuration.h"
#include "PythonInterpreter.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::extensions::python {
diff --git a/extensions/python/PythonScriptExecutor.cpp b/extensions/python/PythonScriptExecutor.cpp
index 1dbe57ecb..96efcc339 100644
--- a/extensions/python/PythonScriptExecutor.cpp
+++ b/extensions/python/PythonScriptExecutor.cpp
@@ -23,7 +23,7 @@
#include "PythonScriptEngine.h"
#include "range/v3/range/conversion.hpp"
-#include "Resource.h"
+#include "core/Resource.h"
namespace org::apache::nifi::minifi::extensions::python {
diff --git a/extensions/python/pythonlibloader/PythonLibLoader.cpp b/extensions/python/pythonlibloader/PythonLibLoader.cpp
index a21eddb3a..070104be7 100644
--- a/extensions/python/pythonlibloader/PythonLibLoader.cpp
+++ b/extensions/python/pythonlibloader/PythonLibLoader.cpp
@@ -21,7 +21,7 @@
#include <string>
#include <array>
#include "utils/StringUtils.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/extension/Extension.h"
#if defined(WIN32) || defined(__APPLE__)
diff --git a/extensions/python/tests/PythonManifestTests.cpp b/extensions/python/tests/PythonManifestTests.cpp
index 4bb98d6c7..3b4f90612 100644
--- a/extensions/python/tests/PythonManifestTests.cpp
+++ b/extensions/python/tests/PythonManifestTests.cpp
@@ -163,11 +163,11 @@ class MyPyProc5(FlowFileTransform):
controller.configuration_->set(minifi::Configuration::nifi_extension_path, "*minifi-python-script*");
#endif
- core::extension::ExtensionManager::get().initialize(controller.configuration_);
+ core::extension::ExtensionManagerImpl::get().initialize(controller.configuration_);
controller.setupFlow();
- auto c2_metrics_publisher = std::static_pointer_cast<minifi::c2::C2MetricsPublisher>(controller.metrics_publisher_store_->getMetricsPublisher(minifi::c2::C2_METRICS_PUBLISHER).lock());
+ auto c2_metrics_publisher = std::dynamic_pointer_cast<minifi::c2::C2MetricsPublisher>(controller.metrics_publisher_store_->getMetricsPublisher(minifi::c2::C2_METRICS_PUBLISHER).lock());
auto agent_info = c2_metrics_publisher->getAgentManifest();
diff --git a/extensions/python/types/PyRecordSetWriter.cpp b/extensions/python/types/PyRecordSetWriter.cpp
index ffd784e7b..caca438c2 100644
--- a/extensions/python/types/PyRecordSetWriter.cpp
+++ b/extensions/python/types/PyRecordSetWriter.cpp
@@ -19,7 +19,7 @@ a * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#include "PyScriptFlowFile.h"
#include "PyProcessSession.h"
-#include "core/Record.h"
+#include "minifi-cpp/core/Record.h"
#include "rapidjson/document.h"
extern "C" {
diff --git a/extensions/rocksdb-repos/CMakeLists.txt b/extensions/rocksdb-repos/CMakeLists.txt
index 2f43753c7..c5e507113 100644
--- a/extensions/rocksdb-repos/CMakeLists.txt
+++ b/extensions/rocksdb-repos/CMakeLists.txt
@@ -30,8 +30,9 @@ file(GLOB SOURCES "*.cpp" "controllers/*.cpp" "database/*.cpp" "encryption/*.cp
add_minifi_library(minifi-rocksdb-repos SHARED ${SOURCES})
-target_link_libraries(minifi-rocksdb-repos ${LIBMINIFI} Threads::Threads)
-target_link_libraries(minifi-rocksdb-repos RocksDB::RocksDB)
+target_link_libraries(minifi-rocksdb-repos PUBLIC RocksDB::RocksDB)
+target_link_libraries(minifi-rocksdb-repos PUBLIC minifi-api minifi-extension-utils Threads::Threads)
+target_link_libraries(minifi-rocksdb-repos PRIVATE $<LINK_ONLY:core-minifi>)
register_extension(minifi-rocksdb-repos "ROCKSDB REPOS" ROCKSDB-REPOS "This Enables persistent provenance, flowfile, and content repositories using RocksDB" "extensions/rocksdb-repos/tests")
register_extension_linter(minifi-rocksdb-repos-linter)
diff --git a/extensions/rocksdb-repos/DatabaseContentRepository.cpp b/extensions/rocksdb-repos/DatabaseContentRepository.cpp
index 262f3aef5..5c0f826de 100644
--- a/extensions/rocksdb-repos/DatabaseContentRepository.cpp
+++ b/extensions/rocksdb-repos/DatabaseContentRepository.cpp
@@ -146,11 +146,11 @@ DatabaseContentRepository::Session::Session(std::shared_ptr<ContentRepository> r
use_synchronous_writes_(use_synchronous_writes) {}
std::shared_ptr<ContentSession> DatabaseContentRepository::createSession() {
- return std::make_shared<Session>(sharedFromThis(), use_synchronous_writes_);
+ return std::make_shared<Session>(sharedFromThis<ContentRepository>(), use_synchronous_writes_);
}
void DatabaseContentRepository::Session::commit() {
- auto dbContentRepository = std::static_pointer_cast<DatabaseContentRepository>(repository_);
+ auto dbContentRepository = std::dynamic_pointer_cast<DatabaseContentRepository>(repository_);
auto opendb = dbContentRepository->db_->open();
if (!opendb) {
throw Exception(REPOSITORY_EXCEPTION, "Couldn't open rocksdb database to commit content changes");
diff --git a/extensions/rocksdb-repos/DatabaseContentRepository.h b/extensions/rocksdb-repos/DatabaseContentRepository.h
index eb78204f5..8b430dce8 100644
--- a/extensions/rocksdb-repos/DatabaseContentRepository.h
+++ b/extensions/rocksdb-repos/DatabaseContentRepository.h
@@ -25,7 +25,7 @@
#include "core/ContentRepository.h"
#include "core/BufferedContentSession.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Property.h"
#include "database/RocksDatabase.h"
#include "properties/Configure.h"
@@ -33,7 +33,7 @@
namespace org::apache::nifi::minifi::core::repository {
-class DatabaseContentRepository : public core::ContentRepository {
+class DatabaseContentRepository : public core::ContentRepositoryImpl {
class Session : public BufferedContentSession {
public:
explicit Session(std::shared_ptr<ContentRepository> repository, bool use_synchronous_writes);
@@ -49,7 +49,7 @@ class DatabaseContentRepository : public core::ContentRepository {
static constexpr const char* ENCRYPTION_KEY_NAME = "nifi.database.content.repository.encryption.key";
explicit DatabaseContentRepository(std::string_view name = className<DatabaseContentRepository>(), const utils::Identifier& uuid = {})
- : core::ContentRepository(name, uuid),
+ : core::ContentRepositoryImpl(name, uuid),
is_valid_(false),
db_(nullptr),
logger_(logging::LoggerFactory<DatabaseContentRepository>::getLogger()) {
diff --git a/extensions/rocksdb-repos/FlowFileLoader.cpp b/extensions/rocksdb-repos/FlowFileLoader.cpp
index 1ab12fd49..8eb2c685d 100644
--- a/extensions/rocksdb-repos/FlowFileLoader.cpp
+++ b/extensions/rocksdb-repos/FlowFileLoader.cpp
@@ -23,9 +23,9 @@
#include <vector>
#include <utility>
-#include "logging/LoggerConfiguration.h"
-#include "FlowFileRecord.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/gsl.h"
+#include "FlowFileRecord.h"
namespace org::apache::nifi::minifi {
diff --git a/extensions/rocksdb-repos/FlowFileLoader.h b/extensions/rocksdb-repos/FlowFileLoader.h
index 79277f657..f18ab53fd 100644
--- a/extensions/rocksdb-repos/FlowFileLoader.h
+++ b/extensions/rocksdb-repos/FlowFileLoader.h
@@ -23,10 +23,9 @@
#include <memory>
#include "database/RocksDatabase.h"
-#include "FlowFile.h"
#include "utils/gsl.h"
#include "core/ContentRepository.h"
-#include "SwapManager.h"
+#include "minifi-cpp/SwapManager.h"
#include "utils/ThreadPool.h"
#include "core/logging/Logger.h"
diff --git a/extensions/rocksdb-repos/FlowFileRepository.cpp b/extensions/rocksdb-repos/FlowFileRepository.cpp
index b53ec2654..82ea380c9 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.cpp
+++ b/extensions/rocksdb-repos/FlowFileRepository.cpp
@@ -26,10 +26,11 @@
#include "rocksdb/options.h"
#include "rocksdb/slice.h"
-#include "FlowFileRecord.h"
#include "utils/gsl.h"
#include "core/Resource.h"
#include "utils/OptionalUtils.h"
+#include "core/TypedValues.h"
+#include "FlowFileRecord.h"
using namespace std::literals::chrono_literals;
@@ -120,7 +121,7 @@ void FlowFileRepository::run() {
flush();
}
-bool FlowFileRepository::contentSizeIsAmpleForFlowFile(const FlowFileRecord& flow_file_record, const std::shared_ptr<ResourceClaim>& resource_claim) const {
+bool FlowFileRepository::contentSizeIsAmpleForFlowFile(const FlowFile& flow_file_record, const std::shared_ptr<ResourceClaim>& resource_claim) const {
const auto stream_size = resource_claim ? content_repo_->size(*resource_claim) : 0;
const auto required_size = flow_file_record.getOffset() + flow_file_record.getSize();
return stream_size >= required_size;
@@ -283,7 +284,7 @@ void FlowFileRepository::runCompaction() {
}
bool FlowFileRepository::start() {
- const bool ret = ThreadedRepository::start();
+ const bool ret = ThreadedRepositoryImpl::start();
if (swap_loader_) {
swap_loader_->start();
}
@@ -300,7 +301,7 @@ bool FlowFileRepository::stop() {
if (swap_loader_) {
swap_loader_->stop();
}
- return ThreadedRepository::stop();
+ return ThreadedRepositoryImpl::stop();
}
void FlowFileRepository::store(std::vector<std::shared_ptr<core::FlowFile>> flow_files) {
diff --git a/extensions/rocksdb-repos/FlowFileRepository.h b/extensions/rocksdb-repos/FlowFileRepository.h
index 7e9b071b1..164ef703d 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.h
+++ b/extensions/rocksdb-repos/FlowFileRepository.h
@@ -28,13 +28,13 @@
#include "rocksdb/slice.h"
#include "rocksdb/utilities/checkpoint.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
-#include "Connection.h"
+#include "core/logging/LoggerFactory.h"
+#include "minifi-cpp/Connection.h"
#include "concurrentqueue.h"
#include "database/RocksDatabase.h"
#include "encryption/RocksDbEncryptionProvider.h"
#include "utils/crypto/EncryptionProvider.h"
-#include "SwapManager.h"
+#include "minifi-cpp/SwapManager.h"
#include "FlowFileLoader.h"
#include "range/v3/algorithm/all_of.hpp"
#include "utils/Literals.h"
@@ -117,7 +117,7 @@ class FlowFileRepository : public RocksDbRepository, public SwapManager {
void deserializeFlowFilesWithNoContentClaim(minifi::internal::OpenRocksDb& opendb, std::list<ExpiredFlowFileInfo>& flow_files);
- bool contentSizeIsAmpleForFlowFile(const FlowFileRecord& flow_file_record, const std::shared_ptr<ResourceClaim>& resource_claim) const;
+ bool contentSizeIsAmpleForFlowFile(const FlowFile& flow_file_record, const std::shared_ptr<ResourceClaim>& resource_claim) const;
Connectable* getContainer(const std::string& container_id);
moodycamel::ConcurrentQueue<ExpiredFlowFileInfo> keys_to_delete_;
diff --git a/extensions/rocksdb-repos/ProvenanceRepository.cpp b/extensions/rocksdb-repos/ProvenanceRepository.cpp
index 5afe75a4b..a4378e451 100644
--- a/extensions/rocksdb-repos/ProvenanceRepository.cpp
+++ b/extensions/rocksdb-repos/ProvenanceRepository.cpp
@@ -86,7 +86,7 @@ bool ProvenanceRepository::getElements(std::vector<std::shared_ptr<core::Seriali
for (it->SeekToFirst(); it->Valid(); it->Next()) {
if (max_size >= requested_batch)
break;
- auto eventRead = std::make_shared<ProvenanceEventRecord>();
+ auto eventRead = ProvenanceEventRecord::create();
std::string key = it->key().ToString();
io::BufferStream stream(gsl::make_span(it->value()).as_span<const std::byte>());
if (eventRead->deserialize(stream)) {
diff --git a/extensions/rocksdb-repos/ProvenanceRepository.h b/extensions/rocksdb-repos/ProvenanceRepository.h
index a5febea18..89b89dbe8 100644
--- a/extensions/rocksdb-repos/ProvenanceRepository.h
+++ b/extensions/rocksdb-repos/ProvenanceRepository.h
@@ -27,8 +27,8 @@
#include "rocksdb/options.h"
#include "rocksdb/slice.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
-#include "provenance/Provenance.h"
+#include "core/logging/LoggerFactory.h"
+#include "minifi-cpp/provenance/Provenance.h"
#include "utils/Literals.h"
#include "RocksDbRepository.h"
@@ -76,8 +76,6 @@ class ProvenanceRepository : public core::repository::RocksDbRepository {
void destroy();
- // Prevent default copy constructor and assignment operation
- // Only support pass by reference or pointer
ProvenanceRepository(const ProvenanceRepository &parent) = delete;
ProvenanceRepository &operator=(const ProvenanceRepository &parent) = delete;
diff --git a/extensions/rocksdb-repos/RocksDbRepository.cpp b/extensions/rocksdb-repos/RocksDbRepository.cpp
index f09d0f936..2d1698f12 100644
--- a/extensions/rocksdb-repos/RocksDbRepository.cpp
+++ b/extensions/rocksdb-repos/RocksDbRepository.cpp
@@ -16,6 +16,7 @@
*/
#include "RocksDbRepository.h"
#include "utils/span.h"
+#include "utils/OptionalUtils.h"
using namespace std::literals::chrono_literals;
diff --git a/extensions/rocksdb-repos/RocksDbRepository.h b/extensions/rocksdb-repos/RocksDbRepository.h
index f29ff9758..b3467a772 100644
--- a/extensions/rocksdb-repos/RocksDbRepository.h
+++ b/extensions/rocksdb-repos/RocksDbRepository.h
@@ -29,7 +29,7 @@ namespace org::apache::nifi::minifi::core::repository {
constexpr auto FLOWFILE_REPOSITORY_RETRY_INTERVAL_INCREMENTS = std::chrono::milliseconds(500);
-class RocksDbRepository : public ThreadedRepository {
+class RocksDbRepository : public ThreadedRepositoryImpl {
public:
RocksDbRepository(std::string_view repo_name,
std::string directory,
@@ -37,7 +37,7 @@ class RocksDbRepository : public ThreadedRepository {
int64_t max_partition_bytes,
std::chrono::milliseconds purge_period,
std::shared_ptr<logging::Logger> logger)
- : ThreadedRepository(repo_name, std::move(directory), max_partition_millis, max_partition_bytes, purge_period),
+ : ThreadedRepositoryImpl(repo_name, std::move(directory), max_partition_millis, max_partition_bytes, purge_period),
logger_(std::move(logger)) {
}
diff --git a/extensions/rocksdb-repos/RocksDbStream.cpp b/extensions/rocksdb-repos/RocksDbStream.cpp
index 7889622b5..2f1dc2af9 100644
--- a/extensions/rocksdb-repos/RocksDbStream.cpp
+++ b/extensions/rocksdb-repos/RocksDbStream.cpp
@@ -30,7 +30,7 @@ namespace org::apache::nifi::minifi::io {
RocksDbStream::RocksDbStream(std::string path, gsl::not_null<minifi::internal::RocksDatabase*> db, bool write_enable, minifi::internal::WriteBatch* batch,
bool use_synchronous_writes, bool verify_checksums)
- : BaseStream(),
+ : BaseStreamImpl(),
path_(std::move(path)),
write_enable_(write_enable),
db_(db),
diff --git a/extensions/rocksdb-repos/RocksDbStream.h b/extensions/rocksdb-repos/RocksDbStream.h
index 833311515..1076f0b51 100644
--- a/extensions/rocksdb-repos/RocksDbStream.h
+++ b/extensions/rocksdb-repos/RocksDbStream.h
@@ -23,7 +23,7 @@
#include <memory>
#include "database/RocksDatabase.h"
#include "io/BaseStream.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org {
namespace apache {
@@ -38,7 +38,7 @@ namespace io {
* Design: Simply extends BaseStream and overrides readData/writeData to allow a sink to the
* fstream object.
*/
-class RocksDbStream : public io::BaseStream {
+class RocksDbStream : public io::BaseStreamImpl {
public:
/**
* File Stream constructor that accepts an fstream shared pointer.
diff --git a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
index ceac73e70..f07125f53 100644
--- a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
+++ b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
@@ -35,7 +35,7 @@ RocksDbStateStorage::~RocksDbStateStorage() {
}
void RocksDbStateStorage::initialize() {
- ControllerService::initialize();
+ ControllerServiceImpl::initialize();
setSupportedProperties(Properties);
}
diff --git a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h
index d4b4a8ad8..6c9f8a85a 100644
--- a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h
+++ b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h
@@ -20,11 +20,11 @@
#include <string>
#include <memory>
-#include "controllers/keyvalue/AutoPersistor.h"
+#include "utils/AutoPersistor.h"
#include "controllers/keyvalue/KeyValueStateStorage.h"
#include "core/Core.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
diff --git a/extensions/rocksdb-repos/database/ColumnHandle.cpp b/extensions/rocksdb-repos/database/ColumnHandle.cpp
index 4bd05b3d2..ff03b07bd 100644
--- a/extensions/rocksdb-repos/database/ColumnHandle.cpp
+++ b/extensions/rocksdb-repos/database/ColumnHandle.cpp
@@ -17,7 +17,7 @@
*/
#include "ColumnHandle.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::internal {
diff --git a/extensions/rocksdb-repos/database/DbHandle.cpp b/extensions/rocksdb-repos/database/DbHandle.cpp
index 2c96a043d..2b395d55f 100644
--- a/extensions/rocksdb-repos/database/DbHandle.cpp
+++ b/extensions/rocksdb-repos/database/DbHandle.cpp
@@ -17,7 +17,7 @@
*/
#include "DbHandle.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::internal {
diff --git a/extensions/rocksdb-repos/database/OpenRocksDb.h b/extensions/rocksdb-repos/database/OpenRocksDb.h
index d65aad689..08527177d 100644
--- a/extensions/rocksdb-repos/database/OpenRocksDb.h
+++ b/extensions/rocksdb-repos/database/OpenRocksDb.h
@@ -28,7 +28,7 @@
#include "rocksdb/utilities/checkpoint.h"
#include "WriteBatch.h"
#include "core/RepositoryMetricsSource.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::internal {
diff --git a/extensions/rocksdb-repos/database/RocksDatabase.cpp b/extensions/rocksdb-repos/database/RocksDatabase.cpp
index c4a166a6b..df1c597cc 100644
--- a/extensions/rocksdb-repos/database/RocksDatabase.cpp
+++ b/extensions/rocksdb-repos/database/RocksDatabase.cpp
@@ -21,7 +21,7 @@
#include <unordered_map>
#include <utility>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/StringUtils.h"
#include "RocksDbInstance.h"
diff --git a/extensions/rocksdb-repos/database/RocksDatabase.h b/extensions/rocksdb-repos/database/RocksDatabase.h
index 7bcb229e9..afab4f844 100644
--- a/extensions/rocksdb-repos/database/RocksDatabase.h
+++ b/extensions/rocksdb-repos/database/RocksDatabase.h
@@ -24,7 +24,7 @@
#include <unordered_map>
#include "rocksdb/db.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "RocksDbUtils.h"
#include "OpenRocksDb.h"
diff --git a/extensions/rocksdb-repos/database/RocksDbInstance.cpp b/extensions/rocksdb-repos/database/RocksDbInstance.cpp
index 4c23e0ec8..a08311573 100644
--- a/extensions/rocksdb-repos/database/RocksDbInstance.cpp
+++ b/extensions/rocksdb-repos/database/RocksDbInstance.cpp
@@ -19,7 +19,7 @@
#include "RocksDbInstance.h"
#include <vector>
#include <utility>
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rocksdb/utilities/options_util.h"
#include "OpenRocksDb.h"
#include "ColumnHandle.h"
diff --git a/extensions/rocksdb-repos/database/RocksDbInstance.h b/extensions/rocksdb-repos/database/RocksDbInstance.h
index b4796c4eb..c6bfbe241 100644
--- a/extensions/rocksdb-repos/database/RocksDbInstance.h
+++ b/extensions/rocksdb-repos/database/RocksDbInstance.h
@@ -24,7 +24,7 @@
#include <unordered_map>
#include "RocksDbUtils.h"
#include "rocksdb/db.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
namespace org::apache::nifi::minifi::internal {
diff --git a/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.cpp b/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.cpp
index 881eb91d6..fc39bfdde 100644
--- a/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.cpp
+++ b/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.cpp
@@ -22,7 +22,7 @@
#include "RocksDbEncryptionProvider.h"
#include "utils/crypto/ciphers/Aes256Ecb.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::core::repository {
diff --git a/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.h b/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.h
index 93f561554..5b8efe562 100644
--- a/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.h
+++ b/extensions/rocksdb-repos/encryption/RocksDbEncryptionProvider.h
@@ -23,7 +23,7 @@
#include "rocksdb/env_encryption.h"
#include "utils/crypto/EncryptionUtils.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "utils/crypto/EncryptionManager.h"
namespace org::apache::nifi::minifi::core::repository {
diff --git a/extensions/rocksdb-repos/tests/ContentSessionTests.cpp b/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
index 3a612b758..9890a971d 100644
--- a/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
+++ b/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
@@ -24,7 +24,7 @@
#include "FileSystemRepository.h"
#include "VolatileContentRepository.h"
#include "DatabaseContentRepository.h"
-#include "BufferedContentSession.h"
+#include "core/BufferedContentSession.h"
#include "FlowFileRecord.h"
#include "unit/TestBase.h"
#include "unit/Catch.h"
@@ -36,7 +36,7 @@ class ContentSessionController : public TestController {
ContentSessionController()
: contentRepository(std::make_shared<ContentRepositoryClass>()) {
auto contentRepoPath = createTempDirectory();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(contentRepoPath);
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, contentRepoPath.string());
contentRepository->initialize(config);
diff --git a/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp b/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
index 2cd189866..cfc9e4674 100644
--- a/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
+++ b/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
@@ -43,13 +43,13 @@ TEST_CASE("Write Claim", "[TestDBCR1]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
auto stream = content_repo->write(*claim);
const std::string content = "well hello there";
@@ -66,7 +66,7 @@ TEST_CASE("Write Claim", "[TestDBCR1]") {
content_repo = std::make_shared<TestDatabaseContentRepository>();
- configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
@@ -91,13 +91,13 @@ TEST_CASE("Delete Claim", "[TestDBCR2]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
auto stream = content_repo->write(*claim);
stream->write("well hello there");
@@ -111,7 +111,7 @@ TEST_CASE("Delete Claim", "[TestDBCR2]") {
content_repo = std::make_shared<TestDatabaseContentRepository>();
- configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
@@ -150,7 +150,7 @@ TEST_CASE("Append Claim", "[TestDBCR1]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
@@ -158,7 +158,7 @@ TEST_CASE("Append Claim", "[TestDBCR1]") {
const std::string content = "well hello there";
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
content_repo->write(*claim)->write(as_bytes(std::span(content)));
// requesting append before content end fails
@@ -192,12 +192,12 @@ TEST_CASE("Test Empty Claim", "[TestDBCR3]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
auto stream = content_repo->write(*claim);
// we're writing nothing to the stream.
@@ -211,7 +211,7 @@ TEST_CASE("Test Empty Claim", "[TestDBCR3]") {
content_repo = std::make_shared<TestDatabaseContentRepository>();
- configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
@@ -229,13 +229,13 @@ TEST_CASE("Delete NonExistent Claim", "[TestDBCR4]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
- auto claim2 = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
+ auto claim2 = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
auto stream = content_repo->write(*claim);
stream->write("well hello there");
@@ -249,7 +249,7 @@ TEST_CASE("Delete NonExistent Claim", "[TestDBCR4]") {
content_repo = std::make_shared<TestDatabaseContentRepository>();
- configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
@@ -271,13 +271,13 @@ TEST_CASE("Delete Remove Count Claim", "[TestDBCR5]") {
auto dir = testController.createTempDirectory();
auto content_repo = std::make_shared<TestDatabaseContentRepository>();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
- auto claim2 = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
+ auto claim2 = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
auto stream = content_repo->write(*claim);
stream->write("well hello there");
@@ -291,7 +291,7 @@ TEST_CASE("Delete Remove Count Claim", "[TestDBCR5]") {
content_repo = std::make_shared<TestDatabaseContentRepository>();
- configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
REQUIRE(content_repo->initialize(configuration));
@@ -344,14 +344,14 @@ size_t getDbSize(const std::filesystem::path& dir) {
TEST_CASE("DBContentRepository can clear orphan entries") {
TestController testController;
auto dir = testController.createTempDirectory();
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
{
auto content_repo = std::make_shared<core::repository::DatabaseContentRepository>();
REQUIRE(content_repo->initialize(configuration));
- minifi::ResourceClaim claim(content_repo);
+ minifi::ResourceClaimImpl claim(content_repo);
content_repo->write(claim)->write("hi");
// ensure that the content is not deleted during resource claim destruction
content_repo->incrementStreamCount(claim);
diff --git a/extensions/rocksdb-repos/tests/DBProvenanceRepositoryTests.cpp b/extensions/rocksdb-repos/tests/DBProvenanceRepositoryTests.cpp
index cab212cc3..8f6677c35 100644
--- a/extensions/rocksdb-repos/tests/DBProvenanceRepositoryTests.cpp
+++ b/extensions/rocksdb-repos/tests/DBProvenanceRepositoryTests.cpp
@@ -69,7 +69,7 @@ TEST_CASE("Test size limit", "[sizeLimitTest]") {
// 60 sec, 100 KB - going to exceed the size limit
minifi::provenance::ProvenanceRepository provdb("TestProvRepo", temp_dir.string(), 1min, TEST_PROVENANCE_STORAGE_SIZE, 1s);
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, temp_dir.string());
REQUIRE(provdb.initialize(configuration));
@@ -89,7 +89,7 @@ TEST_CASE("Test time limit", "[timeLimitTest]") {
// 1 sec, 100 MB - going to exceed TTL
minifi::provenance::ProvenanceRepository provdb("TestProvRepo", temp_dir.string(), 1s, TEST_MAX_PROVENANCE_STORAGE_SIZE, 1s);
- auto configuration = std::make_shared<org::apache::nifi::minifi::Configure>();
+ auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, temp_dir.string());
REQUIRE(provdb.initialize(configuration));
diff --git a/extensions/rocksdb-repos/tests/EncryptionTests.cpp b/extensions/rocksdb-repos/tests/EncryptionTests.cpp
index 41f285d5d..cf49528e7 100644
--- a/extensions/rocksdb-repos/tests/EncryptionTests.cpp
+++ b/extensions/rocksdb-repos/tests/EncryptionTests.cpp
@@ -34,9 +34,9 @@ class FFRepoFixture : public TestController {
LogTestController::getInstance().setTrace<FlowFileRepository>();
home_ = createTempDirectory();
repo_dir_ = home_ / "flowfile_repo";
- config_ = std::make_shared<minifi::Configure>();
+ config_ = std::make_shared<minifi::ConfigureImpl>();
config_->setHome(home_);
- container_ = std::make_unique<minifi::Connection>(nullptr, nullptr, "container");
+ container_ = std::make_unique<minifi::ConnectionImpl>(nullptr, nullptr, "container");
content_repo_ = std::make_shared<core::repository::VolatileContentRepository>();
content_repo_->initialize(config_);
}
@@ -83,7 +83,7 @@ TEST_CASE_METHOD(FFRepoFixture, "FlowFileRepository creates checkpoint and loads
runWithNewRepository([&] (const std::shared_ptr<core::repository::FlowFileRepository>& repo) {
- auto flowfile = std::make_shared<minifi::FlowFileRecord>();
+ auto flowfile = std::make_shared<minifi::FlowFileRecordImpl>();
flowfile->setAttribute("my little pony", "my horse is amazing");
flowfile->setConnection(container_.get());
putFlowFile(flowfile, repo);
diff --git a/extensions/rocksdb-repos/tests/ProvenanceTests.cpp b/extensions/rocksdb-repos/tests/ProvenanceTests.cpp
index 402397cb8..21da1df27 100644
--- a/extensions/rocksdb-repos/tests/ProvenanceTests.cpp
+++ b/extensions/rocksdb-repos/tests/ProvenanceTests.cpp
@@ -35,13 +35,13 @@ namespace provenance = minifi::provenance;
using namespace std::literals::chrono_literals;
TEST_CASE("Test Provenance record create", "[Testprovenance::ProvenanceEventRecord]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "blah", "blahblah");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "blah", "blahblah");
REQUIRE(record1->getAttributes().empty());
REQUIRE(record1->getAlternateIdentifierUri().length() == 0);
}
TEST_CASE("Test Provenance record serialization", "[Testprovenance::ProvenanceEventRecordSerializeDeser]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
utils::Identifier eventId = record1->getEventId();
@@ -53,7 +53,7 @@ TEST_CASE("Test Provenance record serialization", "[Testprovenance::ProvenanceEv
record1->setEventDuration(sample);
testRepository->storeElement(record1);
- auto record2 = std::make_shared<provenance::ProvenanceEventRecord>();
+ auto record2 = std::make_shared<provenance::ProvenanceEventRecordImpl>();
record2->setEventId(eventId);
REQUIRE(record2->loadFromRepository(testRepository) == true);
REQUIRE(record2->getEventId() == record1->getEventId());
@@ -65,9 +65,9 @@ TEST_CASE("Test Provenance record serialization", "[Testprovenance::ProvenanceEv
}
TEST_CASE("Test Flowfile record added to provenance", "[TestFlowAndProv1]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CLONE, "componentid", "componenttype");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CLONE, "componentid", "componenttype");
utils::Identifier eventId = record1->getEventId();
- std::shared_ptr<minifi::FlowFileRecord> ffr1 = std::make_shared<minifi::FlowFileRecord>();
+ std::shared_ptr<minifi::FlowFileRecord> ffr1 = std::make_shared<minifi::FlowFileRecordImpl>();
ffr1->setAttribute("potato", "potatoe");
ffr1->setAttribute("tomato", "tomatoe");
@@ -78,7 +78,7 @@ TEST_CASE("Test Flowfile record added to provenance", "[TestFlowAndProv1]") {
record1->setEventDuration(sample);
testRepository->storeElement(record1);
- auto record2 = std::make_shared<provenance::ProvenanceEventRecord>();
+ auto record2 = std::make_shared<provenance::ProvenanceEventRecordImpl>();
record2->setEventId(eventId);
REQUIRE(record2->loadFromRepository(testRepository) == true);
REQUIRE(record1->getChildrenUuids().size() == 1);
@@ -90,7 +90,7 @@ TEST_CASE("Test Flowfile record added to provenance", "[TestFlowAndProv1]") {
}
TEST_CASE("Test Provenance record serialization Volatile", "[Testprovenance::ProvenanceEventRecordSerializeDeser]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
utils::Identifier eventId = record1->getEventId();
@@ -104,7 +104,7 @@ TEST_CASE("Test Provenance record serialization Volatile", "[Testprovenance::Pro
record1->setEventDuration(sample);
testRepository->storeElement(record1);
- auto record2 = std::make_shared<provenance::ProvenanceEventRecord>();
+ auto record2 = std::make_shared<provenance::ProvenanceEventRecordImpl>();
record2->setEventId(eventId);
REQUIRE(record2->loadFromRepository(testRepository) == true);
REQUIRE(record2->getEventId() == record1->getEventId());
@@ -116,9 +116,9 @@ TEST_CASE("Test Provenance record serialization Volatile", "[Testprovenance::Pro
}
TEST_CASE("Test Flowfile record added to provenance using Volatile Repo", "[TestFlowAndProv1]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CLONE, "componentid", "componenttype");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CLONE, "componentid", "componenttype");
utils::Identifier eventId = record1->getEventId();
- std::shared_ptr<minifi::FlowFileRecord> ffr1 = std::make_shared<minifi::FlowFileRecord>();
+ std::shared_ptr<minifi::FlowFileRecord> ffr1 = std::make_shared<minifi::FlowFileRecordImpl>();
ffr1->setAttribute("potato", "potatoe");
ffr1->setAttribute("tomato", "tomatoe");
@@ -130,7 +130,7 @@ TEST_CASE("Test Flowfile record added to provenance using Volatile Repo", "[Test
record1->setEventDuration(sample);
testRepository->storeElement(record1);
- auto record2 = std::make_shared<provenance::ProvenanceEventRecord>();
+ auto record2 = std::make_shared<provenance::ProvenanceEventRecordImpl>();
record2->setEventId(eventId);
REQUIRE(record2->loadFromRepository(testRepository) == true);
REQUIRE(record1->getChildrenUuids().size() == 1);
@@ -142,7 +142,7 @@ TEST_CASE("Test Flowfile record added to provenance using Volatile Repo", "[Test
}
TEST_CASE("Test Provenance record serialization NoOp", "[Testprovenance::ProvenanceEventRecordSerializeDeser]") {
- auto record1 = std::make_shared<provenance::ProvenanceEventRecord>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
+ auto record1 = std::make_shared<provenance::ProvenanceEventRecordImpl>(provenance::ProvenanceEventRecord::ProvenanceEventType::CREATE, "componentid", "componenttype");
utils::Identifier eventId = record1->getEventId();
@@ -156,7 +156,7 @@ TEST_CASE("Test Provenance record serialization NoOp", "[Testprovenance::Provena
record1->setEventDuration(sample);
REQUIRE(testRepository->storeElement(record1));
- auto record2 = std::make_shared<provenance::ProvenanceEventRecord>();
+ auto record2 = std::make_shared<provenance::ProvenanceEventRecordImpl>();
record2->setEventId(eventId);
REQUIRE(record2->loadFromRepository(testRepository) == false);
}
diff --git a/extensions/rocksdb-repos/tests/RepoTests.cpp b/extensions/rocksdb-repos/tests/RepoTests.cpp
index fbcf32e4e..dfba8f64d 100644
--- a/extensions/rocksdb-repos/tests/RepoTests.cpp
+++ b/extensions/rocksdb-repos/tests/RepoTests.cpp
@@ -39,15 +39,17 @@
#include "core/repository/VolatileProvenanceRepository.h"
#include "DatabaseContentRepository.h"
#include "catch2/generators/catch_generators.hpp"
+#include "core/repository/FileSystemRepository.h"
+#include "core/ProcessorNode.h"
using namespace std::literals::chrono_literals;
namespace {
namespace {
-class TestProcessor final : public core::Processor {
+class TestProcessor final : public core::ProcessorImpl {
public:
- using Processor::Processor;
+ using ProcessorImpl::ProcessorImpl;
static constexpr bool SupportsDynamicProperties = false;
static constexpr bool SupportsDynamicRelationships = false;
@@ -73,12 +75,12 @@ TEST_CASE("Test Repo Empty Value Attribute", "[TestFFR1]") {
const auto dir = testController.createTempDirectory();
const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- const auto file = std::make_shared<minifi::FlowFileRecord>();
+ const auto file = std::make_shared<minifi::FlowFileRecordImpl>();
file->addAttribute("keyA", "");
@@ -95,11 +97,11 @@ TEST_CASE("Test Repo Empty Key Attribute ", "[TestFFR2]") {
const auto dir = testController.createTempDirectory();
const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- const auto file = std::make_shared<minifi::FlowFileRecord>();
+ const auto file = std::make_shared<minifi::FlowFileRecordImpl>();
file->addAttribute("keyA", "hasdgasdgjsdgasgdsgsadaskgasd");
@@ -118,12 +120,12 @@ TEST_CASE("Test Repo Key Attribute Verify ", "[TestFFR3]") {
auto dir = testController.createTempDirectory();
const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- minifi::FlowFileRecord record;
+ minifi::FlowFileRecordImpl record;
std::string uuid = record.getUUIDStr();
@@ -175,7 +177,7 @@ TEST_CASE("Test Delete Content ", "[TestFFR4]") {
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
@@ -183,8 +185,8 @@ TEST_CASE("Test Delete Content ", "[TestFFR4]") {
{
- const auto claim = std::make_shared<minifi::ResourceClaim>((dir / "tstFile.ext").string(), content_repo);
- minifi::FlowFileRecord record;
+ const auto claim = std::make_shared<minifi::ResourceClaimImpl>((dir / "tstFile.ext").string(), content_repo);
+ minifi::FlowFileRecordImpl record;
record.setResourceClaim(claim);
record.addAttribute("keyA", "hasdgasdgjsdgasgdsgsadaskgasd");
@@ -226,16 +228,16 @@ TEST_CASE("Test Validate Checkpoint ", "[TestFFR5]") {
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
repository->loadComponent(content_repo);
- auto claim = std::make_shared<minifi::ResourceClaim>((dir / "tstFile.ext").string(), content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>((dir / "tstFile.ext").string(), content_repo);
{
- minifi::FlowFileRecord record;
+ minifi::FlowFileRecordImpl record;
record.setResourceClaim(claim);
record.addAttribute("keyA", "hasdgasdgjsdgasgdsgsadaskgasd");
@@ -278,7 +280,7 @@ TEST_CASE("Test FlowFile Restore", "[TestFFR6]") {
auto dir = testController.createTempDirectory();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(dir);
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
@@ -290,7 +292,7 @@ TEST_CASE("Test FlowFile Restore", "[TestFFR6]") {
content_repo->initialize(config);
core::Relationship inputRel{"Input", "dummy"};
- auto input = std::make_unique<minifi::Connection>(ff_repository, content_repo, "Input");
+ auto input = std::make_unique<minifi::ConnectionImpl>(ff_repository, content_repo, "Input");
input->addRelationship(inputRel);
auto root = std::make_unique<core::ProcessGroup>(core::ProcessGroupType::ROOT_PROCESS_GROUP, "root");
@@ -322,9 +324,9 @@ TEST_CASE("Test FlowFile Restore", "[TestFFR6]") {
REQUIRE(uuid);
inputPtr->setSourceUUID(uuid);
processor->addConnection(inputPtr);
- auto node = std::make_shared<core::ProcessorNode>(processor.get());
- auto context = std::make_shared<core::ProcessContext>(node, nullptr, prov_repo, ff_repository, content_repo);
- core::ProcessSession sessionGenFlowFile(context);
+ auto node = std::make_shared<core::ProcessorNodeImpl>(processor.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(node, nullptr, prov_repo, ff_repository, content_repo);
+ core::ProcessSessionImpl sessionGenFlowFile(context);
std::shared_ptr<core::FlowFile> flow = std::static_pointer_cast<core::FlowFile>(sessionGenFlowFile.create());
sessionGenFlowFile.importFrom(content, flow);
sessionGenFlowFile.transfer(flow, inputRel);
@@ -380,13 +382,13 @@ TEST_CASE("Flush deleted flowfiles before shutdown", "[TestFFR7]") {
TestController testController;
const auto dir = testController.createTempDirectory();
- const auto config = std::make_shared<minifi::Configure>();
+ const auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(dir);
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
const auto content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- auto connection = std::make_shared<minifi::Connection>(nullptr, nullptr, "Connection");
+ auto connection = std::make_shared<minifi::ConnectionImpl>(nullptr, nullptr, "Connection");
std::map<std::string, core::Connectable*> connectionMap{{connection->getUUIDStr(), connection.get()}};
// initialize repository
{
@@ -412,7 +414,7 @@ TEST_CASE("Flush deleted flowfiles before shutdown", "[TestFFR7]") {
}
for (int keyIdx = 0; keyIdx < 100; ++keyIdx) {
- auto file = std::make_shared<minifi::FlowFileRecord>();
+ auto file = std::make_shared<minifi::FlowFileRecordImpl>();
file->setConnection(connection.get());
// Serialize is sync
REQUIRE(file->Persist(ff_repository));
@@ -458,7 +460,7 @@ TEST_CASE("FlowFileRepository triggers content repo orphan clear") {
auto ff_dir = testController.createTempDirectory();
auto content_dir = testController.createTempDirectory();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(home_dir);
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
@@ -466,7 +468,7 @@ TEST_CASE("FlowFileRepository triggers content repo orphan clear") {
{
auto content_repo = std::make_shared<core::repository::FileSystemRepository>();
REQUIRE(content_repo->initialize(config));
- minifi::ResourceClaim claim(content_repo);
+ minifi::ResourceClaimImpl claim(content_repo);
content_repo->write(claim)->write("hi");
// ensure that the content is not deleted during resource claim destruction
content_repo->incrementStreamCount(claim);
@@ -493,7 +495,7 @@ TEST_CASE("FlowFileRepository synchronously pushes existing flow files") {
const auto ff_dir = testController.createTempDirectory();
const auto content_dir = testController.createTempDirectory();
- const auto config = std::make_shared<minifi::Configure>();
+ const auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(home_dir);
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
@@ -507,12 +509,12 @@ TEST_CASE("FlowFileRepository synchronously pushes existing flow files") {
REQUIRE(ff_repo->initialize(config));
auto content_repo = std::make_shared<core::repository::FileSystemRepository>();
REQUIRE(content_repo->initialize(config));
- auto conn = std::make_shared<minifi::Connection>(ff_repo, content_repo, "TestConnection", connection_id);
+ auto conn = std::make_shared<minifi::ConnectionImpl>(ff_repo, content_repo, "TestConnection", connection_id);
- auto claim = std::make_shared<minifi::ResourceClaim>(content_repo);
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(content_repo);
std::vector<std::pair<std::string, std::unique_ptr<minifi::io::BufferStream>>> flow_data;
- auto ff = std::make_shared<minifi::FlowFileRecord>();
+ auto ff = std::make_shared<minifi::FlowFileRecordImpl>();
ff_id = ff->getUUID();
ff->setConnection(conn.get());
content_repo->write(*claim)->write("hello");
@@ -529,7 +531,7 @@ TEST_CASE("FlowFileRepository synchronously pushes existing flow files") {
REQUIRE(ff_repo->initialize(config));
auto content_repo = std::make_shared<core::repository::FileSystemRepository>();
REQUIRE(content_repo->initialize(config));
- auto conn = std::make_shared<minifi::Connection>(ff_repo, content_repo, "TestConnection", connection_id);
+ auto conn = std::make_shared<minifi::ConnectionImpl>(ff_repo, content_repo, "TestConnection", connection_id);
ff_repo->setConnectionMap({{connection_id.to_string(), conn.get()}});
ff_repo->loadComponent(content_repo);
@@ -575,11 +577,11 @@ TEST_CASE("Test getting flow file repository size properties", "[TestGettingRepo
expected_is_full = true;
expected_max_repo_size = 7;
}
- auto configuration = std::make_shared<minifi::Configure>();
+ auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
- auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
for (auto i = 0; i < 100; ++i) {
flow_file->addAttribute("key" + std::to_string(i), "testattributevalue" + std::to_string(i));
@@ -594,7 +596,7 @@ TEST_CASE("Test getting flow file repository size properties", "[TestGettingRepo
},
std::chrono::milliseconds(50)));
REQUIRE(true == flow_file->Persist(repository));
- auto flow_file_2 = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file_2 = std::make_shared<minifi::FlowFileRecordImpl>();
REQUIRE(true == flow_file_2->Persist(repository));
repository->flush();
@@ -624,11 +626,11 @@ TEST_CASE("Test getting noop repository size properties", "[TestGettingRepositor
const auto repository = minifi::core::createRepository("NoOpRepository", "ff");
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
- const auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ const auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
flow_file->addAttribute("key", "testattributevalue");
@@ -652,7 +654,7 @@ TEST_CASE("Test getting content repository size properties", "[TestGettingReposi
const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
const auto content_repo_dir = testController.createTempDirectory();
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_repo_dir.string());
std::string content = "content";
@@ -683,7 +685,7 @@ TEST_CASE("Test getting content repository size properties", "[TestGettingReposi
repository->loadComponent(content_repo);
auto original_content_repo_size = content_repo->getRepositorySize();
- auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
auto content_session = content_repo->createSession();
auto claim = content_session->create();
@@ -745,7 +747,7 @@ TEST_CASE("Flow file repositories can be stopped", "[TestRepoIsRunning]") {
repository = core::createRepository("NoOpRepository", "ff");
}
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(dir);
repository->initialize(configuration);
@@ -781,7 +783,7 @@ TEST_CASE("Content repositories are always running", "[TestRepoIsRunning]") {
}
std::shared_ptr<minifi::FlowFileRecord> createFlowFileWithContent(core::ContentRepository& content_repo, std::string_view content) {
- auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
const auto content_session = content_repo.createSession();
const auto claim = content_session->create();
const auto stream = content_session->write(claim);
@@ -808,7 +810,7 @@ TEST_CASE("FlowFileRepository can filter out too small contents") {
const auto ff_dir = testController.createTempDirectory();
const auto content_dir = testController.createTempDirectory();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(minifi_home);
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
@@ -842,7 +844,7 @@ TEST_CASE("FlowFileRepository can filter out too small contents") {
REQUIRE(ff_repo->initialize(config));
REQUIRE(content_repo->initialize(config));
auto connection_id = utils::IdGenerator::getIdGenerator()->generate();
- auto connection = std::make_shared<minifi::Connection>(ff_repo, content_repo, "TestConnection", connection_id);
+ auto connection = std::make_shared<minifi::ConnectionImpl>(ff_repo, content_repo, "TestConnection", connection_id);
auto first_flow_file = createFlowFileWithContent(*content_repo, "foo");
auto second_flow_file = createFlowFileWithContent(*content_repo, "bar");
diff --git a/extensions/rocksdb-repos/tests/RocksDBUtilsTests.cpp b/extensions/rocksdb-repos/tests/RocksDBUtilsTests.cpp
index a13e2493f..16eca28c2 100644
--- a/extensions/rocksdb-repos/tests/RocksDBUtilsTests.cpp
+++ b/extensions/rocksdb-repos/tests/RocksDBUtilsTests.cpp
@@ -32,7 +32,7 @@ TEST_CASE("Get global RocksDB options to override", "[rocksdbutils]") {
{"create_if_missing", "false"}
};
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->set("nifi.c2.rest.url", "http://localhost:8080");
config->set("nifi.global.rocksdb.options.table_cache_numshardbits", "456");
config->set("nifi.global.rocksdb.options.keep_log_file_num", "123");
diff --git a/extensions/rocksdb-repos/tests/SwapTests.cpp b/extensions/rocksdb-repos/tests/SwapTests.cpp
index 5e04bf5a6..a3e6cb0c0 100644
--- a/extensions/rocksdb-repos/tests/SwapTests.cpp
+++ b/extensions/rocksdb-repos/tests/SwapTests.cpp
@@ -20,19 +20,21 @@
#include "core/repository/VolatileContentRepository.h"
#include "FlowFileRepository.h"
#include "unit/TestBase.h"
-#include "StreamPipe.h"
+#include "io/StreamPipe.h"
#include "unit/TestUtils.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
#include "core/RelationshipDefinition.h"
#include "unit/ProvenanceTestHelper.h"
+#include "core/ProcessorNode.h"
+#include "core/repository/FileSystemRepository.h"
namespace org::apache::nifi::minifi::test {
-class OutputProcessor : public core::Processor {
+class OutputProcessor : public core::ProcessorImpl {
public:
- using core::Processor::Processor;
+ using core::ProcessorImpl::ProcessorImpl;
static constexpr const char* Description = "Processor used for testing cycles";
static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
@@ -82,7 +84,7 @@ TEST_CASE("Connection will on-demand swap flow files") {
auto dir = testController.createTempDirectory();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
config->setHome(dir);
config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
@@ -100,15 +102,15 @@ TEST_CASE("Connection will on-demand swap flow files") {
auto processor = std::make_shared<OutputProcessor>("proc");
- auto connection = std::make_shared<minifi::Connection>(ff_repo, content_repo, swap_manager, "conn", minifi::utils::IdGenerator::getIdGenerator()->generate());
+ auto connection = std::make_shared<minifi::ConnectionImpl>(ff_repo, content_repo, swap_manager, "conn", minifi::utils::IdGenerator::getIdGenerator()->generate());
connection->setSwapThreshold(50);
connection->addRelationship(OutputProcessor::Success);
connection->setSourceUUID(processor->getUUID());
processor->addConnection(connection.get());
- auto processor_node = std::make_shared<core::ProcessorNode>(processor.get());
- auto context = std::make_shared<core::ProcessContext>(processor_node, nullptr, prov_repo, ff_repo, content_repo);
- auto session_factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto processor_node = std::make_shared<core::ProcessorNodeImpl>(processor.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(processor_node, nullptr, prov_repo, ff_repo, content_repo);
+ auto session_factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
for (size_t i = 0; i < 200; ++i) {
processor->triggerAndCommit(context, session_factory);
diff --git a/extensions/script/ExecuteScript.h b/extensions/script/ExecuteScript.h
index 25a843dfb..d6d241abd 100644
--- a/extensions/script/ExecuteScript.h
+++ b/extensions/script/ExecuteScript.h
@@ -33,7 +33,7 @@
#include "ScriptExecutor.h"
#include "utils/Enum.h"
#include "utils/ResourceQueue.h"
-#include "logging/LoggerFactory.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::processors {
@@ -44,10 +44,10 @@ enum class ScriptEngineOption {
};
} // namespace execute_script
-class ExecuteScript : public core::Processor {
+class ExecuteScript : public core::ProcessorImpl {
public:
explicit ExecuteScript(std::string_view name, const utils::Identifier &uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Executes a script given the flow file and a process session. "
diff --git a/extensions/script/ScriptExecutor.h b/extensions/script/ScriptExecutor.h
index b685993b7..1baea83f0 100644
--- a/extensions/script/ScriptExecutor.h
+++ b/extensions/script/ScriptExecutor.h
@@ -20,15 +20,15 @@
#include <string>
#include <variant>
-#include "Core.h"
-#include "ProcessContext.h"
-#include "ProcessSession.h"
+#include "core/Core.h"
+#include "core/ProcessContext.h"
+#include "core/ProcessSession.h"
namespace org::apache::nifi::minifi::extensions::script {
-class ScriptExecutor : public minifi::core::CoreComponent {
+class ScriptExecutor : public minifi::core::CoreComponentImpl {
public:
- ScriptExecutor(const std::string_view name, const utils::Identifier& uuid) : core::CoreComponent(name, uuid) {}
+ ScriptExecutor(const std::string_view name, const utils::Identifier& uuid) : core::CoreComponentImpl(name, uuid) {}
virtual void onTrigger(core::ProcessContext& context, core::ProcessSession& session) = 0;
virtual void initialize(std::filesystem::path script_file,
diff --git a/extensions/sftp/client/SFTPClient.cpp b/extensions/sftp/client/SFTPClient.cpp
index 2e907931a..8ad8ec024 100644
--- a/extensions/sftp/client/SFTPClient.cpp
+++ b/extensions/sftp/client/SFTPClient.cpp
@@ -29,6 +29,8 @@
#include "utils/StringUtils.h"
#include "utils/gsl.h"
+#include "minifi-cpp/io/OutputStream.h"
+#include "minifi-cpp/io/InputStream.h"
namespace org::apache::nifi::minifi::utils {
diff --git a/extensions/sftp/client/SFTPClient.h b/extensions/sftp/client/SFTPClient.h
index 28d9024a8..fc6b66f7a 100644
--- a/extensions/sftp/client/SFTPClient.h
+++ b/extensions/sftp/client/SFTPClient.h
@@ -20,18 +20,23 @@
#include <curl/curl.h>
#include <libssh2.h>
#include <libssh2_sftp.h>
-#include <vector>
+
#include <iostream>
-#include <string>
-#include <tuple>
#include <memory>
#include <optional>
+#include <string>
+#include <tuple>
+#include <vector>
#include "Exception.h"
-#include "utils/Enum.h"
-#include "http/BaseHTTPClient.h"
#include "core/logging/Logger.h"
+#include "http/BaseHTTPClient.h"
+#include "utils/Enum.h"
+namespace org::apache::nifi::minifi::io {
+class OutputStream;
+class InputStream;
+}
namespace org::apache::nifi::minifi::utils {
enum class SFTPError {
diff --git a/extensions/sftp/processors/FetchSFTP.h b/extensions/sftp/processors/FetchSFTP.h
index 021a56544..4bf9cbe70 100644
--- a/extensions/sftp/processors/FetchSFTP.h
+++ b/extensions/sftp/processors/FetchSFTP.h
@@ -29,7 +29,7 @@
#include "core/Property.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
#include "utils/Id.h"
#include "../client/SFTPClient.h"
diff --git a/extensions/sftp/processors/PutSFTP.h b/extensions/sftp/processors/PutSFTP.h
index 4d5dc2b94..5cdeefca9 100644
--- a/extensions/sftp/processors/PutSFTP.h
+++ b/extensions/sftp/processors/PutSFTP.h
@@ -35,7 +35,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "controllers/SSLContextService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/ArrayUtils.h"
#include "utils/Id.h"
#include "../client/SFTPClient.h"
diff --git a/extensions/sftp/processors/SFTPProcessorBase.cpp b/extensions/sftp/processors/SFTPProcessorBase.cpp
index 574ea0685..f8e78e370 100644
--- a/extensions/sftp/processors/SFTPProcessorBase.cpp
+++ b/extensions/sftp/processors/SFTPProcessorBase.cpp
@@ -42,8 +42,8 @@
namespace org::apache::nifi::minifi::processors {
-SFTPProcessorBase::SFTPProcessorBase(std::string_view name, const utils::Identifier& uuid)
- : Processor(name, uuid),
+SFTPProcessorBase::SFTPProcessorBase(const std::string_view name, const utils::Identifier& uuid)
+ : ProcessorImpl(name, uuid),
connection_timeout_(0),
data_timeout_(0),
strict_host_checking_(false),
diff --git a/extensions/sftp/processors/SFTPProcessorBase.h b/extensions/sftp/processors/SFTPProcessorBase.h
index f30b0f21a..9a3bd8846 100644
--- a/extensions/sftp/processors/SFTPProcessorBase.h
+++ b/extensions/sftp/processors/SFTPProcessorBase.h
@@ -38,7 +38,7 @@
namespace org::apache::nifi::minifi::processors {
-class SFTPProcessorBase : public core::Processor {
+class SFTPProcessorBase : public core::ProcessorImpl {
public:
SFTPProcessorBase(std::string_view name, const utils::Identifier& uuid);
~SFTPProcessorBase() override;
diff --git a/extensions/sftp/tests/ListSFTPTests.cpp b/extensions/sftp/tests/ListSFTPTests.cpp
index 8d902503d..1d2bd3e9b 100644
--- a/extensions/sftp/tests/ListSFTPTests.cpp
+++ b/extensions/sftp/tests/ListSFTPTests.cpp
@@ -167,7 +167,7 @@ class ListSFTPTestsFixture {
class PersistentListSFTPTestsFixture : public ListSFTPTestsFixture {
public:
PersistentListSFTPTestsFixture() :
- ListSFTPTestsFixture(std::make_shared<minifi::Configure>()) {
+ ListSFTPTestsFixture(std::make_shared<minifi::ConfigureImpl>()) {
}
};
@@ -555,7 +555,7 @@ TEST_CASE_METHOD(PersistentListSFTPTestsFixture, "ListSFTP Tracking Timestamps r
utils::Identifier list_sftp_uuid = list_sftp->getUUID();
REQUIRE(list_sftp_uuid);
- createPlan(&list_sftp_uuid, std::make_shared<minifi::Configure>());
+ createPlan(&list_sftp_uuid, std::make_shared<minifi::ConfigureImpl>());
plan->setProperty(list_sftp, "Listing Strategy", "Tracking Timestamps");
LogTestController::getInstance().clear();
@@ -597,7 +597,7 @@ TEST_CASE_METHOD(PersistentListSFTPTestsFixture, "ListSFTP Tracking Timestamps r
utils::Identifier list_sftp_uuid = list_sftp->getUUID();
REQUIRE(list_sftp_uuid);
- createPlan(&list_sftp_uuid, std::make_shared<minifi::Configure>());
+ createPlan(&list_sftp_uuid, std::make_shared<minifi::ConfigureImpl>());
plan->setProperty(list_sftp, "Listing Strategy", "Tracking Timestamps");
plan->setProperty(list_sftp, "Remote Path", "/nifi_test");
LogTestController::getInstance().clear();
@@ -836,7 +836,7 @@ TEST_CASE_METHOD(PersistentListSFTPTestsFixture, "ListSFTP Tracking Entities res
utils::Identifier list_sftp_uuid = list_sftp->getUUID();
REQUIRE(list_sftp_uuid);
- createPlan(&list_sftp_uuid, std::make_shared<minifi::Configure>());
+ createPlan(&list_sftp_uuid, std::make_shared<minifi::ConfigureImpl>());
plan->setProperty(list_sftp, "Listing Strategy", "Tracking Entities");
LogTestController::getInstance().clear();
@@ -896,7 +896,7 @@ TEST_CASE_METHOD(PersistentListSFTPTestsFixture, "ListSFTP Tracking Entities res
utils::Identifier list_sftp_uuid = list_sftp->getUUID();
REQUIRE(list_sftp_uuid);
- createPlan(&list_sftp_uuid, std::make_shared<minifi::Configure>());
+ createPlan(&list_sftp_uuid, std::make_shared<minifi::ConfigureImpl>());
plan->setProperty(list_sftp, "Listing Strategy", "Tracking Entities");
plan->setProperty(list_sftp, "Remote Path", "/nifi_test");
LogTestController::getInstance().clear();
diff --git a/extensions/sftp/tests/tools/SFTPTestServer.h b/extensions/sftp/tests/tools/SFTPTestServer.h
index fb540e1be..421582134 100644
--- a/extensions/sftp/tests/tools/SFTPTestServer.h
+++ b/extensions/sftp/tests/tools/SFTPTestServer.h
@@ -27,7 +27,7 @@
#endif
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
std::filesystem::path get_sftp_test_dir();
diff --git a/extensions/smb/FetchSmb.h b/extensions/smb/FetchSmb.h
index 7b50c6595..54c794e8a 100644
--- a/extensions/smb/FetchSmb.h
+++ b/extensions/smb/FetchSmb.h
@@ -29,7 +29,7 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/OutputAttributeDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "utils/ListingStateManager.h"
#include "utils/file/ListedFile.h"
@@ -37,10 +37,10 @@
namespace org::apache::nifi::minifi::extensions::smb {
-class FetchSmb : public core::Processor {
+class FetchSmb final : public core::ProcessorImpl {
public:
- explicit FetchSmb(std::string name, const utils::Identifier& uuid = {})
- : core::Processor(std::move(name), uuid) {
+ explicit FetchSmb(const std::string_view name, const utils::Identifier& uuid = {})
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Fetches files from a SMB Share. Designed to be used in tandem with ListSmb.";
diff --git a/extensions/smb/ListSmb.h b/extensions/smb/ListSmb.h
index ddb4409fd..ae2f9def6 100644
--- a/extensions/smb/ListSmb.h
+++ b/extensions/smb/ListSmb.h
@@ -29,7 +29,7 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/OutputAttributeDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "utils/ListingStateManager.h"
#include "utils/file/ListedFile.h"
@@ -37,10 +37,10 @@
namespace org::apache::nifi::minifi::extensions::smb {
-class ListSmb : public core::Processor {
+class ListSmb : public core::ProcessorImpl {
public:
- explicit ListSmb(std::string name, const utils::Identifier& uuid = {})
- : core::Processor(std::move(name), uuid) {
+ explicit ListSmb(std::string_view name, const utils::Identifier& uuid = {})
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Retrieves a listing of files from an SMB share. For each file that is listed, "
diff --git a/extensions/smb/PutSmb.cpp b/extensions/smb/PutSmb.cpp
index 2b20ce0e8..507629e54 100644
--- a/extensions/smb/PutSmb.cpp
+++ b/extensions/smb/PutSmb.cpp
@@ -22,6 +22,7 @@
#include "utils/OsUtils.h"
#include "utils/file/FileWriterCallback.h"
#include "core/Resource.h"
+#include "utils/file/FileUtils.h"
namespace org::apache::nifi::minifi::extensions::smb {
diff --git a/extensions/smb/PutSmb.h b/extensions/smb/PutSmb.h
index c25e38f33..cb29d5c80 100644
--- a/extensions/smb/PutSmb.h
+++ b/extensions/smb/PutSmb.h
@@ -25,14 +25,14 @@
#include "core/ProcessSession.h"
#include "utils/Enum.h"
#include "SmbConnectionControllerService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::extensions::smb {
-class PutSmb : public core::Processor {
+class PutSmb final : public core::ProcessorImpl {
public:
- explicit PutSmb(std::string name, const utils::Identifier& uuid = {})
- : core::Processor(std::move(name), uuid) {
+ explicit PutSmb(const std::string_view name, const utils::Identifier& uuid = {})
+ : core::ProcessorImpl(name, uuid) {
}
enum class FileExistsResolutionStrategy {
diff --git a/extensions/smb/SmbConnectionControllerService.h b/extensions/smb/SmbConnectionControllerService.h
index ae05c62ba..8522e027d 100644
--- a/extensions/smb/SmbConnectionControllerService.h
+++ b/extensions/smb/SmbConnectionControllerService.h
@@ -20,18 +20,21 @@
#include <string>
#include <memory>
-#include "ProcessContext.h"
+#include "Windows.h"
+#include "winnetwk.h"
+
+#include "core/ProcessContext.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/controller/ControllerService.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "utils/expected.h"
namespace org::apache::nifi::minifi::extensions::smb {
-class SmbConnectionControllerService : public core::controller::ControllerService {
+class SmbConnectionControllerService : public core::controller::ControllerServiceImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "SMB Connection Controller Service";
@@ -70,7 +73,7 @@ class SmbConnectionControllerService : public core::controller::ControllerServic
EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
- using ControllerService::ControllerService;
+ using ControllerServiceImpl::ControllerServiceImpl;
void initialize() override;
diff --git a/extensions/smb/tests/FetchSmbTests.cpp b/extensions/smb/tests/FetchSmbTests.cpp
index 8fd05c8c4..0fe708167 100644
--- a/extensions/smb/tests/FetchSmbTests.cpp
+++ b/extensions/smb/tests/FetchSmbTests.cpp
@@ -22,7 +22,7 @@
#include "SmbConnectionControllerService.h"
#include "utils/MockSmbConnectionControllerService.h"
#include "unit/SingleProcessorTestController.h"
-#include "OsUtils.h"
+#include "utils/OsUtils.h"
#include "core/Resource.h"
namespace org::apache::nifi::minifi::extensions::smb::test {
diff --git a/extensions/splunk/SplunkHECProcessor.h b/extensions/splunk/SplunkHECProcessor.h
index 7df54b9aa..24f3574a7 100644
--- a/extensions/splunk/SplunkHECProcessor.h
+++ b/extensions/splunk/SplunkHECProcessor.h
@@ -34,7 +34,7 @@ class HTTPClient;
namespace org::apache::nifi::minifi::extensions::splunk {
-class SplunkHECProcessor : public core::Processor {
+class SplunkHECProcessor : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto Hostname = core::PropertyDefinitionBuilder<>::createProperty("Hostname")
.withDescription("The ip address or hostname of the Splunk server.")
@@ -71,7 +71,7 @@ class SplunkHECProcessor : public core::Processor {
explicit SplunkHECProcessor(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
~SplunkHECProcessor() override = default;
diff --git a/extensions/splunk/tests/MockSplunkHEC.h b/extensions/splunk/tests/MockSplunkHEC.h
index 53b548ba1..13bce3990 100644
--- a/extensions/splunk/tests/MockSplunkHEC.h
+++ b/extensions/splunk/tests/MockSplunkHEC.h
@@ -24,7 +24,7 @@
#include <CivetServer.h>
#include "integration/CivetLibrary.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
diff --git a/extensions/sql/data/SociConnectors.cpp b/extensions/sql/data/SociConnectors.cpp
index 9bdc626e8..4ed36708b 100644
--- a/extensions/sql/data/SociConnectors.cpp
+++ b/extensions/sql/data/SociConnectors.cpp
@@ -17,7 +17,7 @@
*/
#include "SociConnectors.h"
-#include "logging/LoggerFactory.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::sql {
diff --git a/extensions/sql/data/SociConnectors.h b/extensions/sql/data/SociConnectors.h
index f590ccf73..7c43328d6 100644
--- a/extensions/sql/data/SociConnectors.h
+++ b/extensions/sql/data/SociConnectors.h
@@ -26,7 +26,7 @@
#include "data/DatabaseConnectors.h"
#include <soci/soci.h>
#include <soci/odbc/soci-odbc.h>
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
namespace org::apache::nifi::minifi::sql {
diff --git a/extensions/sql/processors/FlowFileSource.h b/extensions/sql/processors/FlowFileSource.h
index 19310eba4..4da2d0732 100644
--- a/extensions/sql/processors/FlowFileSource.h
+++ b/extensions/sql/processors/FlowFileSource.h
@@ -26,7 +26,7 @@
#include "core/PropertyType.h"
#include "utils/Enum.h"
#include "data/SQLRowsetProcessor.h"
-#include "ProcessSession.h"
+#include "core/ProcessSession.h"
#include "data/JSONSQLWriter.h"
namespace org::apache::nifi::minifi::processors::flow_file_source {
diff --git a/extensions/sql/processors/SQLProcessor.h b/extensions/sql/processors/SQLProcessor.h
index c6ce3b5aa..ea326a99a 100644
--- a/extensions/sql/processors/SQLProcessor.h
+++ b/extensions/sql/processors/SQLProcessor.h
@@ -31,7 +31,7 @@
namespace org::apache::nifi::minifi::processors {
-class SQLProcessor: public core::Processor {
+class SQLProcessor: public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr auto DBControllerService = core::PropertyDefinitionBuilder<>::createProperty("DB Controller Service")
.withDescription("Database Controller Service.")
@@ -42,7 +42,7 @@ class SQLProcessor: public core::Processor {
protected:
SQLProcessor(std::string_view name, const utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger)
- : core::Processor(name, uuid), logger_(std::move(logger)) {
+ : core::ProcessorImpl(name, uuid), logger_(std::move(logger)) {
}
static std::vector<std::string> collectArguments(const std::shared_ptr<core::FlowFile>& flow_file);
diff --git a/extensions/sql/services/DatabaseService.cpp b/extensions/sql/services/DatabaseService.cpp
index ce3c0fb10..9c95b724f 100644
--- a/extensions/sql/services/DatabaseService.cpp
+++ b/extensions/sql/services/DatabaseService.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/controller/ControllerService.h"
#include <string>
#include <memory>
@@ -33,7 +33,7 @@ void DatabaseService::initialize() {
return;
}
- ControllerService::initialize();
+ ControllerServiceImpl::initialize();
initializeProperties();
diff --git a/extensions/sql/services/DatabaseService.h b/extensions/sql/services/DatabaseService.h
index 043d0418c..0679d476e 100644
--- a/extensions/sql/services/DatabaseService.h
+++ b/extensions/sql/services/DatabaseService.h
@@ -21,7 +21,7 @@
#include <unordered_map>
#include <utility>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/controller/ControllerService.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
@@ -34,19 +34,19 @@ namespace org::apache::nifi::minifi::sql::controllers {
* services to internal services. While a controller service is generally configured from the flow,
* we want to follow the open closed principle and provide Database services
*/
-class DatabaseService : public core::controller::ControllerService {
+class DatabaseService : public core::controller::ControllerServiceImpl {
public:
- explicit DatabaseService(std::string_view name, const utils::Identifier &uuid = {})
- : ControllerService(name, uuid),
+ explicit DatabaseService(const std::string_view name, const utils::Identifier &uuid = {})
+ : ControllerServiceImpl(name, uuid),
initialized_(false) {
- initialize();
+ DatabaseService::initialize();
}
- explicit DatabaseService(std::string_view name, const std::shared_ptr<Configure> &configuration)
- : ControllerService(name),
+ explicit DatabaseService(const std::string_view name, const std::shared_ptr<Configure> &configuration)
+ : ControllerServiceImpl(name),
initialized_(false) {
- setConfiguration(configuration);
- initialize();
+ ControllerServiceImpl::setConfiguration(configuration);
+ DatabaseService::initialize();
}
/**
diff --git a/extensions/sql/services/ODBCConnector.h b/extensions/sql/services/ODBCConnector.h
index ebc449886..5c3e6d845 100644
--- a/extensions/sql/services/ODBCConnector.h
+++ b/extensions/sql/services/ODBCConnector.h
@@ -21,7 +21,7 @@
#include <string>
#include <utility>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/controller/ControllerService.h"
#include "DatabaseService.h"
@@ -34,17 +34,17 @@ namespace org::apache::nifi::minifi::sql::controllers {
* services to internal services. While a controller service is generally configured from the flow,
* we want to follow the open closed principle and provide Database services
*/
-class ODBCService : public DatabaseService {
+class ODBCService final : public DatabaseService {
public:
- explicit ODBCService(std::string name, const utils::Identifier &uuid = {})
- : DatabaseService(std::move(name), uuid) {
- initialize();
+ explicit ODBCService(const std::string_view name, const utils::Identifier &uuid = {})
+ : DatabaseService(name, uuid) {
+ DatabaseService::initialize();
}
- explicit ODBCService(std::string_view name, const std::shared_ptr<Configure> &configuration)
+ explicit ODBCService(const std::string_view name, const std::shared_ptr<Configure> &configuration)
: DatabaseService(name) {
- setConfiguration(configuration);
- initialize();
+ ControllerServiceImpl::setConfiguration(configuration);
+ DatabaseService::initialize();
}
EXTENSIONAPI static constexpr const char* Description = "Controller service that provides ODBC database connection";
diff --git a/extensions/sql/tests/SQLTestPlan.h b/extensions/sql/tests/SQLTestPlan.h
index aebe51b2b..4af814634 100644
--- a/extensions/sql/tests/SQLTestPlan.h
+++ b/extensions/sql/tests/SQLTestPlan.h
@@ -58,12 +58,12 @@ class SQLTestPlan {
}
std::shared_ptr<core::FlowFile> addInput(std::initializer_list<std::pair<std::string, std::string>> attributes = {}, const std::optional<std::string>& content = {}) {
- auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
for (const auto& attr : attributes) {
flow_file->setAttribute(attr.first, attr.second);
}
if (content) {
- auto claim = std::make_shared<minifi::ResourceClaim>(plan_->getContentRepo());
+ auto claim = std::make_shared<minifi::ResourceClaimImpl>(plan_->getContentRepo());
auto content_stream = plan_->getContentRepo()->write(*claim);
const auto ret = content_stream->write(reinterpret_cast<const uint8_t*>(content->c_str()), content->length());
REQUIRE(ret == content->length());
diff --git a/extensions/standard-processors/controllers/JsonRecordSetReader.h b/extensions/standard-processors/controllers/JsonRecordSetReader.h
index 4dae262b8..26ae7a4ce 100644
--- a/extensions/standard-processors/controllers/JsonRecordSetReader.h
+++ b/extensions/standard-processors/controllers/JsonRecordSetReader.h
@@ -16,16 +16,15 @@
*/
#pragma once
-#include "Record.h"
#include "controllers/RecordSetReader.h"
#include "core/FlowFile.h"
#include "core/ProcessSession.h"
namespace org::apache::nifi::minifi::standard {
-class JsonRecordSetReader final : public core::RecordSetReader {
+class JsonRecordSetReader final : public core::RecordSetReaderImpl {
public:
- explicit JsonRecordSetReader(const std::string_view name, const utils::Identifier& uuid = {}) : RecordSetReader(name, uuid) {}
+ explicit JsonRecordSetReader(const std::string_view name, const utils::Identifier& uuid = {}) : RecordSetReaderImpl(name, uuid) {}
JsonRecordSetReader(JsonRecordSetReader&&) = delete;
JsonRecordSetReader(const JsonRecordSetReader&) = delete;
diff --git a/extensions/standard-processors/controllers/JsonRecordSetWriter.h b/extensions/standard-processors/controllers/JsonRecordSetWriter.h
index 8da60ab8d..23f1a5e91 100644
--- a/extensions/standard-processors/controllers/JsonRecordSetWriter.h
+++ b/extensions/standard-processors/controllers/JsonRecordSetWriter.h
@@ -16,8 +16,7 @@
*/
#pragma once
-#include "PropertyDefinitionBuilder.h"
-#include "Record.h"
+#include "core/PropertyDefinitionBuilder.h"
#include "controllers/RecordSetWriter.h"
#include "core/FlowFile.h"
#include "core/ProcessSession.h"
@@ -47,9 +46,9 @@ constexpr customize_t enum_name<OutputGroupingType>(OutputGroupingType value) no
namespace org::apache::nifi::minifi::standard {
-class JsonRecordSetWriter final : public core::RecordSetWriter {
+class JsonRecordSetWriter final : public core::RecordSetWriterImpl {
public:
- explicit JsonRecordSetWriter(const std::string_view name, const utils::Identifier& uuid = {}) : RecordSetWriter(name, uuid) {}
+ explicit JsonRecordSetWriter(const std::string_view name, const utils::Identifier& uuid = {}) : RecordSetWriterImpl(name, uuid) {}
JsonRecordSetWriter(JsonRecordSetWriter&&) = delete;
JsonRecordSetWriter(const JsonRecordSetWriter&) = delete;
diff --git a/extensions/standard-processors/controllers/PersistentMapStateStorage.cpp b/extensions/standard-processors/controllers/PersistentMapStateStorage.cpp
index 0765fdf78..024f42a9a 100644
--- a/extensions/standard-processors/controllers/PersistentMapStateStorage.cpp
+++ b/extensions/standard-processors/controllers/PersistentMapStateStorage.cpp
@@ -121,7 +121,7 @@ bool PersistentMapStateStorage::parseLine(const std::string& line, std::string&
void PersistentMapStateStorage::initialize() {
// VolatileMapStateStorage::initialize() also calls setSupportedProperties, and we don't want that
- ControllerService::initialize(); // NOLINT(bugprone-parent-virtual-call)
+ ControllerServiceImpl::initialize(); // NOLINT(bugprone-parent-virtual-call)
setSupportedProperties(Properties);
}
diff --git a/extensions/standard-processors/controllers/PersistentMapStateStorage.h b/extensions/standard-processors/controllers/PersistentMapStateStorage.h
index 065fcca41..86096a07b 100644
--- a/extensions/standard-processors/controllers/PersistentMapStateStorage.h
+++ b/extensions/standard-processors/controllers/PersistentMapStateStorage.h
@@ -22,13 +22,13 @@
#include <memory>
#include <utility>
-#include "controllers/keyvalue/AutoPersistor.h"
+#include "utils/AutoPersistor.h"
#include "core/Core.h"
#include "properties/Configure.h"
#include "InMemoryKeyValueStorage.h"
#include "controllers/keyvalue/KeyValueStateStorage.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
diff --git a/extensions/standard-processors/controllers/VolatileMapStateStorage.cpp b/extensions/standard-processors/controllers/VolatileMapStateStorage.cpp
index b8eb9e391..1f7a375ce 100644
--- a/extensions/standard-processors/controllers/VolatileMapStateStorage.cpp
+++ b/extensions/standard-processors/controllers/VolatileMapStateStorage.cpp
@@ -30,7 +30,7 @@ VolatileMapStateStorage::VolatileMapStateStorage(const std::string& name, const
}
void VolatileMapStateStorage::initialize() {
- ControllerService::initialize();
+ ControllerServiceImpl::initialize();
setSupportedProperties(Properties);
}
diff --git a/extensions/standard-processors/controllers/VolatileMapStateStorage.h b/extensions/standard-processors/controllers/VolatileMapStateStorage.h
index 2e8c8f064..e5572cf38 100644
--- a/extensions/standard-processors/controllers/VolatileMapStateStorage.h
+++ b/extensions/standard-processors/controllers/VolatileMapStateStorage.h
@@ -25,7 +25,7 @@
#include "core/Core.h"
#include "properties/Configure.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "controllers/keyvalue/KeyValueStateStorage.h"
diff --git a/extensions/standard-processors/modbus/FetchModbusTcp.cpp b/extensions/standard-processors/modbus/FetchModbusTcp.cpp
index cb2a28494..0d48196d4 100644
--- a/extensions/standard-processors/modbus/FetchModbusTcp.cpp
+++ b/extensions/standard-processors/modbus/FetchModbusTcp.cpp
@@ -26,6 +26,7 @@
#include "modbus/ReadModbusFunctions.h"
#include "utils/net/AsioCoro.h"
#include "utils/net/AsioSocketUtils.h"
+#include "io/validation.h"
using namespace std::literals::chrono_literals;
diff --git a/extensions/standard-processors/modbus/FetchModbusTcp.h b/extensions/standard-processors/modbus/FetchModbusTcp.h
index 229bac411..bcac23423 100644
--- a/extensions/standard-processors/modbus/FetchModbusTcp.h
+++ b/extensions/standard-processors/modbus/FetchModbusTcp.h
@@ -20,7 +20,7 @@
#include "controllers/RecordSetWriter.h"
#include "core/Processor.h"
#include "core/PropertyDefinitionBuilder.h"
-#include "logging/LoggerFactory.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/net/AsioCoro.h"
#include "utils/net/AsioSocketUtils.h"
#include "utils/net/ConnectionHandlerBase.h"
@@ -29,10 +29,10 @@ namespace org::apache::nifi::minifi::modbus {
class ReadModbusFunction;
-class FetchModbusTcp final : public core::Processor {
+class FetchModbusTcp final : public core::ProcessorImpl {
public:
explicit FetchModbusTcp(const std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr auto Description = "Processor able to read data from industrial PLCs using Modbus TCP/IP";
diff --git a/extensions/standard-processors/modbus/ReadModbusFunctions.h b/extensions/standard-processors/modbus/ReadModbusFunctions.h
index d96e3d09b..8433c7352 100644
--- a/extensions/standard-processors/modbus/ReadModbusFunctions.h
+++ b/extensions/standard-processors/modbus/ReadModbusFunctions.h
@@ -21,7 +21,7 @@
#include <regex>
#include <vector>
-#include "core/RecordField.h"
+#include "minifi-cpp/core/RecordField.h"
#include "fmt/format.h"
#include "modbus/ByteConverters.h"
#include "modbus/Error.h"
diff --git a/extensions/standard-processors/processors/AppendHostInfo.cpp b/extensions/standard-processors/processors/AppendHostInfo.cpp
index b2d0b3f29..33d919686 100644
--- a/extensions/standard-processors/processors/AppendHostInfo.cpp
+++ b/extensions/standard-processors/processors/AppendHostInfo.cpp
@@ -31,7 +31,7 @@
#include "core/ProcessSession.h"
#include "core/FlowFile.h"
#include "core/Resource.h"
-#include "utils/NetworkInterfaceInfo.h"
+#include "utils/net/NetworkInterfaceInfo.h"
#include "utils/net/DNS.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/standard-processors/processors/AppendHostInfo.h b/extensions/standard-processors/processors/AppendHostInfo.h
index f2a91e0c6..008717ace 100644
--- a/extensions/standard-processors/processors/AppendHostInfo.h
+++ b/extensions/standard-processors/processors/AppendHostInfo.h
@@ -27,23 +27,22 @@
#include <utility>
#include "core/Property.h"
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Export.h"
namespace org::apache::nifi::minifi::processors {
-class AppendHostInfo : public core::Processor {
+class AppendHostInfo : public core::ProcessorImpl {
public:
static constexpr const char* REFRESH_POLICY_ON_TRIGGER = "On every trigger";
static constexpr const char* REFRESH_POLICY_ON_SCHEDULE = "On schedule";
explicit AppendHostInfo(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~AppendHostInfo() override = default;
diff --git a/extensions/standard-processors/processors/AttributeRollingWindow.h b/extensions/standard-processors/processors/AttributeRollingWindow.h
index a1a74cf26..3a42afb55 100644
--- a/extensions/standard-processors/processors/AttributeRollingWindow.h
+++ b/extensions/standard-processors/processors/AttributeRollingWindow.h
@@ -30,7 +30,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "RollingWindow.h"
-#include "StateManager.h"
+#include "core/StateManager.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/standard-processors/processors/AttributesToJSON.h b/extensions/standard-processors/processors/AttributesToJSON.h
index b7c4568fc..48cf6d82c 100644
--- a/extensions/standard-processors/processors/AttributesToJSON.h
+++ b/extensions/standard-processors/processors/AttributesToJSON.h
@@ -29,7 +29,7 @@
#include "rapidjson/document.h"
#include "core/FlowFile.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
@@ -64,7 +64,7 @@ constexpr customize_t enum_name<WriteDestination>(WriteDestination value) noexce
namespace org::apache::nifi::minifi::processors {
-class AttributesToJSON : public core::Processor {
+class AttributesToJSON : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Generates a JSON representation of the input FlowFile Attributes. "
"The resulting JSON can be written to either a new Attribute 'JSONAttributes' or written to the FlowFile as content.";
@@ -117,7 +117,7 @@ class AttributesToJSON : public core::Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS
explicit AttributesToJSON(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
void initialize() override;
diff --git a/extensions/standard-processors/processors/DefragmentText.cpp b/extensions/standard-processors/processors/DefragmentText.cpp
index 6d262f11c..a392c7940 100644
--- a/extensions/standard-processors/processors/DefragmentText.cpp
+++ b/extensions/standard-processors/processors/DefragmentText.cpp
@@ -195,7 +195,7 @@ void DefragmentText::restore(const std::shared_ptr<core::FlowFile>& flowFile) {
}
std::set<core::Connectable*> DefragmentText::getOutGoingConnections(const std::string &relationship) {
- auto result = core::Connectable::getOutGoingConnections(relationship);
+ auto result = core::ConnectableImpl::getOutGoingConnections(relationship);
if (relationship == Self.getName()) {
result.insert(this);
}
diff --git a/extensions/standard-processors/processors/DefragmentText.h b/extensions/standard-processors/processors/DefragmentText.h
index 9d75526ed..5f2da04e0 100644
--- a/extensions/standard-processors/processors/DefragmentText.h
+++ b/extensions/standard-processors/processors/DefragmentText.h
@@ -26,7 +26,7 @@
#include "core/Processor.h"
#include "core/FlowFileStore.h"
#include "core/logging/Logger.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "utils/Enum.h"
@@ -57,10 +57,10 @@ constexpr customize_t enum_name<PatternLocation>(PatternLocation value) noexcept
namespace org::apache::nifi::minifi::processors {
-class DefragmentText : public core::Processor {
+class DefragmentText : public core::ProcessorImpl {
public:
explicit DefragmentText(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "DefragmentText splits and merges incoming flowfiles so cohesive messages are not split between them. "
diff --git a/extensions/standard-processors/processors/ExtractText.h b/extensions/standard-processors/processors/ExtractText.h
index 8dd5f34e6..574581a3d 100644
--- a/extensions/standard-processors/processors/ExtractText.h
+++ b/extensions/standard-processors/processors/ExtractText.h
@@ -31,15 +31,14 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "FlowFileRecord.h"
#include "utils/Export.h"
namespace org::apache::nifi::minifi::processors {
-class ExtractText : public core::Processor {
+class ExtractText : public core::ProcessorImpl {
public:
explicit ExtractText(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
// Default maximum bytes to read into an attribute
diff --git a/extensions/standard-processors/processors/FetchFile.h b/extensions/standard-processors/processors/FetchFile.h
index b6bfbe9c2..7103a4950 100644
--- a/extensions/standard-processors/processors/FetchFile.h
+++ b/extensions/standard-processors/processors/FetchFile.h
@@ -26,7 +26,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
#include "utils/Enum.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/LogUtils.h"
namespace org::apache::nifi::minifi::processors::fetch_file {
@@ -82,10 +82,10 @@ constexpr customize_t enum_name<MoveConflictStrategyOption>(MoveConflictStrategy
namespace org::apache::nifi::minifi::processors {
-class FetchFile final : public core::Processor {
+class FetchFile final : public core::ProcessorImpl {
public:
explicit FetchFile(const std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Reads the contents of a file from disk and streams it into the contents of an incoming FlowFile. "
diff --git a/extensions/standard-processors/processors/GenerateFlowFile.h b/extensions/standard-processors/processors/GenerateFlowFile.h
index cad866caf..ef013c877 100644
--- a/extensions/standard-processors/processors/GenerateFlowFile.h
+++ b/extensions/standard-processors/processors/GenerateFlowFile.h
@@ -24,7 +24,6 @@
#include <utility>
#include <vector>
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
@@ -37,10 +36,10 @@
namespace org::apache::nifi::minifi::processors {
-class GenerateFlowFile : public core::Processor {
+class GenerateFlowFile : public core::ProcessorImpl {
public:
explicit GenerateFlowFile(const std::string_view name, const utils::Identifier& uuid = {}) // NOLINT
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
~GenerateFlowFile() override = default;
diff --git a/extensions/standard-processors/processors/GetFile.cpp b/extensions/standard-processors/processors/GetFile.cpp
index c3f901c35..cf3a0c9c8 100644
--- a/extensions/standard-processors/processors/GetFile.cpp
+++ b/extensions/standard-processors/processors/GetFile.cpp
@@ -196,7 +196,8 @@ bool GetFile::fileMatchesRequestCriteria(const std::filesystem::path& full_name,
return false;
}
- auto* const getfile_metrics = static_cast<GetFileMetrics*>(metrics_.get());
+ auto* const getfile_metrics = dynamic_cast<GetFileMetrics*>(metrics_.get());
+ gsl_Assert(getfile_metrics);
getfile_metrics->input_bytes += file_size;
++getfile_metrics->accepted_files;
return true;
diff --git a/extensions/standard-processors/processors/GetFile.h b/extensions/standard-processors/processors/GetFile.h
index 6cd55d2f3..306fd514a 100644
--- a/extensions/standard-processors/processors/GetFile.h
+++ b/extensions/standard-processors/processors/GetFile.h
@@ -24,8 +24,6 @@
#include <atomic>
#include <utility>
-#include "core/state/nodes/MetricsBase.h"
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
@@ -33,8 +31,9 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Export.h"
+#include "core/ProcessorMetrics.h"
namespace org::apache::nifi::minifi::processors {
@@ -52,14 +51,14 @@ struct GetFileRequest {
std::filesystem::path inputDirectory;
};
-class GetFileMetrics : public core::ProcessorMetrics {
+class GetFileMetrics : public core::ProcessorMetricsImpl {
public:
explicit GetFileMetrics(const core::Processor& source_processor)
- : core::ProcessorMetrics(source_processor) {
+ : core::ProcessorMetricsImpl(source_processor) {
}
std::vector<state::response::SerializedResponseNode> serialize() override {
- auto resp = core::ProcessorMetrics::serialize();
+ auto resp = core::ProcessorMetricsImpl::serialize();
auto& root_node = resp[0];
state::response::SerializedResponseNode accepted_files_node{"AcceptedFiles", accepted_files.load()};
@@ -72,7 +71,7 @@ class GetFileMetrics : public core::ProcessorMetrics {
}
std::vector<state::PublishedMetric> calculateMetrics() override {
- auto metrics = core::ProcessorMetrics::calculateMetrics();
+ auto metrics = core::ProcessorMetricsImpl::calculateMetrics();
metrics.push_back({"accepted_files", static_cast<double>(accepted_files.load()), getCommonLabels()});
metrics.push_back({"input_bytes", static_cast<double>(input_bytes.load()), getCommonLabels()});
return metrics;
@@ -82,10 +81,11 @@ class GetFileMetrics : public core::ProcessorMetrics {
std::atomic<uint64_t> input_bytes{0};
};
-class GetFile : public core::Processor {
+class GetFile : public core::ProcessorImpl {
public:
explicit GetFile(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid, std::make_shared<GetFileMetrics>(*this)) {
+ : ProcessorImpl(name, uuid) {
+ metrics_ = gsl::make_not_null(std::make_shared<GetFileMetrics>(*this));
}
~GetFile() override = default;
diff --git a/extensions/standard-processors/processors/GetTCP.cpp b/extensions/standard-processors/processors/GetTCP.cpp
index db4e8e175..19cd60d34 100644
--- a/extensions/standard-processors/processors/GetTCP.cpp
+++ b/extensions/standard-processors/processors/GetTCP.cpp
@@ -28,7 +28,6 @@
#include "utils/StringUtils.h"
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
-#include "core/ProcessSessionFactory.h"
#include "core/Resource.h"
using namespace std::literals::chrono_literals;
diff --git a/extensions/standard-processors/processors/GetTCP.h b/extensions/standard-processors/processors/GetTCP.h
index d2782a892..d17a24274 100644
--- a/extensions/standard-processors/processors/GetTCP.h
+++ b/extensions/standard-processors/processors/GetTCP.h
@@ -26,9 +26,7 @@
#include <asio/io_context.hpp>
#include "utils/Literals.h"
-#include "../core/state/nodes/MetricsBase.h"
-#include "FlowFileRecord.h"
-#include "core/OutputAttributeDefinition.h"
+#include "minifi-cpp/core/OutputAttributeDefinition.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
@@ -37,7 +35,7 @@
#include "core/Core.h"
#include "concurrentqueue.h"
#include "utils/ThreadPool.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "controllers/SSLContextService.h"
#include "utils/gsl.h"
#include "utils/Export.h"
@@ -46,10 +44,10 @@
namespace org::apache::nifi::minifi::processors {
-class GetTCP : public core::Processor {
+class GetTCP : public core::ProcessorImpl {
public:
explicit GetTCP(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
~GetTCP() override {
diff --git a/extensions/standard-processors/processors/HashContent.h b/extensions/standard-processors/processors/HashContent.h
index efc850ee4..865f84e0f 100644
--- a/extensions/standard-processors/processors/HashContent.h
+++ b/extensions/standard-processors/processors/HashContent.h
@@ -32,7 +32,6 @@
#include <sstream>
#include <utility>
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
@@ -135,10 +134,10 @@ namespace org::apache::nifi::minifi::processors {
static const std::map<std::string, const std::function<HashReturnType(const std::shared_ptr<io::InputStream>&)>> HashAlgos =
{ {"MD5", MD5Hash}, {"SHA1", SHA1Hash}, {"SHA256", SHA256Hash} };
-class HashContent : public core::Processor {
+class HashContent : public core::ProcessorImpl {
public:
explicit HashContent(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "HashContent calculates the checksum of the content of the flowfile and adds it as an attribute. "
diff --git a/extensions/standard-processors/processors/InvokeHTTP.h b/extensions/standard-processors/processors/InvokeHTTP.h
index 46caabdf6..13406a8c5 100644
--- a/extensions/standard-processors/processors/InvokeHTTP.h
+++ b/extensions/standard-processors/processors/InvokeHTTP.h
@@ -26,19 +26,18 @@
#include <optional>
#include <list>
-#include "Core.h"
-#include "FlowFileRecord.h"
+#include "core/Core.h"
#include "core/OutputAttributeDefinition.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinitionBuilder.h"
-#include "PropertyType.h"
+#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "controllers/SSLContextService.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Id.h"
#include "utils/ResourceQueue.h"
-#include "../http/HTTPClient.h"
+#include "http/HTTPClient.h"
#include "utils/Export.h"
#include "utils/Enum.h"
#include "utils/RegexUtils.h"
@@ -106,7 +105,7 @@ enum class InvalidHTTPHeaderFieldHandlingOption {
};
} // namespace invoke_http
-class InvokeHTTP : public core::Processor {
+class InvokeHTTP : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr std::string_view STATUS_CODE = "invokehttp.status.code";
EXTENSIONAPI static constexpr std::string_view STATUS_MESSAGE = "invokehttp.status.message";
@@ -114,7 +113,7 @@ class InvokeHTTP : public core::Processor {
EXTENSIONAPI static constexpr std::string_view TRANSACTION_ID = "invokehttp.tx.id";
explicit InvokeHTTP(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
setTriggerWhenEmpty(true);
}
diff --git a/extensions/standard-processors/processors/JoltTransformJSON.h b/extensions/standard-processors/processors/JoltTransformJSON.h
index db0c8f21d..dc8619da4 100644
--- a/extensions/standard-processors/processors/JoltTransformJSON.h
+++ b/extensions/standard-processors/processors/JoltTransformJSON.h
@@ -35,10 +35,10 @@ enum class JoltTransform {
namespace org::apache::nifi::minifi::processors {
-class JoltTransformJSON : public core::Processor {
+class JoltTransformJSON : public core::ProcessorImpl {
public:
explicit JoltTransformJSON(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {}
+ : ProcessorImpl(name, uuid) {}
EXTENSIONAPI static constexpr const char* Description = "Applies a list of Jolt specifications to the flowfile JSON payload. A new FlowFile is created "
diff --git a/extensions/standard-processors/processors/ListFile.h b/extensions/standard-processors/processors/ListFile.h
index 365006419..da8642166 100644
--- a/extensions/standard-processors/processors/ListFile.h
+++ b/extensions/standard-processors/processors/ListFile.h
@@ -28,7 +28,7 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "utils/ListingStateManager.h"
#include "utils/file/ListedFile.h"
@@ -36,10 +36,10 @@
namespace org::apache::nifi::minifi::processors {
-class ListFile : public core::Processor {
+class ListFile : public core::ProcessorImpl {
public:
explicit ListFile(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Retrieves a listing of files from the local filesystem. For each file that is listed, "
diff --git a/extensions/standard-processors/processors/ListenSyslog.h b/extensions/standard-processors/processors/ListenSyslog.h
index 14ee92723..911911dbe 100644
--- a/extensions/standard-processors/processors/ListenSyslog.h
+++ b/extensions/standard-processors/processors/ListenSyslog.h
@@ -23,8 +23,9 @@
#include <memory>
#include <regex>
+#include "controllers/SSLContextService.h"
#include "NetworkListenerProcessor.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/OutputAttributeDefinition.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
diff --git a/extensions/standard-processors/processors/ListenTCP.h b/extensions/standard-processors/processors/ListenTCP.h
index d8c4b1e5f..3d3187d1c 100644
--- a/extensions/standard-processors/processors/ListenTCP.h
+++ b/extensions/standard-processors/processors/ListenTCP.h
@@ -20,9 +20,10 @@
#include <string>
#include <utility>
+#include "controllers/SSLContextService.h"
#include "NetworkListenerProcessor.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/OutputAttributeDefinition.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
diff --git a/extensions/standard-processors/processors/ListenUDP.h b/extensions/standard-processors/processors/ListenUDP.h
index 804d7a6e9..b78484fbe 100644
--- a/extensions/standard-processors/processors/ListenUDP.h
+++ b/extensions/standard-processors/processors/ListenUDP.h
@@ -20,8 +20,8 @@
#include <string>
#include "NetworkListenerProcessor.h"
-#include "OutputAttributeDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/OutputAttributeDefinition.h"
+#include "core/logging/LoggerFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
diff --git a/extensions/standard-processors/processors/LogAttribute.h b/extensions/standard-processors/processors/LogAttribute.h
index e1a6efe15..2cb4ba62d 100644
--- a/extensions/standard-processors/processors/LogAttribute.h
+++ b/extensions/standard-processors/processors/LogAttribute.h
@@ -24,7 +24,6 @@
#include <utility>
#include <vector>
-#include "FlowFileRecord.h"
#include "core/Core.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
@@ -32,15 +31,15 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Export.h"
namespace org::apache::nifi::minifi::processors {
-class LogAttribute : public core::Processor {
+class LogAttribute : public core::ProcessorImpl {
public:
explicit LogAttribute(const std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
logger_->set_max_log_size(-1);
}
~LogAttribute() override = default;
diff --git a/extensions/standard-processors/processors/NetworkListenerProcessor.h b/extensions/standard-processors/processors/NetworkListenerProcessor.h
index 4f15637fa..7058d1b2d 100644
--- a/extensions/standard-processors/processors/NetworkListenerProcessor.h
+++ b/extensions/standard-processors/processors/NetworkListenerProcessor.h
@@ -29,10 +29,10 @@
namespace org::apache::nifi::minifi::processors {
-class NetworkListenerProcessor : public core::Processor {
+class NetworkListenerProcessor : public core::ProcessorImpl {
public:
NetworkListenerProcessor(std::string_view name, const utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(std::move(logger)) {
}
~NetworkListenerProcessor() override;
diff --git a/extensions/standard-processors/processors/PutFile.h b/extensions/standard-processors/processors/PutFile.h
index d969d1d47..227ac5582 100644
--- a/extensions/standard-processors/processors/PutFile.h
+++ b/extensions/standard-processors/processors/PutFile.h
@@ -20,7 +20,6 @@
#include <string>
#include <utility>
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
@@ -28,17 +27,17 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Id.h"
#include "utils/Export.h"
#include "utils/Enum.h"
namespace org::apache::nifi::minifi::processors {
-class PutFile : public core::Processor {
+class PutFile : public core::ProcessorImpl {
public:
explicit PutFile(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~PutFile() override = default;
diff --git a/extensions/standard-processors/processors/PutTCP.cpp b/extensions/standard-processors/processors/PutTCP.cpp
index 54b3d2550..d5756bfcc 100644
--- a/extensions/standard-processors/processors/PutTCP.cpp
+++ b/extensions/standard-processors/processors/PutTCP.cpp
@@ -38,7 +38,7 @@ namespace org::apache::nifi::minifi::processors {
constexpr size_t chunk_size = 1024;
PutTCP::PutTCP(const std::string& name, const utils::Identifier& uuid)
- : Processor(name, uuid) {}
+ : ProcessorImpl(name, uuid) {}
PutTCP::~PutTCP() = default;
diff --git a/extensions/standard-processors/processors/PutTCP.h b/extensions/standard-processors/processors/PutTCP.h
index 263653c0e..6ea2ecfe2 100644
--- a/extensions/standard-processors/processors/PutTCP.h
+++ b/extensions/standard-processors/processors/PutTCP.h
@@ -25,7 +25,7 @@
#include <utility>
#include "io/InputStream.h"
-#include "Processor.h"
+#include "core/Processor.h"
#include "utils/Export.h"
#include "controllers/SSLContextService.h"
#include "core/Core.h"
@@ -43,7 +43,7 @@
namespace org::apache::nifi::minifi::processors {
-class PutTCP final : public core::Processor {
+class PutTCP final : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description =
"The PutTCP processor receives a FlowFile and transmits the FlowFile content over a TCP connection to the configured TCP server. "
diff --git a/extensions/standard-processors/processors/PutUDP.cpp b/extensions/standard-processors/processors/PutUDP.cpp
index e3e5f46d2..242e100e9 100644
--- a/extensions/standard-processors/processors/PutUDP.cpp
+++ b/extensions/standard-processors/processors/PutUDP.cpp
@@ -23,7 +23,7 @@
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
#include "core/Resource.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "asio/ip/udp.hpp"
#include "utils/net/AsioSocketUtils.h"
@@ -33,7 +33,7 @@ using asio::ip::udp;
namespace org::apache::nifi::minifi::processors {
PutUDP::PutUDP(std::string_view name, const utils::Identifier& uuid)
- : Processor(name, uuid), logger_{core::logging::LoggerFactory<PutUDP>::getLogger(uuid)}
+ : ProcessorImpl(name, uuid), logger_{core::logging::LoggerFactory<PutUDP>::getLogger(uuid)}
{ }
PutUDP::~PutUDP() = default;
diff --git a/extensions/standard-processors/processors/PutUDP.h b/extensions/standard-processors/processors/PutUDP.h
index a2567e3e1..e4c072f61 100644
--- a/extensions/standard-processors/processors/PutUDP.h
+++ b/extensions/standard-processors/processors/PutUDP.h
@@ -21,7 +21,7 @@
#include <utility>
#include <vector>
-#include "Processor.h"
+#include "core/Processor.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
@@ -30,7 +30,7 @@
namespace org::apache::nifi::minifi::core::logging { class Logger; }
namespace org::apache::nifi::minifi::processors {
-class PutUDP final : public core::Processor {
+class PutUDP final : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "The PutUDP processor receives a FlowFile and packages the FlowFile content into a single UDP datagram packet "
"which is then transmitted to the configured UDP server. "
diff --git a/extensions/standard-processors/processors/ReplaceText.cpp b/extensions/standard-processors/processors/ReplaceText.cpp
index 3a903879b..27d751fcc 100644
--- a/extensions/standard-processors/processors/ReplaceText.cpp
+++ b/extensions/standard-processors/processors/ReplaceText.cpp
@@ -22,14 +22,14 @@
#include "core/Resource.h"
#include "core/TypedValues.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/LineByLineInputOutputStreamCallback.h"
#include "utils/ProcessorConfigUtils.h"
namespace org::apache::nifi::minifi::processors {
ReplaceText::ReplaceText(std::string_view name, const utils::Identifier& uuid)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(core::logging::LoggerFactory<ReplaceText>::getLogger(uuid)) {
}
diff --git a/extensions/standard-processors/processors/ReplaceText.h b/extensions/standard-processors/processors/ReplaceText.h
index dd34c2a0c..2e2258c32 100644
--- a/extensions/standard-processors/processors/ReplaceText.h
+++ b/extensions/standard-processors/processors/ReplaceText.h
@@ -25,7 +25,6 @@
#include "core/Processor.h"
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
-#include "core/ProcessSessionFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
@@ -114,7 +113,7 @@ constexpr customize_t enum_name<ReplacementStrategyType>(ReplacementStrategyType
namespace org::apache::nifi::minifi::processors {
-class ReplaceText : public core::Processor {
+class ReplaceText : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Updates the content of a FlowFile by replacing parts of it using various replacement strategies.";
diff --git a/extensions/standard-processors/processors/RetryFlowFile.h b/extensions/standard-processors/processors/RetryFlowFile.h
index 36c8fb2f6..58651acd9 100644
--- a/extensions/standard-processors/processors/RetryFlowFile.h
+++ b/extensions/standard-processors/processors/RetryFlowFile.h
@@ -25,8 +25,6 @@
#include <utility>
#include <vector>
-#include "core/state/nodes/MetricsBase.h"
-#include "FlowFileRecord.h"
#include "core/Core.h"
#include "core/OutputAttributeDefinition.h"
#include "core/Processor.h"
@@ -35,16 +33,16 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/OptionalUtils.h"
#include "utils/Export.h"
namespace org::apache::nifi::minifi::processors {
-class RetryFlowFile : public core::Processor {
+class RetryFlowFile : public core::ProcessorImpl {
public:
explicit RetryFlowFile(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {}
+ : ProcessorImpl(name, uuid) {}
~RetryFlowFile() override = default;
// ReuseMode allowed values
diff --git a/extensions/standard-processors/processors/RouteOnAttribute.h b/extensions/standard-processors/processors/RouteOnAttribute.h
index 451e55dbd..4ca46da79 100644
--- a/extensions/standard-processors/processors/RouteOnAttribute.h
+++ b/extensions/standard-processors/processors/RouteOnAttribute.h
@@ -24,19 +24,18 @@
#include <string>
#include <utility>
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::processors {
-class RouteOnAttribute : public core::Processor {
+class RouteOnAttribute : public core::ProcessorImpl {
public:
explicit RouteOnAttribute(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Routes FlowFiles based on their Attributes using the Attribute Expression Language.\n\n"
diff --git a/extensions/standard-processors/processors/RouteText.cpp b/extensions/standard-processors/processors/RouteText.cpp
index 68cf53709..704b63dd3 100644
--- a/extensions/standard-processors/processors/RouteText.cpp
+++ b/extensions/standard-processors/processors/RouteText.cpp
@@ -25,7 +25,7 @@
#include "core/ProcessSession.h"
#include "core/Resource.h"
#include "io/StreamPipe.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "range/v3/view/transform.hpp"
#include "range/v3/range/conversion.hpp"
#include "range/v3/view/tail.hpp"
@@ -37,7 +37,7 @@
namespace org::apache::nifi::minifi::processors {
RouteText::RouteText(std::string_view name, const utils::Identifier& uuid)
- : core::Processor(name, uuid), logger_(core::logging::LoggerFactory<RouteText>::getLogger(uuid)) {}
+ : core::ProcessorImpl(name, uuid), logger_(core::logging::LoggerFactory<RouteText>::getLogger(uuid)) {}
void RouteText::initialize() {
setSupportedProperties(Properties);
diff --git a/extensions/standard-processors/processors/RouteText.h b/extensions/standard-processors/processors/RouteText.h
index 4d195e022..4c496d76a 100644
--- a/extensions/standard-processors/processors/RouteText.h
+++ b/extensions/standard-processors/processors/RouteText.h
@@ -114,7 +114,7 @@ constexpr customize_t enum_name<Segmentation>(Segmentation value) noexcept {
namespace org::apache::nifi::minifi::processors {
-class RouteText : public core::Processor {
+class RouteText : public core::ProcessorImpl {
public:
EXTENSIONAPI static constexpr const char* Description = "Routes textual data based on a set of user-defined rules. Each segment in an incoming FlowFile is "
"compared against the values specified by user-defined Properties. The mechanism by which the text is compared "
diff --git a/extensions/standard-processors/processors/SegmentContent.h b/extensions/standard-processors/processors/SegmentContent.h
index b0a87b037..321bf29f3 100644
--- a/extensions/standard-processors/processors/SegmentContent.h
+++ b/extensions/standard-processors/processors/SegmentContent.h
@@ -32,9 +32,9 @@
namespace org::apache::nifi::minifi::processors {
-class SegmentContent final : public core::Processor {
+class SegmentContent final : public core::ProcessorImpl {
public:
- explicit SegmentContent(const std::string_view name, const utils::Identifier& uuid = {}) : Processor(name, uuid) {}
+ explicit SegmentContent(const std::string_view name, const utils::Identifier& uuid = {}) : ProcessorImpl(name, uuid) {}
EXTENSIONAPI static constexpr auto Description = "Segments a FlowFile into multiple smaller segments on byte boundaries.";
diff --git a/extensions/standard-processors/processors/SplitContent.h b/extensions/standard-processors/processors/SplitContent.h
index 9c77fcfae..70789a24c 100644
--- a/extensions/standard-processors/processors/SplitContent.h
+++ b/extensions/standard-processors/processors/SplitContent.h
@@ -32,9 +32,9 @@
namespace org::apache::nifi::minifi::processors {
-class SplitContent final : public core::Processor {
+class SplitContent final : public core::ProcessorImpl {
public:
- explicit SplitContent(const std::string_view name, const utils::Identifier& uuid = {}) : Processor(name, uuid) {}
+ explicit SplitContent(const std::string_view name, const utils::Identifier& uuid = {}) : ProcessorImpl(name, uuid) {}
using size_type = std::vector<std::byte>::size_type;
enum class ByteSequenceFormat { Hexadecimal, Text };
diff --git a/extensions/standard-processors/processors/SplitRecord.h b/extensions/standard-processors/processors/SplitRecord.h
index ab45b999d..27bdd7c93 100644
--- a/extensions/standard-processors/processors/SplitRecord.h
+++ b/extensions/standard-processors/processors/SplitRecord.h
@@ -19,7 +19,7 @@
#include "core/Annotation.h"
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
-#include "core/ProcessSessionFactory.h"
+#include "minifi-cpp/core/ProcessSessionFactory.h"
#include "core/PropertyDefinition.h"
#include "core/PropertyDefinitionBuilder.h"
#include "core/RelationshipDefinition.h"
diff --git a/extensions/standard-processors/processors/SplitText.cpp b/extensions/standard-processors/processors/SplitText.cpp
index bbdf6e0be..e72001d80 100644
--- a/extensions/standard-processors/processors/SplitText.cpp
+++ b/extensions/standard-processors/processors/SplitText.cpp
@@ -26,6 +26,7 @@
#include "core/FlowFile.h"
#include "utils/gsl.h"
#include "utils/ProcessorConfigUtils.h"
+#include "io/StreamPipe.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/standard-processors/processors/SplitText.h b/extensions/standard-processors/processors/SplitText.h
index 528c0de52..0d40a6e9c 100644
--- a/extensions/standard-processors/processors/SplitText.h
+++ b/extensions/standard-processors/processors/SplitText.h
@@ -30,7 +30,6 @@
#include "core/PropertyDefinition.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "FlowFileRecord.h"
#include "utils/Export.h"
#include "utils/expected.h"
@@ -87,10 +86,10 @@ class LineReader {
} // namespace detail
-class SplitText : public core::Processor {
+class SplitText : public core::ProcessorImpl {
public:
explicit SplitText(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "Splits a text file into multiple smaller text files on line boundaries limited by maximum number of lines or total size of fragment. "
diff --git a/extensions/standard-processors/processors/TailFile.cpp b/extensions/standard-processors/processors/TailFile.cpp
index bd672d9b3..b2e69d5e4 100644
--- a/extensions/standard-processors/processors/TailFile.cpp
+++ b/extensions/standard-processors/processors/TailFile.cpp
@@ -30,7 +30,6 @@
#include "range/v3/action/sort.hpp"
-#include "FlowFileRecord.h"
#include "io/CRCStream.h"
#include "utils/file/FileUtils.h"
#include "utils/file/PathUtils.h"
@@ -804,7 +803,7 @@ void TailFile::checkForNewFiles(core::ProcessContext& context) {
}
std::string TailFile::baseDirectoryFromAttributes(const controllers::AttributeProviderService::AttributeMap& attribute_map, core::ProcessContext& context) {
- auto flow_file = std::make_shared<FlowFileRecord>();
+ auto flow_file = core::FlowFile::create();
for (const auto& [key, value] : attribute_map) {
flow_file->setAttribute(key, value);
}
diff --git a/extensions/standard-processors/processors/TailFile.h b/extensions/standard-processors/processors/TailFile.h
index dc1d76d41..9069c2f13 100644
--- a/extensions/standard-processors/processors/TailFile.h
+++ b/extensions/standard-processors/processors/TailFile.h
@@ -28,7 +28,6 @@
#include <optional>
#include "controllers/AttributeProviderService.h"
-#include "FlowFileRecord.h"
#include "core/Core.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
@@ -36,7 +35,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/Enum.h"
#include "utils/Export.h"
#include "utils/RegexUtils.h"
@@ -103,10 +102,10 @@ enum class Mode {
SINGLE, MULTIPLE, UNDEFINED
};
-class TailFile : public core::Processor {
+class TailFile : public core::ProcessorImpl {
public:
explicit TailFile(std::string_view name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
~TailFile() override = default;
diff --git a/extensions/standard-processors/processors/UpdateAttribute.h b/extensions/standard-processors/processors/UpdateAttribute.h
index ce80b9733..7f4407ca5 100644
--- a/extensions/standard-processors/processors/UpdateAttribute.h
+++ b/extensions/standard-processors/processors/UpdateAttribute.h
@@ -24,20 +24,19 @@
#include <utility>
#include <vector>
-#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/PropertyDefinition.h"
#include "core/RelationshipDefinition.h"
#include "core/Core.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
namespace org::apache::nifi::minifi::processors {
-class UpdateAttribute : public core::Processor {
+class UpdateAttribute : public core::ProcessorImpl {
public:
UpdateAttribute(std::string_view name, const utils::Identifier& uuid = {}) // NOLINT
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "This processor updates the attributes of a FlowFile using properties that are added by the user. "
diff --git a/extensions/standard-processors/tests/integration/VerifyInvokeHTTP.h b/extensions/standard-processors/tests/integration/VerifyInvokeHTTP.h
index 0419c9627..3f624ab12 100644
--- a/extensions/standard-processors/tests/integration/VerifyInvokeHTTP.h
+++ b/extensions/standard-processors/tests/integration/VerifyInvokeHTTP.h
@@ -17,7 +17,6 @@
*/
#pragma once
-#include "PropertyDefinition.h"
#include <memory>
#include <utility>
@@ -29,6 +28,7 @@
#include "processors/LogAttribute.h"
#include "controllers/SSLContextService.h"
#include "core/state/ProcessorController.h"
+#include "core/PropertyDefinition.h"
#include "integration/HTTPIntegrationBase.h"
#include "unit/Catch.h"
#include "unit/ProvenanceTestHelper.h"
@@ -75,7 +75,7 @@ class VerifyInvokeHTTP : public HTTPIntegrationBase {
const auto processorController = dynamic_cast<minifi::state::ProcessorController*>(&component);
assert(processorController);
auto& proc = processorController->getProcessor();
- proc.setProperty(property, value);
+ proc.setProperty(property, std::string_view{value});
executed = true;
});
diff --git a/extensions/standard-processors/tests/unit/ConfigurationTests.cpp b/extensions/standard-processors/tests/unit/ConfigurationTests.cpp
index 7b44c048f..bc4db378a 100644
--- a/extensions/standard-processors/tests/unit/ConfigurationTests.cpp
+++ b/extensions/standard-processors/tests/unit/ConfigurationTests.cpp
@@ -19,7 +19,7 @@
#include "unit/Catch.h"
#include "properties/Configuration.h"
-#include "Environment.h"
+#include "utils/Environment.h"
namespace org::apache::nifi::minifi::test {
@@ -65,7 +65,7 @@ TEST_CASE("Configuration can fix misconfigured timeperiod<->integer validated pr
<< "nifi.c2.agent.heartbeat.period=1min\n"
<< "nifi.administrative.yield.duration=30000\n";
auto properties_file_time_after_creation = std::filesystem::last_write_time(properties_path);
- const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::Configure>();
+ const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::ConfigureImpl>();
configure->loadConfigureFile(properties_path);
CHECK(configure->get("nifi.c2.agent.heartbeat.period") == "60000");
@@ -109,7 +109,7 @@ TEST_CASE("Configuration can fix misconfigured datasize<->integer validated prop
properties_file.close();
}
auto properties_file_time_after_creation = std::filesystem::last_write_time(properties_path);
- const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::Configure>();
+ const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::ConfigureImpl>();
configure->loadConfigureFile(properties_path, "nifi.log.");
CHECK(configure->get("appender.rolling.max_file_size") == "6000 B");
@@ -146,7 +146,7 @@ TEST_CASE("Configuration can fix misconfigured validated properties within envir
<< "compression.cached.log.max.size=${SOME_VARIABLE}\n"
<< "compression.compressed.log.max.size=3000\n";
auto properties_file_time_after_creation = std::filesystem::last_write_time(properties_path);
- const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::Configure>();
+ const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::ConfigureImpl>();
configure->loadConfigureFile(properties_path, "nifi.log.");
CHECK(configure->get("compression.cached.log.max.size") == "4000 B");
diff --git a/extensions/standard-processors/tests/unit/ControllerServiceTests.cpp b/extensions/standard-processors/tests/unit/ControllerServiceTests.cpp
index bd14bc144..d1bb4cf7d 100644
--- a/extensions/standard-processors/tests/unit/ControllerServiceTests.cpp
+++ b/extensions/standard-processors/tests/unit/ControllerServiceTests.cpp
@@ -39,7 +39,7 @@ TEST_CASE("Test ControllerServicesMap", "[cs1]") {
REQUIRE(map.getAllControllerServices().empty());
std::shared_ptr<core::controller::ControllerService> service = std::make_shared<MockControllerService>();
- std::shared_ptr<core::controller::StandardControllerServiceNode> testNode = std::make_shared<core::controller::StandardControllerServiceNode>(service, "ID", std::make_shared<minifi::Configure>());
+ auto testNode = std::make_shared<core::controller::StandardControllerServiceNode>(service, "ID", std::make_shared<minifi::ConfigureImpl>());
map.put("ID", testNode);
REQUIRE(1 == map.getAllControllerServices().size());
@@ -58,7 +58,7 @@ TEST_CASE("Test StandardControllerServiceNode nullPtr", "[cs1]") {
core::controller::ControllerServiceNodeMap map;
try {
- std::shared_ptr<core::controller::StandardControllerServiceNode> testNode = std::make_shared<core::controller::StandardControllerServiceNode>(nullptr, "ID", std::make_shared<minifi::Configure>());
+ auto testNode = std::make_shared<core::controller::StandardControllerServiceNode>(nullptr, "ID", std::make_shared<minifi::ConfigureImpl>());
} catch (const minifi::Exception &) {
return;
}
@@ -68,7 +68,7 @@ TEST_CASE("Test StandardControllerServiceNode nullPtr", "[cs1]") {
std::shared_ptr<core::controller::StandardControllerServiceNode> newCsNode(const std::string& id) {
std::shared_ptr<core::controller::ControllerService> service = std::make_shared<MockControllerService>();
- std::shared_ptr<core::controller::StandardControllerServiceNode> testNode = std::make_shared<core::controller::StandardControllerServiceNode>(service, id, std::make_shared<minifi::Configure>());
+ auto testNode = std::make_shared<core::controller::StandardControllerServiceNode>(service, id, std::make_shared<minifi::ConfigureImpl>());
return testNode;
}
diff --git a/extensions/standard-processors/tests/unit/DefragmentTextTests.cpp b/extensions/standard-processors/tests/unit/DefragmentTextTests.cpp
index 86164f483..1eaa4ad30 100644
--- a/extensions/standard-processors/tests/unit/DefragmentTextTests.cpp
+++ b/extensions/standard-processors/tests/unit/DefragmentTextTests.cpp
@@ -311,7 +311,7 @@ TEST_CASE("DefragmentTextMultipleSources", "[defragmenttextinvalidsources]") {
}
}
-class FragmentGenerator : public core::Processor {
+class FragmentGenerator : public core::ProcessorImpl {
public:
static constexpr const char* Description = "FragmentGenerator (only for testing purposes)";
static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
@@ -324,7 +324,7 @@ class FragmentGenerator : public core::Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS
explicit FragmentGenerator(std::string_view name, const utils::Identifier& uuid = utils::Identifier())
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
void onTrigger(core::ProcessContext&, core::ProcessSession& session) override {
diff --git a/extensions/standard-processors/tests/unit/FlowJsonTests.cpp b/extensions/standard-processors/tests/unit/FlowJsonTests.cpp
index 4eb54198a..14084be80 100644
--- a/extensions/standard-processors/tests/unit/FlowJsonTests.cpp
+++ b/extensions/standard-processors/tests/unit/FlowJsonTests.cpp
@@ -333,9 +333,9 @@ TEST_CASE("Cannot use the same parameter name within a parameter context twice")
REQUIRE_THROWS_WITH(config.getRootFromPayload(CONFIG_JSON), "Parameter Operation: Parameter name 'file_size' already exists, parameter names must be unique within a parameter context!");
}
-class DummyFlowJsonProcessor : public core::Processor {
+class DummyFlowJsonProcessor : public core::ProcessorImpl {
public:
- using core::Processor::Processor;
+ using core::ProcessorImpl::ProcessorImpl;
static constexpr const char* Description = "A processor that does nothing.";
static constexpr auto SimpleProperty = core::PropertyDefinitionBuilder<>::createProperty("Simple Property")
diff --git a/extensions/standard-processors/tests/unit/GetTCPTests.cpp b/extensions/standard-processors/tests/unit/GetTCPTests.cpp
index 9fb79d70d..65b7f391d 100644
--- a/extensions/standard-processors/tests/unit/GetTCPTests.cpp
+++ b/extensions/standard-processors/tests/unit/GetTCPTests.cpp
@@ -50,9 +50,9 @@ void addSslContextServiceTo(SingleProcessorTestController& controller) {
auto ssl_context_service = controller.plan->addController("SSLContextService", "SSLContextService");
LogTestController::getInstance().setTrace<GetTCP>();
const auto executable_dir = minifi::utils::file::FileUtils::get_executable_dir();
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::ClientCertificate, (executable_dir / "resources" / "alice_by_A.pem").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::PrivateKey, (executable_dir / "resources" / "alice.key").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::ClientCertificate, (executable_dir / "resources" / "alice_by_A.pem").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::PrivateKey, (executable_dir / "resources" / "alice.key").string()));
ssl_context_service->enable();
}
diff --git a/extensions/standard-processors/tests/unit/JsonRecordTests.cpp b/extensions/standard-processors/tests/unit/JsonRecordTests.cpp
index 406ae5b5d..922745939 100644
--- a/extensions/standard-processors/tests/unit/JsonRecordTests.cpp
+++ b/extensions/standard-processors/tests/unit/JsonRecordTests.cpp
@@ -25,7 +25,7 @@
#include "unit/TestRecord.h"
#include "controllers/JsonRecordSetReader.h"
#include "controllers/JsonRecordSetWriter.h"
-#include "core/Record.h"
+#include "minifi-cpp/core/Record.h"
namespace org::apache::nifi::minifi::standard::test {
diff --git a/extensions/standard-processors/tests/unit/ListenSyslogTests.cpp b/extensions/standard-processors/tests/unit/ListenSyslogTests.cpp
index 545e22d95..92f8e7cdc 100644
--- a/extensions/standard-processors/tests/unit/ListenSyslogTests.cpp
+++ b/extensions/standard-processors/tests/unit/ListenSyslogTests.cpp
@@ -495,9 +495,9 @@ TEST_CASE("Test ListenSyslog via TCP with SSL connection", "[ListenSyslog][Netwo
auto ssl_context_service = controller.plan->addController("SSLContextService", "SSLContextService");
const auto executable_dir = minifi::utils::file::FileUtils::get_executable_dir();
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
ssl_context_service->enable();
LogTestController::getInstance().setTrace<ListenSyslog>();
diff --git a/extensions/standard-processors/tests/unit/ListenTcpTests.cpp b/extensions/standard-processors/tests/unit/ListenTcpTests.cpp
index c5e647f84..9f47af960 100644
--- a/extensions/standard-processors/tests/unit/ListenTcpTests.cpp
+++ b/extensions/standard-processors/tests/unit/ListenTcpTests.cpp
@@ -117,10 +117,10 @@ TEST_CASE("Test ListenTCP with SSL connection", "[ListenTCP][NetworkListenerProc
auto ssl_context_service = controller.plan->addController("SSLContextService", "SSLContextService");
LogTestController::getInstance().setTrace<ListenTCP>();
const auto executable_dir = minifi::utils::file::FileUtils::get_executable_dir();
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::Passphrase, "Password12"));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::Passphrase, "Password12"));
REQUIRE(controller.plan->setProperty(listen_tcp, ListenTCP::MaxBatchSize, "2"));
REQUIRE(controller.plan->setProperty(listen_tcp, ListenTCP::SSLContextService, "SSLContextService"));
std::vector<std::string> expected_successful_messages;
@@ -246,10 +246,10 @@ TEST_CASE("Test ListenTCP SSL/TLS compatibility", "[ListenTCP][NetworkListenerPr
auto ssl_context_service = controller.plan->addController("SSLContextService", "SSLContextService");
LogTestController::getInstance().setTrace<ListenTCP>();
const auto executable_dir = minifi::utils::file::FileUtils::get_executable_dir();
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
- REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextService::Passphrase, "Password12"));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::CACertificate, (executable_dir / "resources" / "ca_A.crt").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::ClientCertificate, (executable_dir / "resources" / "localhost_by_A.pem").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::PrivateKey, (executable_dir / "resources" / "localhost.key").string()));
+ REQUIRE(controller.plan->setProperty(ssl_context_service, controllers::SSLContextServiceImpl::Passphrase, "Password12"));
REQUIRE(controller.plan->setProperty(listen_tcp, ListenTCP::MaxBatchSize, "2"));
REQUIRE(controller.plan->setProperty(listen_tcp, ListenTCP::SSLContextService, "SSLContextService"));
REQUIRE(controller.plan->setProperty(listen_tcp, ListenTCP::ClientAuth, "REQUIRED"));
diff --git a/extensions/standard-processors/tests/unit/ProcessorTests.cpp b/extensions/standard-processors/tests/unit/ProcessorTests.cpp
index 9ed277ed1..4f389fd30 100644
--- a/extensions/standard-processors/tests/unit/ProcessorTests.cpp
+++ b/extensions/standard-processors/tests/unit/ProcessorTests.cpp
@@ -26,6 +26,7 @@
#include <fstream>
#include <GenerateFlowFile.h>
#ifdef WIN32
+#include <windows.h>
#include <fileapi.h>
#include <system_error>
#endif /* WIN32 */
@@ -63,19 +64,19 @@ TEST_CASE("Test Creation of GetFile", "[getfileCreate]") {
TEST_CASE("Test GetFileMultiple", "[getfileCreate3]") {
TestController testController;
LogTestController::getInstance().setDebug<minifi::processors::GetFile>();
- auto config = std::make_shared<minifi::Configure>();
+ auto config = std::make_shared<minifi::ConfigureImpl>();
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
content_repo->initialize(config);
auto processor = std::make_shared<minifi::processors::GetFile>("getfileCreate2");
processor->initialize();
std::shared_ptr<core::Repository> test_repo = std::make_shared<TestRepository>();
- std::shared_ptr<TestRepository> repo = std::static_pointer_cast<TestRepository>(test_repo);
+ std::shared_ptr<TestRepository> repo = std::dynamic_pointer_cast<TestRepository>(test_repo);
auto dir = testController.createTempDirectory();
utils::Identifier processoruuid = processor->getUUID();
REQUIRE(processoruuid);
- auto connection = std::make_unique<minifi::Connection>(test_repo, content_repo, "getfileCreate2Connection");
+ auto connection = std::make_unique<minifi::ConnectionImpl>(test_repo, content_repo, "getfileCreate2Connection");
connection->addRelationship(core::Relationship("success", "description"));
@@ -89,19 +90,19 @@ TEST_CASE("Test GetFileMultiple", "[getfileCreate3]") {
processor->addConnection(connection.get());
REQUIRE(!dir.empty());
- auto node = std::make_shared<core::ProcessorNode>(processor.get());
- auto context = std::make_shared<core::ProcessContext>(node, nullptr, repo, repo, content_repo);
+ auto node = std::make_shared<core::ProcessorNodeImpl>(processor.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(node, nullptr, repo, repo, content_repo);
context->setProperty(minifi::processors::GetFile::Directory, dir.string());
// replicate 10 threads
processor->setScheduledState(core::ScheduledState::RUNNING);
- auto factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
processor->onSchedule(*context, *factory);
for (int i = 1; i < 10; i++) {
- auto session = std::make_shared<core::ProcessSession>(context);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context);
REQUIRE(processor->getName() == "getfileCreate2");
std::shared_ptr<core::FlowFile> record;
@@ -151,14 +152,14 @@ TEST_CASE("Test GetFile Ignore", "[getfileCreate3]") {
processor->initialize();
std::shared_ptr<core::Repository> test_repo = std::make_shared<TestRepository>();
- std::shared_ptr<TestRepository> repo = std::static_pointer_cast<TestRepository>(test_repo);
+ std::shared_ptr<TestRepository> repo = std::dynamic_pointer_cast<TestRepository>(test_repo);
const auto dir = testController.createTempDirectory();
utils::Identifier processoruuid = processor->getUUID();
REQUIRE(processoruuid);
- std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(test_repo, content_repo, "getfileCreate2Connection");
+ std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::ConnectionImpl>(test_repo, content_repo, "getfileCreate2Connection");
connection->addRelationship(core::Relationship("success", "description"));
@@ -172,18 +173,18 @@ TEST_CASE("Test GetFile Ignore", "[getfileCreate3]") {
processor->addConnection(connection.get());
REQUIRE(!dir.empty());
- auto node = std::make_shared<core::ProcessorNode>(processor.get());
- auto context = std::make_shared<core::ProcessContext>(node, nullptr, repo, repo, content_repo);
+ auto node = std::make_shared<core::ProcessorNodeImpl>(processor.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(node, nullptr, repo, repo, content_repo);
context->setProperty(minifi::processors::GetFile::Directory, dir.string());
// replicate 10 threads
processor->setScheduledState(core::ScheduledState::RUNNING);
- auto factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
processor->onSchedule(*context, *factory);
- auto session = std::make_shared<core::ProcessSession>(context);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context);
REQUIRE(processor->getName() == "getfileCreate2");
std::shared_ptr<core::FlowFile> record;
@@ -233,16 +234,16 @@ TEST_CASE("TestConnectionFull", "[ConnectionFull]") {
TestController testController;
LogTestController::getInstance().setDebug<minifi::processors::GenerateFlowFile>();
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- content_repo->initialize(std::make_shared<minifi::Configure>());
- auto processor = std::make_shared<minifi::processors::GenerateFlowFile>("GFF");
+ content_repo->initialize(std::make_shared<minifi::ConfigureImpl>());
+ auto processor = std::make_shared<org::apache::nifi::minifi::processors::GenerateFlowFile>("GFF");
processor->initialize();
processor->setProperty(minifi::processors::GenerateFlowFile::BatchSize, "10");
processor->setProperty(minifi::processors::GenerateFlowFile::FileSize, "0");
std::shared_ptr<core::Repository> test_repo = std::make_shared<TestRepository>();
- std::shared_ptr<TestRepository> repo = std::static_pointer_cast<TestRepository>(test_repo);
+ std::shared_ptr<TestRepository> repo = std::dynamic_pointer_cast<TestRepository>(test_repo);
- std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(test_repo, content_repo, "GFF2Connection");
+ std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::ConnectionImpl>(test_repo, content_repo, "GFF2Connection");
connection->setBackpressureThresholdCount(5);
connection->addRelationship(core::Relationship("success", "description"));
@@ -258,14 +259,14 @@ TEST_CASE("TestConnectionFull", "[ConnectionFull]") {
processor->addConnection(connection.get());
processor->setScheduledState(core::ScheduledState::RUNNING);
- auto node = std::make_shared<core::ProcessorNode>(processor.get());
- auto context = std::make_shared<core::ProcessContext>(node, nullptr, repo, repo, content_repo);
+ auto node = std::make_shared<core::ProcessorNodeImpl>(processor.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(node, nullptr, repo, repo, content_repo);
- auto factory = std::make_shared<core::ProcessSessionFactory>(context);
+ auto factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
processor->onSchedule(*context, *factory);
- auto session = std::make_shared<core::ProcessSession>(context);
+ auto session = std::make_shared<core::ProcessSessionImpl>(context);
CHECK_FALSE(session->outgoingConnectionsFull("success"));
CHECK_FALSE(connection->backpressureThresholdReached());
@@ -413,7 +414,7 @@ TEST_CASE("Test Find file", "[getfileCreate3]") {
std::shared_ptr<TestPlan> plan = testController.createPlan();
auto processor = plan->addProcessor("GetFile", "getfileCreate2");
auto processorReport = plan->addProcessor(std::make_unique<minifi::core::reporting::SiteToSiteProvenanceReportingTask>(
- std::make_shared<minifi::Configure>()), "reporter", core::Relationship("success", "description"), false);
+ std::make_shared<minifi::ConfigureImpl>()), "reporter", core::Relationship("success", "description"), false);
auto dir = testController.createTempDirectory();
plan->setProperty(processor, minifi::processors::GetFile::Directory, dir.string());
@@ -439,11 +440,11 @@ TEST_CASE("Test Find file", "[getfileCreate3]") {
std::shared_ptr<core::FlowFile> ffr = plan->getCurrentFlowFile();
REQUIRE(ffr != nullptr);
ffr->getResourceClaim()->decreaseFlowFileRecordOwnedCount();
- auto repo = std::static_pointer_cast<TestRepository>(plan->getProvenanceRepo());
+ auto repo = std::dynamic_pointer_cast<TestRepository>(plan->getProvenanceRepo());
REQUIRE(2 == repo->getRepoMap().size());
for (auto entry : repo->getRepoMap()) {
- minifi::provenance::ProvenanceEventRecord newRecord;
+ minifi::provenance::ProvenanceEventRecordImpl newRecord;
minifi::io::BufferStream stream(gsl::make_span(entry.second).as_span<const std::byte>());
newRecord.deserialize(stream);
@@ -463,10 +464,10 @@ TEST_CASE("Test Find file", "[getfileCreate3]") {
throw std::runtime_error("Did not find record");
}
}
- auto taskReport = static_cast<minifi::core::reporting::SiteToSiteProvenanceReportingTask*>(processorReport);
+ auto taskReport = dynamic_cast<minifi::core::reporting::SiteToSiteProvenanceReportingTask*>(processorReport);
taskReport->setBatchSize(1);
std::vector<std::shared_ptr<core::SerializableComponent>> recordsReport;
- recordsReport.push_back(std::make_shared<minifi::provenance::ProvenanceEventRecord>());
+ recordsReport.push_back(std::make_shared<minifi::provenance::ProvenanceEventRecordImpl>());
processorReport->incrementActiveTasks();
processorReport->setScheduledState(core::ScheduledState::RUNNING);
std::string jsonStr;
@@ -483,10 +484,10 @@ TEST_CASE("Test Find file", "[getfileCreate3]") {
testController.runSession(plan, false, verifyReporter);
}
-class TestProcessorNoContent : public minifi::core::Processor {
+class TestProcessorNoContent : public minifi::core::ProcessorImpl {
public:
explicit TestProcessorNoContent(std::string_view name, const utils::Identifier& uuid = {})
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
static constexpr const char* Description = "test resource";
@@ -539,20 +540,20 @@ void testRPGBypass(const std::string &host, const std::string &port, bool has_er
LogTestController::getInstance().setTrace<minifi::core::ProcessSession>();
LogTestController::getInstance().setTrace<TestPlan>();
- auto configuration = std::make_shared<minifi::Configure>();
+ auto configuration = std::make_shared<minifi::ConfigureImpl>();
std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
std::shared_ptr<core::Repository> test_repo = std::make_shared<TestRepository>();
- std::shared_ptr<TestRepository> repo = std::static_pointer_cast<TestRepository>(test_repo);
+ std::shared_ptr<TestRepository> repo = std::dynamic_pointer_cast<TestRepository>(test_repo);
auto rpg = std::make_shared<minifi::RemoteProcessorGroupPort>("rpg", "http://localhost:8989/nifi", configuration);
rpg->initialize();
REQUIRE(rpg->setProperty(minifi::RemoteProcessorGroupPort::hostName, host));
rpg->setProperty(minifi::RemoteProcessorGroupPort::port, port);
- auto node = std::make_shared<core::ProcessorNode>(rpg.get());
- auto context = std::make_shared<core::ProcessContext>(node, nullptr, repo, repo, content_repo);
- auto psf = std::make_shared<core::ProcessSessionFactory>(context);
+ auto node = std::make_shared<core::ProcessorNodeImpl>(rpg.get());
+ auto context = std::make_shared<core::ProcessContextImpl>(node, nullptr, repo, repo, content_repo);
+ auto psf = std::make_shared<core::ProcessSessionFactoryImpl>(context);
if (has_error) {
rpg->onSchedule(*context, *psf);
auto expected_error = "No peers selected during scheduling";
@@ -607,18 +608,18 @@ ProcessorWithIncomingConnectionTest::ProcessorWithIncomingConnectionTest() {
const auto repo = std::make_shared<TestRepository>();
const auto content_repo = std::make_shared<core::repository::VolatileContentRepository>();
- content_repo->initialize(std::make_shared<minifi::Configure>());
+ content_repo->initialize(std::make_shared<minifi::ConfigureImpl>());
processor_ = std::make_shared<minifi::processors::LogAttribute>("test_processor");
- incoming_connection_ = std::make_shared<minifi::Connection>(repo, content_repo, "incoming_connection");
+ incoming_connection_ = std::make_shared<minifi::ConnectionImpl>(repo, content_repo, "incoming_connection");
incoming_connection_->addRelationship(core::Relationship{"success", ""});
incoming_connection_->setDestinationUUID(processor_->getUUID());
processor_->addConnection(incoming_connection_.get());
processor_->initialize();
- const auto processor_node = std::make_shared<core::ProcessorNode>(processor_.get());
- const auto context = std::make_shared<core::ProcessContext>(processor_node, nullptr, repo, repo, content_repo);
- const auto session_factory = std::make_shared<core::ProcessSessionFactory>(context);
+ const auto processor_node = std::make_shared<core::ProcessorNodeImpl>(processor_.get());
+ const auto context = std::make_shared<core::ProcessContextImpl>(processor_node, nullptr, repo, repo, content_repo);
+ const auto session_factory = std::make_shared<core::ProcessSessionFactoryImpl>(context);
session_ = session_factory->createSession();
}
diff --git a/extensions/standard-processors/tests/unit/PutTCPTests.cpp b/extensions/standard-processors/tests/unit/PutTCPTests.cpp
index c190c3c8a..2799a239f 100644
--- a/extensions/standard-processors/tests/unit/PutTCPTests.cpp
+++ b/extensions/standard-processors/tests/unit/PutTCPTests.cpp
@@ -36,7 +36,7 @@ using org::apache::nifi::minifi::test::utils::verifyEventHappenedInPollTime;
namespace org::apache::nifi::minifi::processors {
-using controllers::SSLContextService;
+using controllers::SSLContextServiceImpl;
namespace {
@@ -170,12 +170,12 @@ class PutTCPTestFixture {
void addSSLContextToPutTCP(const std::filesystem::path& ca_cert, const std::optional<std::filesystem::path>& client_cert, const std::optional<std::filesystem::path>& client_cert_key) {
const std::filesystem::path ca_dir = minifi::utils::file::FileUtils::get_executable_dir() / "resources";
auto ssl_context_service_node = controller_.plan->addController("SSLContextService", "SSLContextService");
- REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextService::CACertificate, (ca_dir / ca_cert).string()));
+ REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextServiceImpl::CACertificate, (ca_dir / ca_cert).string()));
if (client_cert) {
- REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextService::ClientCertificate, (ca_dir / *client_cert).string()));
+ REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextServiceImpl::ClientCertificate, (ca_dir / *client_cert).string()));
}
if (client_cert_key) {
- REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextService::PrivateKey, (ca_dir / *client_cert_key).string()));
+ REQUIRE(controller_.plan->setProperty(ssl_context_service_node, SSLContextServiceImpl::PrivateKey, (ca_dir / *client_cert_key).string()));
}
ssl_context_service_node->enable();
diff --git a/extensions/standard-processors/tests/unit/ReplaceTextTests.cpp b/extensions/standard-processors/tests/unit/ReplaceTextTests.cpp
index 03c37a747..924b44722 100644
--- a/extensions/standard-processors/tests/unit/ReplaceTextTests.cpp
+++ b/extensions/standard-processors/tests/unit/ReplaceTextTests.cpp
@@ -165,7 +165,7 @@ TEST_CASE("Substitute Variables works correctly in ReplaceText", "[applyReplacem
replace_text.setEvaluationMode(minifi::processors::EvaluationModeType::ENTIRE_TEXT);
replace_text.setReplacementStrategy(minifi::processors::ReplacementStrategyType::SUBSTITUTE_VARIABLES);
- const auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ const auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
flow_file->setAttribute("color", "green");
flow_file->setAttribute("food", "eggs and ham");
diff --git a/extensions/standard-processors/tests/unit/RouteTextTests.cpp b/extensions/standard-processors/tests/unit/RouteTextTests.cpp
index f5c3b1662..cc72bf1dc 100644
--- a/extensions/standard-processors/tests/unit/RouteTextTests.cpp
+++ b/extensions/standard-processors/tests/unit/RouteTextTests.cpp
@@ -106,7 +106,7 @@ struct RouteTextController : public TestController {
}
void putFlowFile(const std::map<std::string, std::string>& attributes, const std::string& content) const {
- auto flow_file = std::make_shared<minifi::FlowFileRecord>();
+ auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
for (const auto& attr : attributes) {
flow_file->setAttribute(attr.first, attr.second);
}
diff --git a/extensions/standard-processors/tests/unit/TailFileTests.cpp b/extensions/standard-processors/tests/unit/TailFileTests.cpp
index d02a58b75..ef973613a 100644
--- a/extensions/standard-processors/tests/unit/TailFileTests.cpp
+++ b/extensions/standard-processors/tests/unit/TailFileTests.cpp
@@ -1054,7 +1054,7 @@ TEST_CASE("TailFile finds and finishes the renamed file and continues with the n
const core::Relationship success_relationship{"success", "everything is fine"};
// use persistent state storage that defaults to rocksDB, not volatile
- const auto configuration = std::make_shared<minifi::Configure>();
+ const auto configuration = std::make_shared<minifi::ConfigureImpl>();
configuration->setHome(log_dir);
{
auto test_plan = testController.createPlan(configuration, state_dir);
@@ -1717,9 +1717,9 @@ TEST_CASE("TailFile onSchedule throws if an invalid Attribute Provider Service i
namespace {
-class TestAttributeProviderService final : public minifi::controllers::AttributeProviderService {
+class TestAttributeProviderService final : public minifi::controllers::AttributeProviderServiceImpl {
public:
- using AttributeProviderService::AttributeProviderService;
+ using AttributeProviderServiceImpl::AttributeProviderServiceImpl;
static constexpr const char* Description = "An attribute provider service which provides a constant set of records.";
static constexpr auto Properties = std::array<core::PropertyReference, 0>{};
diff --git a/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp b/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp
index e2538662b..876167a4d 100644
--- a/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp
+++ b/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp
@@ -566,7 +566,7 @@ Processors:
REQUIRE(!rootFlowConfig->findProcessorByName("XYZ")->getUUIDStr().empty());
}
-class DummyComponent : public core::ConfigurableComponent {
+class DummyComponent : public core::ConfigurableComponentImpl {
public:
bool supportsDynamicProperties() const override {
return false;
@@ -1261,9 +1261,9 @@ NiFi Properties Overrides: {}
"Parameter Operation: Parameter name 'lookup.frequency' already exists, parameter names must be unique within a parameter context!");
}
-class DummyFlowYamlProcessor : public core::Processor {
+class DummyFlowYamlProcessor : public core::ProcessorImpl {
public:
- using core::Processor::Processor;
+ using core::ProcessorImpl::ProcessorImpl;
static constexpr const char* Description = "A processor that does nothing.";
static constexpr auto SimpleProperty = core::PropertyDefinitionBuilder<>::createProperty("Simple Property")
diff --git a/extensions/standard-processors/tests/unit/YamlConnectionParserTest.cpp b/extensions/standard-processors/tests/unit/YamlConnectionParserTest.cpp
index 34fe82325..ac033c22e 100644
--- a/extensions/standard-processors/tests/unit/YamlConnectionParserTest.cpp
+++ b/extensions/standard-processors/tests/unit/YamlConnectionParserTest.cpp
@@ -41,7 +41,7 @@ TEST_CASE("Connections components are parsed from yaml", "[YamlConfiguration]")
gsl::not_null<core::ProcessGroup*> parent_ptr{ &parent };
SECTION("Source relationships are read") {
- const auto connection = std::make_shared<minifi::Connection>(nullptr, nullptr, "name");
+ const auto connection = std::make_shared<minifi::ConnectionImpl>(nullptr, nullptr, "name");
std::string serialized_yaml;
std::set<org::apache::nifi::minifi::core::Relationship> expectations;
SECTION("Single relationship name") {
@@ -130,7 +130,7 @@ TEST_CASE("Connections components are parsed from yaml", "[YamlConfiguration]")
}
}
SECTION("Errors are handled properly when configuration lines are missing") {
- const auto connection = std::make_shared<minifi::Connection>(nullptr, nullptr, "name");
+ const auto connection = std::make_shared<minifi::ConnectionImpl>(nullptr, nullptr, "name");
SECTION("With empty configuration") {
YAML::Node yaml_node = YAML::Load(std::string(""));
flow::Node connection_node{std::make_shared<YamlNode>(yaml_node)};
diff --git a/extensions/standard-processors/tests/unit/YamlProcessGroupParserTests.cpp b/extensions/standard-processors/tests/unit/YamlProcessGroupParserTests.cpp
index 0147d30f7..2e1dac807 100644
--- a/extensions/standard-processors/tests/unit/YamlProcessGroupParserTests.cpp
+++ b/extensions/standard-processors/tests/unit/YamlProcessGroupParserTests.cpp
@@ -24,7 +24,7 @@
static core::YamlConfiguration config{core::ConfigurationContext{
.flow_file_repo = nullptr,
.content_repo = nullptr,
- .configuration = std::make_shared<minifi::Configure>(),
+ .configuration = std::make_shared<minifi::ConfigureImpl>(),
.path = "",
.filesystem = std::make_shared<utils::file::FileSystem>(),
.sensitive_values_encryptor = utils::crypto::EncryptionProvider{utils::crypto::XSalsa20Cipher{utils::crypto::XSalsa20Cipher::generateKey()}}
diff --git a/extensions/standard-processors/utils/JoltUtils.h b/extensions/standard-processors/utils/JoltUtils.h
index 4b0f2f946..12a9c8078 100644
--- a/extensions/standard-processors/utils/JoltUtils.h
+++ b/extensions/standard-processors/utils/JoltUtils.h
@@ -27,7 +27,7 @@
#include <compare>
#include <concepts>
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "utils/gsl.h"
#include "rapidjson/document.h"
#include "utils/expected.h"
diff --git a/extensions/systemd/CMakeLists.txt b/extensions/systemd/CMakeLists.txt
index 3350d47ba..87f49cafb 100644
--- a/extensions/systemd/CMakeLists.txt
+++ b/extensions/systemd/CMakeLists.txt
@@ -25,7 +25,7 @@ include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
add_minifi_library(minifi-systemd SHARED "ConsumeJournald.cpp" "libwrapper/LibWrapper.cpp" "libwrapper/DlopenWrapper.cpp")
-target_link_libraries(minifi-systemd ${LIBMINIFI} Threads::Threads date::date)
+target_link_libraries(minifi-systemd ${LIBMINIFI} Threads::Threads)
register_extension(minifi-systemd "SYSTEMD EXTENSIONS" SYSTEMD-EXTENSIONS "Enabled log collection from journald" "extensions/systemd/tests")
register_extension_linter(minifi-systemd-extension-linter)
diff --git a/extensions/systemd/ConsumeJournald.cpp b/extensions/systemd/ConsumeJournald.cpp
index 1e0dc1d40..073746cdc 100644
--- a/extensions/systemd/ConsumeJournald.cpp
+++ b/extensions/systemd/ConsumeJournald.cpp
@@ -32,8 +32,8 @@ namespace org::apache::nifi::minifi::extensions::systemd {
namespace chr = std::chrono;
-ConsumeJournald::ConsumeJournald(std::string_view name, const utils::Identifier &id, std::unique_ptr<libwrapper::LibWrapper>&& libwrapper)
- :core::Processor{name, id}, libwrapper_{std::move(libwrapper)}
+ConsumeJournald::ConsumeJournald(const std::string_view name, const utils::Identifier &id, std::unique_ptr<libwrapper::LibWrapper>&& libwrapper)
+ :core::ProcessorImpl{name, id}, libwrapper_{std::move(libwrapper)}
{}
void ConsumeJournald::initialize() {
diff --git a/extensions/systemd/ConsumeJournald.h b/extensions/systemd/ConsumeJournald.h
index fddfd3647..a12e6c911 100644
--- a/extensions/systemd/ConsumeJournald.h
+++ b/extensions/systemd/ConsumeJournald.h
@@ -35,7 +35,7 @@
#include "core/PropertyDefinitionBuilder.h"
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "libwrapper/LibWrapper.h"
#include "utils/Deleters.h"
#include "utils/gsl.h"
@@ -45,7 +45,7 @@ namespace org::apache::nifi::minifi::extensions::systemd {
enum class PayloadFormat { Raw, Syslog };
-class ConsumeJournald final : public core::Processor {
+class ConsumeJournald final : public core::ProcessorImpl {
public:
static constexpr const char* CURSOR_KEY = "cursor";
static constexpr const char* PAYLOAD_FORMAT_RAW = "Raw";
diff --git a/extensions/test-processors/KamikazeProcessor.h b/extensions/test-processors/KamikazeProcessor.h
index 08ecb6a32..8b90d7878 100644
--- a/extensions/test-processors/KamikazeProcessor.h
+++ b/extensions/test-processors/KamikazeProcessor.h
@@ -31,7 +31,7 @@
namespace org::apache::nifi::minifi::processors {
-class KamikazeProcessor : public core::Processor {
+class KamikazeProcessor : public core::ProcessorImpl {
public:
EXTENSIONAPI static const std::string OnScheduleExceptionStr;
EXTENSIONAPI static const std::string OnTriggerExceptionStr;
@@ -40,7 +40,7 @@ class KamikazeProcessor : public core::Processor {
EXTENSIONAPI static const std::string OnUnScheduleLogStr;
explicit KamikazeProcessor(std::string_view name, const utils::Identifier& uuid = utils::Identifier())
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
EXTENSIONAPI static constexpr const char* Description = "This processor can throw exceptions in onTrigger and onSchedule calls based on configuration. Only for testing purposes.";
diff --git a/extensions/test-processors/LogOnDestructionProcessor.h b/extensions/test-processors/LogOnDestructionProcessor.h
index 7306818bf..0d03c2c25 100644
--- a/extensions/test-processors/LogOnDestructionProcessor.h
+++ b/extensions/test-processors/LogOnDestructionProcessor.h
@@ -22,15 +22,15 @@
#include <string>
#include <utility>
-#include "core/logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "core/Processor.h"
namespace org::apache::nifi::minifi::processors {
-class LogOnDestructionProcessor : public core::Processor {
+class LogOnDestructionProcessor : public core::ProcessorImpl {
public:
explicit LogOnDestructionProcessor(std::string_view name, const utils::Identifier& uuid = utils::Identifier())
- : Processor(name, uuid) {
+ : ProcessorImpl(name, uuid) {
}
~LogOnDestructionProcessor() override {
diff --git a/extensions/windows-event-log/Bookmark.h b/extensions/windows-event-log/Bookmark.h
index 832a33f2e..0b17a2e82 100644
--- a/extensions/windows-event-log/Bookmark.h
+++ b/extensions/windows-event-log/Bookmark.h
@@ -27,7 +27,7 @@
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
#include "wel/UniqueEvtHandle.h"
-#include "logging/Logger.h"
+#include "core/logging/Logger.h"
#include "utils/expected.h"
#include "wel/EventPath.h"
diff --git a/extensions/windows-event-log/ConsumeWindowsEventLog.cpp b/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
index 9c23fe65a..62a7743f4 100644
--- a/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
+++ b/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
@@ -45,7 +45,7 @@
#include "core/Resource.h"
#include "Bookmark.h"
#include "utils/Deleters.h"
-#include "logging/LoggerConfiguration.h"
+#include "core/logging/LoggerFactory.h"
#include "utils/gsl.h"
#include "utils/OsUtils.h"
@@ -62,7 +62,7 @@ namespace org::apache::nifi::minifi::processors {
const int EVT_NEXT_TIMEOUT_MS = 500;
ConsumeWindowsEventLog::ConsumeWindowsEventLog(const std::string& name, const utils::Identifier& uuid)
- : core::Processor(name, uuid),
+ : core::ProcessorImpl(name, uuid),
logger_(core::logging::LoggerFactory<ConsumeWindowsEventLog>::getLogger(uuid_)) {
char buff[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = sizeof(buff);
diff --git a/extensions/windows-event-log/ConsumeWindowsEventLog.h b/extensions/windows-event-log/ConsumeWindowsEventLog.h
index 3a86fa33e..e939d627f 100644
--- a/extensions/windows-event-log/ConsumeWindowsEventLog.h
+++ b/extensions/windows-event-log/ConsumeWindowsEventLog.h
@@ -77,7 +77,7 @@ enum class JsonFormat {
class Bookmark;
-class ConsumeWindowsEventLog : public core::Processor {
+class ConsumeWindowsEventLog : public core::ProcessorImpl {
public:
explicit ConsumeWindowsEventLog(const std::string& name, const utils::Identifier& uuid = {});
diff --git a/extensions/windows-event-log/TailEventLog.cpp b/extensions/windows-event-log/TailEventLog.cpp
index 827c36a89..a055ad53e 100644
--- a/extensions/windows-event-log/TailEventLog.cpp
+++ b/extensions/windows-event-log/TailEventLog.cpp
@@ -31,6 +31,7 @@
#include "core/Resource.h"
#include "utils/OsUtils.h"
+#include "core/Property.h"
namespace org::apache::nifi::minifi::processors {
diff --git a/extensions/windows-event-log/TailEventLog.h b/extensions/windows-event-log/TailEventLog.h
index d155e9d8d..d91ff85bc 100644
--- a/extensions/windows-event-log/TailEventLog.h
+++ b/extensions/windows-event-log/TailEventLog.h
@@ -22,6 +22,8 @@
#include <memory>
#include <string>
+#include <Windows.h>
+
#include "core/Core.h"
#include "FlowFileRecord.h"
#include "core/Processor.h"
@@ -40,10 +42,10 @@ namespace processors {
const LPCWSTR pEventTypeNames[] = { L"Error", L"Warning", L"Informational", L"Audit Success", L"Audit Failure" };
const char log_name[255] = "Application";
-class TailEventLog : public core::Processor {
+class TailEventLog : public core::ProcessorImpl {
public:
explicit TailEventLog(const std::string& name, const utils::Identifier& uuid = {})
- : core::Processor(name, uuid) {
+ : core::ProcessorImpl(name, uuid) {
}
virtual ~TailEventLog() = default;
diff --git a/libminifi/CMakeLists.txt b/libminifi/CMakeLists.txt
index 73a3fc262..b10ef2ca8 100644
--- a/libminifi/CMakeLists.txt
+++ b/libminifi/CMakeLists.txt
@@ -42,7 +42,14 @@ endif()
set(TLS_SOURCES "src/utils/tls/*.cpp" "src/io/tls/*.cpp")
-file(GLOB SOURCES "src/agent/*.cpp" "src/properties/*.cpp" "src/utils/file/*.cpp" "src/sitetosite/*.cpp" "src/core/logging/*.cpp" "src/core/logging/internal/*.cpp" "src/core/logging/alert/*.cpp" "src/core/state/*.cpp" "src/core/state/nodes/*.cpp" "src/c2/protocols/*.cpp" "src/c2/triggers/*.cpp" "src/c2/*.cpp" "src/io/*.cpp" ${SOCKET_SOURCES} ${TLS_SOURCES} "src/core/controller/*.cpp" "src/controllers/*.cpp" "src/controllers/keyvalue/*.cpp" "src/core/*.cpp" "src/core/repository/*.cpp" " [...]
+file(GLOB SOURCES
+ "src/agent/*.cpp" "src/properties/*.cpp" "src/utils/file/*.cpp" "src/sitetosite/*.cpp"
+ "src/core/logging/*.cpp" "src/core/logging/internal/*.cpp" "src/core/logging/alert/*.cpp"
+ "src/core/state/*.cpp" "src/core/state/nodes/*.cpp" "src/c2/protocols/*.cpp" "src/c2/triggers/*.cpp"
+ "src/c2/*.cpp" "src/io/*.cpp" ${SOCKET_SOURCES} ${TLS_SOURCES} "src/core/controller/*.cpp"
+ "src/controllers/*.cpp" "src/core/*.cpp" "src/core/repository/*.cpp" "src/core/flow/*.cpp"
+ "src/core/json/*.cpp" "src/core/yaml/*.cpp" "src/core/reporting/*.cpp" "src/core/extension/*.cpp"
+ "src/serialization/*.cpp" "src/provenance/*.cpp" "src/utils/*.cpp" "src/*.cpp" "src/http/*.cpp")
# manually add this as it might not yet be present when this executes
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/agent_version.cpp")
@@ -76,7 +83,7 @@ endif()
include(RangeV3)
include(Asio)
include(MagicEnum)
-list(APPEND LIBMINIFI_LIBRARIES yaml-cpp ZLIB::ZLIB concurrentqueue RapidJSON spdlog::spdlog Threads::Threads gsl-lite libsodium range-v3 expected-lite date::date date::tz asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON fmt::fmt)
+list(APPEND LIBMINIFI_LIBRARIES minifi-utils yaml-cpp ZLIB::ZLIB concurrentqueue RapidJSON spdlog::spdlog Threads::Threads gsl-lite libsodium range-v3 expected-lite asio magic_enum OpenSSL::Crypto OpenSSL::SSL CURL::libcurl RapidJSON fmt::fmt)
if(NOT WIN32)
list(APPEND LIBMINIFI_LIBRARIES OSSP::libuuid++)
endif()
@@ -91,7 +98,7 @@ if (UNIX AND (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7"))
target_link_libraries(core-minifi "-latomic")
endif()
-SET (LIBMINIFI core-minifi PARENT_SCOPE)
+SET(LIBMINIFI minifi-api minifi-extension-utils $<LINK_ONLY:core-minifi> PARENT_SCOPE)
if (WIN32)
install(TARGETS core-minifi ARCHIVE DESTINATION bin COMPONENT bin)
diff --git a/libminifi/include/Connection.h b/libminifi/include/Connection.h
index 0cabbfdd3..114c33a90 100644
--- a/libminifi/include/Connection.h
+++ b/libminifi/include/Connection.h
@@ -35,6 +35,7 @@
#include "core/FlowFile.h"
#include "core/Repository.h"
#include "utils/FlowFileQueue.h"
+#include "minifi-cpp/Connection.h"
namespace org::apache::nifi::minifi {
@@ -42,123 +43,123 @@ namespace test::utils {
struct ConnectionTestAccessor;
} // namespace test::utils
-class Connection : public core::Connectable {
+class ConnectionImpl : public core::ConnectableImpl, public virtual Connection {
friend struct test::utils::ConnectionTestAccessor;
public:
- explicit Connection(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name);
- explicit Connection(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid);
- explicit Connection(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid,
+ explicit ConnectionImpl(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name);
+ explicit ConnectionImpl(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid);
+ explicit ConnectionImpl(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid,
const utils::Identifier &srcUUID);
- explicit Connection(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid,
+ explicit ConnectionImpl(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::string_view name, const utils::Identifier &uuid,
const utils::Identifier &srcUUID, const utils::Identifier &destUUID);
- explicit Connection(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::shared_ptr<SwapManager> swap_manager,
+ explicit ConnectionImpl(std::shared_ptr<core::Repository> flow_repository, std::shared_ptr<core::ContentRepository> content_repo, std::shared_ptr<SwapManager> swap_manager,
std::string_view name, const utils::Identifier& uuid);
- ~Connection() override = default;
+ ~ConnectionImpl() override = default;
- Connection(const Connection &parent) = delete;
- Connection &operator=(const Connection &parent) = delete;
+ ConnectionImpl(const ConnectionImpl &parent) = delete;
+ ConnectionImpl &operator=(const ConnectionImpl &parent) = delete;
static constexpr uint64_t DEFAULT_BACKPRESSURE_THRESHOLD_COUNT = 2000;
static constexpr uint64_t DEFAULT_BACKPRESSURE_THRESHOLD_DATA_SIZE = 100_MB;
- void setSourceUUID(const utils::Identifier &uuid) {
+ void setSourceUUID(const utils::Identifier &uuid) override {
src_uuid_ = uuid;
}
- void setDestinationUUID(const utils::Identifier &uuid) {
+ void setDestinationUUID(const utils::Identifier &uuid) override {
dest_uuid_ = uuid;
}
- utils::Identifier getSourceUUID() const {
+ utils::Identifier getSourceUUID() const override {
return src_uuid_;
}
- utils::Identifier getDestinationUUID() const {
+ utils::Identifier getDestinationUUID() const override {
return dest_uuid_;
}
- void setSource(core::Connectable* source) {
+ void setSource(core::Connectable* source) override {
source_connectable_ = source;
}
- core::Connectable* getSource() const {
+ core::Connectable* getSource() const override {
return source_connectable_;
}
- void setDestination(core::Connectable* dest) {
+ void setDestination(core::Connectable* dest) override {
dest_connectable_ = dest;
}
- core::Connectable* getDestination() const {
+ core::Connectable* getDestination() const override {
return dest_connectable_;
}
- void addRelationship(core::Relationship relationship) {
+ void addRelationship(core::Relationship relationship) override {
relationships_.insert(std::move(relationship));
}
- const std::set<core::Relationship> &getRelationships() const {
... 22296 lines suppressed ...