Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Attempt prism for pipelines with unbounded PCollections.
Also fix error with terminal state checking.
  • Loading branch information
robertwb committed Apr 24, 2025
commit f0f7a4200ae5e69fa1951999334c9f1e72b5aacf
7 changes: 6 additions & 1 deletion sdks/python/apache_beam/runners/direct/direct_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def visit_transform(self, applied_ptransform):
if timer.time_domain == TimeDomain.REAL_TIME:
self.supported_by_fnapi_runner = False

def visit_value(self, value, producer_node):
if not value.is_bounded:
self.supported_by_fnapi_runner = False

class _PrismRunnerSupportVisitor(PipelineVisitor):
"""Visitor determining if a Pipeline can be run on the PrismRunner."""
def accept(self, pipeline):
Expand Down Expand Up @@ -167,7 +171,8 @@ def visit_transform(self, applied_ptransform):
pr = runner.run_pipeline(pipeline, options)
# This is non-blocking, so if the state is *already* finished, something
# probably failed on job submission.
if pr.state.is_terminal() and pr.state != PipelineState.DONE:
if (PipelineState.is_terminal(pr.state) and
pr.state != PipelineState.DONE):
_LOGGER.info(
'Pipeline failed on PrismRunner, falling back toDirectRunner.')
runner = BundleBasedDirectRunner()
Expand Down
Loading