ijokarumawak commented on a change in pull request #3375: NIFI-5979 : enhanced 
ReplaceText processor with "Number of Occurrences" and "Occurrence offset" 
configurations
URL: https://github.com/apache/nifi/pull/3375#discussion_r270277559
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceText.java
 ##########
 @@ -161,9 +169,9 @@
         .build();
     public static final PropertyDescriptor EVALUATION_MODE = new 
PropertyDescriptor.Builder()
         .name("Evaluation Mode")
-        .description("Run the 'Replacement Strategy' against each line 
separately (Line-by-Line) or buffer the entire file into memory (Entire Text) "
-            + "and run against that.")
-        .allowableValues(LINE_BY_LINE, ENTIRE_TEXT)
+        .description("Run the 'Replacement Strategy' against each line 
separately (Line-by-Line), First Line (Header) alone, Last Line (Footer) alone,"
+            +"Except the First Line, Except the Last Line or buffer the entire 
file into memory (Entire Text) and run against that.")
+        .allowableValues(LINE_BY_LINE, FIRST_LINE, LAST_LINE, 
EXCEPT_FIRST_LINE, EXCEPT_LAST_LINE, ENTIRE_TEXT)
 
 Review comment:
   While testing the new modes and looking at the changed code, I start feeling 
we should separate these new configuration into a different property.
   
   It would be more self-descriptive if we call these modes as `Line-by-Line 
Evaluation Mode`. If so, we need one more option, `ALL` which should be the 
default. If we do this, the logic will be encapsulated in a method better.

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


With regards,
Apache Git Services

Reply via email to