arpadboda commented on a change in pull request #888:
URL: https://github.com/apache/nifi-minifi-cpp/pull/888#discussion_r483008523
##########
File path: extensions/libarchive/MergeContent.cpp
##########
@@ -258,6 +258,16 @@ bool MergeContent::processBin(core::ProcessContext
*context, core::ProcessSessio
});
}
+ std::shared_ptr<core::FlowFile> merge_flow =
std::static_pointer_cast<FlowFileRecord>(session->create());
+ if (attributeStrategy_ ==
merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON)
+
KeepOnlyCommonAttributesMerger(bin->getFlowFile()).mergeAttributes(session,
merge_flow);
+ else if (attributeStrategy_ ==
merge_content_options::ATTRIBUTE_STRATEGY_KEEP_ALL_UNIQUE)
+ KeepAllUniqueAttributesMerger(bin->getFlowFile()).mergeAttributes(session,
merge_flow);
+ else {
+ logger_->log_error("Attribute strategy not supported %s",
attributeStrategy_);
+ throw minifi::Exception(ExceptionType::PROCESSOR_EXCEPTION, "Invalid
attribute strategy: " + attributeStrategy_);
Review comment:
I think this error should be handled in onSchedule.
This function (processbin) is called runtime, config issues shouldn't be
handled here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]