[
https://issues.apache.org/jira/browse/BEAM-6778?focusedWorklogId=213284&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-213284
]
ASF GitHub Bot logged work on BEAM-6778:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Mar/19 17:37
Start Date: 14/Mar/19 17:37
Worklog Time Spent: 10m
Work Description: boyuanzz commented on pull request #7937: [BEAM-6778]
Enable Bundle Finalization in Python SDK harness over FnApi
URL: https://github.com/apache/beam/pull/7937#discussion_r265687617
##########
File path: sdks/python/apache_beam/runners/portability/fn_api_runner_test.py
##########
@@ -753,6 +753,81 @@ def create_pipeline(self):
runner=fn_api_runner.FnApiRunner(bundle_repeat=3))
+class EventRecorder(object):
+ def __init__(self):
+ self.work_path = os.getcwd() + '/EventRecorder'
+ if os.path.exists(self.work_path):
+ self.cleanup()
+ os.mkdir(self.work_path)
+
+ def record(self, file_name):
+ file_path = os.path.join(self.work_path, str(file_name) + '.txt')
Review comment:
I don't think a finalizer could be called twice unless it's registered
twice. If a finalizer callback gets registered twice, then it's the user's
choice and I don't think we can say it's not a expected behavior. Instead, how
about adding try-catch when calling callbacks in case the situation like,
trying to delete one deleted file?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 213284)
Time Spent: 3h (was: 2h 50m)
> Enable Bundle Finalization in Python SDK
> ----------------------------------------
>
> Key: BEAM-6778
> URL: https://issues.apache.org/jira/browse/BEAM-6778
> Project: Beam
> Issue Type: New Feature
> Components: sdk-py-harness
> Reporter: Boyuan Zhang
> Assignee: Boyuan Zhang
> Priority: Major
> Time Spent: 3h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)