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

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

                Author: ASF GitHub Bot
            Created on: 18/Apr/22 21:19
            Start Date: 18/Apr/22 21:19
    Worklog Time Spent: 10m 
      Work Description: Abacn commented on code in PR #17380:
URL: https://github.com/apache/beam/pull/17380#discussion_r852422314


##########
sdks/python/apache_beam/io/filesystem.py:
##########
@@ -421,27 +421,44 @@ def __exit__(self, exception_type, exception_value, 
traceback):
 
 
 class FileMetadata(object):
-  """Metadata about a file path that is the output of FileSystem.match."""
-  def __init__(self, path, size_in_bytes):
+  """Metadata about a file path that is the output of FileSystem.match.
+
+  Fields:
+    path: [Required] file path.
+    size_in_bytes: [Required] file size in bytes.
+    last_updated_in_seconds: [Optional] last modified timestamp of the file, or
+    valued 0.0 if not specified.

Review Comment:
   Here it used the same unit with the existing filesystem.last_updated return 
value. It may be a language-specific convention: scalar timestamp in python 
appears in float seconds such as `datetime.time.time()`, 
`os.path.getmtime(dir)`; while in java appears in long milliseconds such as 
`Date.getTime()`.





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

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

> Add last_updated field in filesystem.FileMetaData
> -------------------------------------------------
>
>                 Key: BEAM-14314
>                 URL: https://issues.apache.org/jira/browse/BEAM-14314
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-py-common
>            Reporter: Yi Hu
>            Assignee: Yi Hu
>            Priority: P2
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> This will be the python counterpart of BEAM-5910
> Per python naming convention, the field will be named as 
> "last_updated_in_seconds".



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

Reply via email to