mark-bathori commented on code in PR #8348:
URL: https://github.com/apache/nifi/pull/8348#discussion_r1476037914


##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/ListS3.java:
##########
@@ -335,26 +345,41 @@ public void onPrimaryNodeChange(final PrimaryNodeState 
newState) {
         justElectedPrimaryNode = (newState == 
PrimaryNodeState.ELECTED_PRIMARY_NODE);
     }
 
+    @Override
+    public void onPropertyModified(final PropertyDescriptor descriptor, final 
String oldValue, final String newValue) {
+        if (isConfigurationRestored() && 
TRACKING_RESET_PROPERTIES.contains(descriptor)) {
+            resetTracking = true;
+        }
+    }
+
     @OnScheduled
-    public void initListedEntityTracker(ProcessContext context) {
+    public void initTrackingStrategy(ProcessContext context) throws 
IOException {
+        final boolean isTrackingTimestampsStrategy = 
BY_TIMESTAMPS.getValue().equals(context.getProperty(LISTING_STRATEGY).getValue());
         final boolean isTrackingEntityStrategy = 
BY_ENTITIES.getValue().equals(context.getProperty(LISTING_STRATEGY).getValue());

Review Comment:
   The `LISTING_STRATEGY` property's value retrieval can be extracted so it 
will be evaluated only once.
   ```suggestion
   final String listingStrategy = 
context.getProperty(LISTING_STRATEGY).getValue();
           final boolean isTrackingTimestampsStrategy = 
BY_TIMESTAMPS.getValue().equals(listingStrategy);
           final boolean isTrackingEntityStrategy = 
BY_ENTITIES.getValue().equals(listingStrategy);
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to