[
https://issues.apache.org/jira/browse/BEAM-14314?focusedWorklogId=762576&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762576
]
ASF GitHub Bot logged work on BEAM-14314:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Apr/22 21:49
Start Date: 26/Apr/22 21:49
Worklog Time Spent: 10m
Work Description: 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?
Issue Time Tracking
-------------------
Worklog Id: (was: 762576)
Time Spent: 2h 20m (was: 2h 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: 2h 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.7#820007)