nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #917: MINIFICPP-1380 - Batch behavior for CompressContent and MergeContent processors
Date Tue, 13 Oct 2020 07:05:59 GMT

adamdebreceni commented on a change in pull request #917:
URL: https://github.com/apache/nifi-minifi-cpp/pull/917#discussion_r503712927



##########
File path: extensions/libarchive/BinFiles.cpp
##########
@@ -38,12 +38,34 @@ namespace nifi {
 namespace minifi {
 namespace processors {
 
-core::Property BinFiles::MinSize("Minimum Group Size", "The minimum size of for the bundle",
"0");
-core::Property BinFiles::MaxSize("Maximum Group Size", "The maximum size for the bundle.
If not specified, there is no maximum.", "");
-core::Property BinFiles::MinEntries("Minimum Number of Entries", "The minimum number of files
to include in a bundle", "1");
-core::Property BinFiles::MaxEntries("Maximum Number of Entries", "The maximum number of files
to include in a bundle. If not specified, there is no maximum.", "");
-core::Property BinFiles::MaxBinAge("Max Bin Age", "The maximum age of a Bin that will trigger
a Bin to be complete. Expected format is <duration> <time unit>", "");
-core::Property BinFiles::MaxBinCount("Maximum number of Bins", "Specifies the maximum number
of bins that can be held in memory at any one time", "100");
+core::Property BinFiles::MinSize(
+    core::PropertyBuilder::createProperty("Minimum Group Size")
+    ->withDescription("The minimum size of for the bundle")
+    ->withDefaultValue<uint64_t>(0)->build());
+core::Property BinFiles::MaxSize(
+    core::PropertyBuilder::createProperty("Maximum Group Size")
+    ->withDescription("The maximum size for the bundle. If not specified, there is no
maximum.")
+    ->withType(core::StandardValidators::get().UNSIGNED_LONG_VALIDATOR)->build());
+core::Property BinFiles::MinEntries(
+    core::PropertyBuilder::createProperty("Minimum Number of Entries")
+    ->withDescription("The minimum number of files to include in a bundle")
+    ->withDefaultValue<uint32_t>(1)->build());
+core::Property BinFiles::MaxEntries(
+    core::PropertyBuilder::createProperty("Maximum Number of Entries")
+    ->withDescription("The maximum number of files to include in a bundle. If not specified,
there is no maximum.")
+    ->withType(core::StandardValidators::get().UNSIGNED_INT_VALIDATOR)->build());
+core::Property BinFiles::MaxBinAge(
+    core::PropertyBuilder::createProperty("Max Bin Age")
+    ->withDescription("The maximum age of a Bin that will trigger a Bin to be complete.
Expected format is <duration> <time unit>")
+    ->withType(core::StandardValidators::get().TIME_PERIOD_VALIDATOR)->build());
+core::Property BinFiles::MaxBinCount(
+    core::PropertyBuilder::createProperty("Maximum number of Bins")
+    ->withDescription("Specifies the maximum number of bins that can be held in memory
at any one time")
+    ->withDefaultValue<uint32_t>(100)->build());
+core::Property BinFiles::BatchSize(
+    core::PropertyBuilder::createProperty("Batch Size")
+    ->withDescription("Maximum number of FlowFiles processed in a single session")
+    ->withDefaultValue<uint32_t>(1)->build());

Review comment:
       I wanted to preserve the original behavior, as this is an optimazation feature the
user can configure on an as-needed basis.
   Should we change it, and if so, what do you think would be the appropriate default?




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message