Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2180#discussion_r142480211
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java
 ---
    @@ -102,8 +107,26 @@
                 .defaultValue(WRITE_CONCERN_ACKNOWLEDGED)
                 .build();
     
    +    static final PropertyDescriptor RESULTS_PER_FLOWFILE = new 
PropertyDescriptor.Builder()
    +            .name("results-per-flowfile")
    +            .displayName("Results Per FlowFile")
    +            .description("How many results to put into a flowfile at once. 
The whole body will be treated as a JSON array of results.")
    +            .required(false)
    +            .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
    +            .defaultValue("1")
    +            .build();
    +
    +    static final PropertyDescriptor BATCH_SIZE = new 
PropertyDescriptor.Builder()
    +            .name("Batch Size")
    --- End diff --
    
    In this case, the guidance for a new `PropertyDescriptor` in an existing 
class (or new class) is to add a `displayName` value and provide a 
"machine-readable" (i.e. no space) value for `name`. When modifying an 
*existing* `PropertyDescriptor`, adding a `displayName` value is encouraged, 
but modifying the `name` will break backward compatibility with existing flows. 


---

Reply via email to