[
https://issues.apache.org/jira/browse/BEAM-6894?focusedWorklogId=232805&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-232805
]
ASF GitHub Bot logged work on BEAM-6894:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Apr/19 12:38
Start Date: 25/Apr/19 12:38
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #8270: [BEAM-6894]
Support for constructing a Dataflow job request that includes cross-language
transforms
URL: https://github.com/apache/beam/pull/8270#discussion_r278522830
##########
File path: sdks/python/apache_beam/transforms/ptransform.py
##########
@@ -601,9 +601,18 @@ def from_runner_api(cls, proto, context):
if proto is None or not proto.urn:
return None
parameter_type, constructor = cls._known_urns[proto.urn]
- return constructor(
- proto_utils.parse_Bytes(proto.payload, parameter_type),
- context)
+
+ try:
+ return constructor(
+ proto_utils.parse_Bytes(proto.payload, parameter_type),
+ context)
+ except:
+ # For external transforms we cannot build a Python ParDo object so
+ # we build a holder transform instead.
+ from apache_beam.transforms.core import RunnerAPIPTransformHolder
+ if RunnerAPIPTransformHolder.is_external_transform(proto):
Review comment:
Is there any reason to guard against this?
----------------------------------------------------------------
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: 232805)
Time Spent: 7h 10m (was: 7h)
> ExternalTransform.expand() does not create the proper AppliedPTransform
> sub-graph
> ---------------------------------------------------------------------------------
>
> Key: BEAM-6894
> URL: https://issues.apache.org/jira/browse/BEAM-6894
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Chamikara Jayalath
> Assignee: Chamikara Jayalath
> Priority: Major
> Time Spent: 7h 10m
> Remaining Estimate: 0h
>
> 'ExternalTransform.expand()' can be used to expand a remote transform and
> build the correct runner-api subgraph for that transform. However currently
> we do not modify the AppliedPTransform sub-graph correctly during this
> process. Relevant code location here.
> [https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/external.py#L135]
>
> Without this, DataflowRunner that relies in this object graph (not just the
> runner API proto) to build the job submission request to Dataflow service
> cannot construct this request properly.
>
> cc: [~robertwb]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)