[ https://issues.apache.org/jira/browse/BEAM-6894?focusedWorklogId=232794&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-232794 ]
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_r278529609 ########## File path: sdks/python/apache_beam/runners/dataflow/dataflow_runner.py ########## @@ -783,15 +819,19 @@ def run_ParDo(self, transform_node, options): step.add_property(PropertyNames.OUTPUT_INFO, outputs) - # Add the restriction encoding if we are a splittable DoFn - # and are using the Fn API on the unified worker. - from apache_beam.runners.common import DoFnSignature - signature = DoFnSignature(transform_node.transform.fn) - if (use_fnapi and use_unified_worker and signature.is_splittable_dofn()): - restriction_coder = ( - signature.get_restriction_provider().restriction_coder()) - step.add_property(PropertyNames.RESTRICTION_ENCODING, - self._get_cloud_encoding(restriction_coder, use_fnapi)) + # Proto holder ParDos contain serialized DoFns from remote SDKs that cannot + # be examined by Python DoFnSignature. + if not proto_holder: + # Add the restriction encoding if we are a splittable DoFn + # and are using the Fn API on the unified worker. + from apache_beam.runners.common import DoFnSignature + signature = DoFnSignature(transform_node.transform.fn) + if (use_fnapi and use_unified_worker and signature.is_splittable_dofn()): + restriction_coder = ( + signature.get_restriction_provider().restriction_coder()) + step.add_property(PropertyNames.RESTRICTION_ENCODING, Review comment: It doesn't have to be implemented yet, but please move this signature-inspecting code into ParDoTransform and remove is_proto_holder flag. The get_restriction_coder method for the Holder class can return None with a TODO to handle 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 232794) Time Spent: 6h 10m (was: 6h) > 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: 6h 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)