Skip to content

MINIFICPP-2868 - Remove getProcessorType from ProcessorApi - #2219

Closed
adamdebreceni wants to merge 2 commits into
apache:mainfrom
adamdebreceni:MINIFICPP-2868
Closed

MINIFICPP-2868 - Remove getProcessorType from ProcessorApi#2219
adamdebreceni wants to merge 2 commits into
apache:mainfrom
adamdebreceni:MINIFICPP-2868

Conversation

@adamdebreceni

Copy link
Copy Markdown
Contributor

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.

@martinzink
martinzink requested a lite review from Copilot August 5, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR removes the getProcessorType() virtual from the public ProcessorApi interface and shifts responsibility for processor “type” to the core::Processor wrapper, updating construction sites across core and extensions accordingly.

Changes:

  • Removed getProcessorType() from ProcessorApi/ProcessorImpl and related helper macros.
  • Introduced type_ stored on core::Processor and updated constructors/call sites to pass the type explicitly.
  • Updated tests/fixtures and configuration code to construct core::Processor with a type derived from class names or literals.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
minifi-api/include/minifi-cpp/core/ProcessorApi.h Removes getProcessorType() from the public API interface.
core-framework/include/core/ProcessorImpl.h Removes the macro and pure virtual related to getProcessorType().
libminifi/include/core/Processor.h Changes Processor constructor to require a type and adds type_ member.
libminifi/src/core/Processor.cpp Stores a passed-in type and returns it from getProcessorType().
libminifi/src/core/ClassLoader.cpp Passes a derived short class name as processor type.
libminifi/src/core/FlowConfiguration.cpp Constructs reporting task processor with explicit type/name/uuid.
libminifi/src/core/flow/StructuredConfiguration.cpp Wraps funnel/RPG port using literal processor type strings.
libminifi/include/Port.h Makes Port final and passes literal type "Port".
libminifi/include/utils/CProcessor.h Removes CProcessor’s getProcessorType() override.
extension-framework/include/core/AbstractProcessor.h Removes final getProcessorType() implementation.
libminifi/test/libtest/unit/ProcessorUtils.h Updates test helpers to pass derived type and adds StringUtils include.
extension-framework/cpp-extension-lib/libtest/CProcessorTestUtils.h Derives type from description and passes it to Processor.
extensions/python/ExecutePythonProcessor.h Removes ADD_GET_PROCESSOR_NAME usage.
extensions/python/tests/ExecutePythonProcessorTests.cpp Updates processor wrapper construction to pass explicit type.
extensions/azure/tests/*.cpp, *.h Updates processor wrapper construction to pass explicit type.
extensions/aws/tests/S3TestsFixture.h Updates processor wrapper construction to pass explicit type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 51 to 54
virtual void initialize(ProcessorDescriptor& descriptor) = 0;
virtual bool isSingleThreaded() const = 0;
virtual std::string getProcessorType() const = 0;
virtual void onTrigger(ProcessContext&, ProcessSession&) = 0;
virtual void onSchedule(ProcessContext&, ProcessSessionFactory&) = 0;
nameStr, parent->getURL(), this->configuration_, uuid, direction);
auto* port = port_impl.get();
auto port_wrapper = std::make_unique<core::Processor>(nameStr, uuid, std::move(port_impl));
auto port_wrapper = std::make_unique<core::Processor>("RemoteProcessGroupPort", nameStr, uuid, std::move(port_impl));
});

auto funnel = std::make_unique<core::Processor>(name, uuid.value(), std::make_unique<minifi::Funnel>(name, uuid.value()));
auto funnel = std::make_unique<core::Processor>("Funnel", name, uuid.value(), std::make_unique<minifi::Funnel>(name, uuid.value()));
.logger = minifi::core::logging::LoggerFactory<T>::getLogger(uuid.value())
});
return std::make_unique<core::Processor>(name, uuid.value(), std::move(processor_impl));
return std::make_unique<core::Processor>(minifi::utils::string::partAfterLastOccurrenceOf(core::className<T>(), ':'), name, uuid.value(), std::move(processor_impl));
auto name = processor_impl->getName();
auto uuid = processor_impl->getUUID();
return std::make_unique<core::Processor>(name, uuid, std::move(processor_impl));
return std::make_unique<core::Processor>(minifi::utils::string::partAfterLastOccurrenceOf(core::className<T>(), ':'), name, uuid, std::move(processor_impl));
Comment thread libminifi/include/Port.h
Comment on lines +53 to +55
class Port final : public core::Processor {
public:
Port(std::string_view name, const utils::Identifier& uuid, std::unique_ptr<PortImpl> impl): Processor(name, uuid, std::move(impl)) {}
Port(std::string_view name, const utils::Identifier& uuid, std::unique_ptr<PortImpl> impl): Processor("Port", name, uuid, std::move(impl)) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants