[ 
https://issues.apache.org/jira/browse/BEAM-14267?focusedWorklogId=754307&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-754307
 ]

ASF GitHub Bot logged work on BEAM-14267:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/22 19:51
            Start Date: 07/Apr/22 19:51
    Worklog Time Spent: 10m 
      Work Description: 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





Issue Time Tracking
-------------------

    Worklog Id:     (was: 754307)
    Time Spent: 1h 10m  (was: 1h)

> Update watchForNewFiles to allow reading already read files with a new 
> timestamp
> --------------------------------------------------------------------------------
>
>                 Key: BEAM-14267
>                 URL: https://issues.apache.org/jira/browse/BEAM-14267
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-files
>            Reporter: Yi Hu
>            Assignee: Yi Hu
>            Priority: P2
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> In TextIO and AvroIO, we have a configuration option called watchForNewFiles, 
> and in FileIO.MatchConfiguration, we have an option called watchInterval. 
> Right now, these match any files according to the filtering criteria, and 
> then periodically check for new files. A file is determined to be new if it 
> has a different filename than a file that has already been read.
> We want to add an option to choose to consider a file new if it has a 
> different timestamp from an existing file, even if the file itself has the 
> same name.
> See the following design doc for more detail:
> [https://docs.google.com/document/d/1xnacyLGNh6rbPGgTAh5D1gZVR8rHUBsMMRV3YkvlL08/edit?usp=sharing&resourcekey=0-be0uF-DdmwAz6Vg4Li9FNw]
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to