johnjcasey commented on code in PR #17305:
URL: https://github.com/apache/beam/pull/17305#discussion_r845239477


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileIO.java:
##########
@@ -627,16 +677,32 @@ public MatchAll continuously(
                 "Match filepatterns",
                 ParDo.of(new 
MatchFn(getConfiguration().getEmptyMatchTreatment())));
       } else {
-        res =
-            input
-                .apply(
-                    "Continuously match filepatterns",
-                    Watch.growthOf(
-                            Contextful.of(new MatchPollFn(), 
Requirements.empty()),
-                            new ExtractFilenameFn())
-                        
.withPollInterval(getConfiguration().getWatchInterval())
-                        
.withTerminationPerInput(getConfiguration().getWatchTerminationCondition()))
-                .apply(Values.create());
+        if (getConfiguration().getMatchUpdatedFiles()) {
+          res =

Review Comment:
   Because most of this code is duplicated, we should try and inspect 
.getMatchUpdatedFiles further in, or we should extract the duplicated code into 
a helper method



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