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

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

                Author: ASF GitHub Bot
            Created on: 12/May/22 14:39
            Start Date: 12/May/22 14:39
    Worklog Time Spent: 10m 
      Work Description: Abacn commented on code in PR #17604:
URL: https://github.com/apache/beam/pull/17604#discussion_r871464993


##########
sdks/python/apache_beam/io/fileio.py:
##########
@@ -835,10 +839,15 @@ def finish_bundle(self):
 
 
 class _RemoveDuplicates(beam.DoFn):
-
+  """Internal DoFn that filters out filenames already seen (even though the 
file
+  has updated)."""
   COUNT_STATE = CombiningValueStateSpec('count', combine_fn=sum)
 
-  def process(self, element, count_state=beam.DoFn.StateParam(COUNT_STATE)):
+  def process(
+      self,
+      element: Tuple[str, filesystem.FileMetadata],

Review Comment:
   Got warnings 
   ```
   WARNING:apache_beam.transforms.core:Key coder FastPrimitivesCoder for 
transform <ParDo(PTransform) label=[RemoveAlreadyRead]> with stateful DoFn may 
not be deterministic.
   This may cause incorrect behavior for complex key types.
   Consider adding an input type hint for this transform.
   
   WARNING:apache_beam.transforms.core:Key coder FastPrimitivesCoder for 
transform <ParDo(PTransform) label=[RemoveOldAlreadyRead]> with stateful DoFn 
may not be deterministic.
   This may cause incorrect behavior for complex key types.
   Consider adding an input type hint for this transform.
   ```
   tried these type hints but the warning persist. This may be relevant to 
flaky tests. How can I add typehint properly and resolve these warnings?





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

    Worklog Id:     (was: 769692)
    Time Spent: 50m  (was: 40m)

> Update fileio.MatchContinuously to allow reading already read files with a 
> new timestamp
> ----------------------------------------------------------------------------------------
>
>                 Key: BEAM-14315
>                 URL: https://issues.apache.org/jira/browse/BEAM-14315
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-py-common
>            Reporter: Yi Hu
>            Assignee: Yi Hu
>            Priority: P2
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> This will be the Python counterpart of BEAM-14267.
> For fileio.MatchContinuously, 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.7#820007)

Reply via email to