You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/26 21:49:58 UTC

[GitHub] [beam] pabloem commented on a diff in pull request #17380: [BEAM-14314][BEAM-9532] Add last_updated field in filesystem.FileMetaData

pabloem commented on code in PR #17380:
URL: https://github.com/apache/beam/pull/17380#discussion_r859173577


##########
sdks/python/apache_beam/io/hadoopfilesystem_test.py:
##########
@@ -36,14 +37,11 @@ class FakeFile(io.BytesIO):
   """File object for FakeHdfs"""
   __hash__ = None  # type: ignore[assignment]
 
-  def __init__(self, path, mode='', type='FILE'):
+  def __init__(self, path, mode='', type='FILE', mtime=None):
     io.BytesIO.__init__(self)
-
-    self.stat = {
-        'path': path,
-        'mode': mode,
-        'type': type,
-    }
+    if mtime is None:
+      mtime = int(time.time() * 1000)
+    self.stat = {'path': path, 'mode': mode, 'type': type, 'mtime': mtime}

Review Comment:
   would it be possible to call it `time_ms`? or is `mtime` a property of hadoop file systems somedwhere?



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org