Github user cammachusa commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2160#discussion_r140362618
--- Diff:
nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKudu.java
---
@@ -94,6 +97,29 @@
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
+ protected static final PropertyDescriptor FLUSH_MODE = new
PropertyDescriptor.Builder()
+ .name("Flush Mode")
+ .description("Set the new flush mode for a kudu session\n" +
+ "AUTO_FLUSH_SYNC: the call returns when the operation
is persisted, else it throws an exception.\n" +
+ "AUTO_FLUSH_BACKGROUND: the call returns when the
operation has been added to the buffer. This call should normally perform only
fast in-memory" +
+ " operations but it may have to wait when the buffer
is full and there's another buffer being flushed.\n" +
+ "MANUAL_FLUSH: the call returns when the operation has
been added to the buffer, else it throws a KuduException if the buffer is
full.")
+ .allowableValues(SessionConfiguration.FlushMode.values())
+
.defaultValue(SessionConfiguration.FlushMode.AUTO_FLUSH_BACKGROUND.toString())
+ .required(true)
+ .build();
+
+ protected static final PropertyDescriptor BATCH_SIZE = new
PropertyDescriptor.Builder()
+ .name("Batch Size")
+ .description("Set the number of operations that can be
buffered, between 2 - 100000. " +
+ "Depend on your memory size, and data size per row set
an appropriate batch size. " +
+ "Gradually increase this number to find out your best
one for best performance")
+ .defaultValue("100")
+ .required(true)
+ .addValidator(StandardValidators.createLongValidator(2,
100000, true))
--- End diff --
The value of 1 wouldn't make sense. If set 1, the buffer will always have
one item, since its purpose is to queue up coming items. Second, doing so, will
significantly degrade the performance. The read always faster than the write.
---