[ 
https://issues.apache.org/jira/browse/NIFI-4823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16343588#comment-16343588
 ] 

ASF GitHub Bot commented on NIFI-4823:
--------------------------------------

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

    https://github.com/apache/nifi/pull/2441#discussion_r164482373
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
 ---
    @@ -126,6 +127,18 @@ public ValidationResult validate(final String subject, 
final String value, final
             .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
             .build();
     
    +    static final AllowableValue YES_PP = new AllowableValue("yes", "Yes");
    +    static final AllowableValue NO_PP  = new AllowableValue("no", "No");
    +    static final PropertyDescriptor USE_PRETTY_PRINTING = new 
PropertyDescriptor.Builder()
    +        .name("use-pretty-printing")
    +        .displayName("Pretty Print Results JSON")
    +        .description("Choose whether or not to pretty print the JSON from 
the results of the query. " +
    +                "Choosing yes can greatly increase the space requirements 
on disk depending on the complexity of the JSON document")
    +        .required(true)
    +        .allowableValues(NO_PP, YES_PP)
    +        .addValidator(Validator.VALID)
    --- End diff --
    
    This doesn't really hurt but just as an FYI, it's not really necessary to 
have a validator if allowable values are provided.


> Make GetMongo JSON pretty printing optional
> -------------------------------------------
>
>                 Key: NIFI-4823
>                 URL: https://issues.apache.org/jira/browse/NIFI-4823
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Major
>
> Pretty printed JSON can explode the size of a MongoDB result set, 
> particularly on large queries. Right now, pretty printing is done all the 
> time and isn't configurable. It should be configurable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to