szaszm commented on a change in pull request #900:
URL: https://github.com/apache/nifi-minifi-cpp/pull/900#discussion_r501010516



##########
File path: extensions/libarchive/MergeContent.cpp
##########
@@ -72,10 +74,12 @@ core::Property MergeContent::AttributeStrategy(
                     "only the attributes that exist on all FlowFiles in the 
bundle, with the same value, will be preserved.")
   
->withAllowableValues<std::string>({merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON,
 merge_content_options::ATTRIBUTE_STRATEGY_KEEP_ALL_UNIQUE})
   
->withDefaultValue(merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON)->build());
+core::Property MergeContent::FlowFileSerializer(
+  core::PropertyBuilder::createProperty("Flow File Serializer")
+  ->withDescription("Determines how to flow files should be serialized before 
merging")
+  
->withAllowableValues<std::string>({merge_content_options::SERIALIZER_PAYLOAD, 
merge_content_options::SERIALIZER_FLOW_FILE_V3})
+  ->withDefaultValue(merge_content_options::SERIALIZER_PAYLOAD)->build());

Review comment:
       I agree on the implementation level, but on the interface, compatibility 
with NiFi offers a greater benefit than separation of concerns IMO. Now you can 
create a tar of FFv3-serialized flow files, but what would you do with it if 
NiFi can't handle it?
   
   Sometimes it makes sense to allow mixing and matching of mergers and 
serializers, but in many cases, a merge format restricts the available 
serializations or the other way around, so coupling these on the interface 
could make for a safer user (yaml) interface.
   
   Separation of merge and flow file serialization in NiFi implementation: 
https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java#L448




----------------------------------------------------------------
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]


Reply via email to