[
https://issues.apache.org/jira/browse/BEAM-13734?focusedWorklogId=717423&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-717423
]
ASF GitHub Bot logged work on BEAM-13734:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jan/22 00:34
Start Date: 29/Jan/22 00:34
Worklog Time Spent: 10m
Work Description: VictorPlusC commented on a change in pull request
#16601:
URL: https://github.com/apache/beam/pull/16601#discussion_r794969238
##########
File path:
sdks/python/apache_beam/runners/interactive/interactive_environment.py
##########
@@ -357,19 +363,47 @@ def get_cache_manager(self, pipeline,
create_if_absent=False):
given pipeline. If the pipeline is absent from the environment while
create_if_absent is True, creates and returns a new file based cache
manager for the pipeline."""
+ if self._is_in_ipython:
+ warnings.filterwarnings(
+ 'ignore',
+ 'options is deprecated since First stable release. References to '
+ '<pipeline>.options will not be supported',
+ category=DeprecationWarning)
+
cache_manager = self._cache_managers.get(str(id(pipeline)), None)
+ if isinstance(pipeline, Pipeline):
+ if hasattr(pipeline.runner, '_underlying_runner'):
Review comment:
I've replaced the second line with isinstance(pipeline.runner,
InteractiveRunner), but I've currently kept the initial check to make sure that
the pipeline argument is a Pipeline object because we have several tests in
interactive_environment_test.py and in recording_manager_test.py that use this
function with the pipeline argument as a string. It seems that more than half
of the tests in recording_manager_test.py run into an issue where the
`pipeline.runner` code will error out as a string is being passed into this
function in those tests.
Do you think we should leave it as is, or should we fix the unit tests that
are failing in this case?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 717423)
Time Spent: 12h 40m (was: 12.5h)
> Support cache directories that use GCS buckets
> ----------------------------------------------
>
> Key: BEAM-13734
> URL: https://issues.apache.org/jira/browse/BEAM-13734
> Project: Beam
> Issue Type: New Feature
> Components: runner-py-interactive
> Reporter: Victor Chen
> Assignee: Victor Chen
> Priority: P2
> Time Spent: 12h 40m
> Remaining Estimate: 0h
>
> * Builds off of the work accomplished under BEAM-13685
> * Modified interactive_environment.py to support caching to a bucket on GCS
> for batch processing pipelines
> * If a specified bucket does not exist, the pipeline will terminate and
> return an error specifying that the bucket does not exist
> * Added cleanup() functionality to cache_manager.py, to enable the
> FileBasedCacheManager class to automatically delete cached values on GCS when
> a bucket path is specified
> * Added docstring to interactive_beam.py with an example of GCS path
> assignment
> * Cached files on GCS will be stored under a directory represented by the
> value of id(pipeline).
> ** Example cached path: gs://my-gcs-bucket/cache/dir/id(pipeline)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)