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

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

                Author: ASF GitHub Bot
            Created on: 20/Feb/20 18:28
            Start Date: 20/Feb/20 18:28
    Worklog Time Spent: 10m 
      Work Description: KevinGG commented on pull request #10899: [BEAM-8335] 
Background Caching job
URL: https://github.com/apache/beam/pull/10899#discussion_r382179158
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/interactive/interactive_environment.py
 ##########
 @@ -130,6 +139,17 @@ def __init__(self, cache_manager=None):
           'You have limited Interactive Beam features since your '
           'ipython kernel is not connected any notebook frontend.')
 
+  @property
+  def options(self):
+    """A reference to the global interactive options.
+
+    Provided to avoid import loop or excessive dynamic import. All internal
+    Interactive Beam modules should access interactive_beam.options through
+    this property.
+    """
+    from apache_beam.runners.interactive.interactive_beam import options
+    return options
 
 Review comment:
   This is a getter, not a setter, and it's used by internal modules, not users.
   Users always do:
   ```
   # Static import once.
   from apache_beam.runners.interactive import interactive_beam as ib
   # Use it everywhere.
   ib.options.<setter/getter>
   ```
   
   The purpose is to simplify below usages:
   In an `interactive beam` internal module, when accessing options:
   ```
   # Dynamic import when needed. Because no internal module should depend on 
   # `interactive_beam` in a static way to avoid an import loop. Also the 
`interactive_beam` module
   # provides APIs to the end user, should not be mixed into the implementation.
   # In a local scope:
   from apache_beam.runners.interactive.interactive_beam import options
   use(options.getter)
   ...
   # In another local scope:
   from apache_beam.runners.interactive.interactive_beam import options
   use(options.xxx)
   ...
   ```
   Since most modules accessing global states have `interactive_environment` as 
a static dependency, providing this getter in `interactive_environment` 
simplified the usage to:
   ```
   # Static import once, most modules have this as dependency already.
   from apache_beam.runners.interactive import interactive_environment as ie
   # In a local scope:
   use(ie.current_env().options.getter)
   ...
   # In another local scope:
   use(ie.current_env().options.getter)
   ```
 
----------------------------------------------------------------
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: 390154)
    Time Spent: 66h 40m  (was: 66.5h)

> Add streaming support to Interactive Beam
> -----------------------------------------
>
>                 Key: BEAM-8335
>                 URL: https://issues.apache.org/jira/browse/BEAM-8335
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-py-interactive
>            Reporter: Sam Rohde
>            Assignee: Sam Rohde
>            Priority: Major
>          Time Spent: 66h 40m
>  Remaining Estimate: 0h
>
> This issue tracks the work items to introduce streaming support to the 
> Interactive Beam experience. This will allow users to:
>  * Write and run a streaming job in IPython
>  * Automatically cache records from unbounded sources
>  * Add a replay experience that replays all cached records to simulate the 
> original pipeline execution
>  * Add controls to play/pause/stop/step individual elements from the cached 
> records
>  * Add ability to inspect/visualize unbounded PCollections



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to