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

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

                Author: ASF GitHub Bot
            Created on: 30/Nov/18 19:24
            Start Date: 30/Nov/18 19:24
    Worklog Time Spent: 10m 
      Work Description: CraigChambersG commented on a change in pull request 
#7081: [BEAM-6067] In Python SDK, specify pipeline_proto_coder_id property in 
non-Beam-standard CloudObject coders
URL: https://github.com/apache/beam/pull/7081#discussion_r237974683
 
 

 ##########
 File path: sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
 ##########
 @@ -441,22 +443,25 @@ def _get_side_input_encoding(self, input_encoding):
 
   def _get_encoded_output_coder(self, transform_node, window_value=True):
     """Returns the cloud encoding of the coder for the output of a 
transform."""
+    from apache_beam.runners.dataflow.internal import apiclient
     if (len(transform_node.outputs) == 1
         and transform_node.outputs[None].element_type is not None):
       # TODO(robertwb): Handle type hints for multi-output transforms.
       element_type = transform_node.outputs[None].element_type
+      use_fnapi = 
apiclient._use_fnapi(transform_node.outputs[None].pipeline._options)
     else:
       # TODO(silviuc): Remove this branch (and assert) when typehints are
       # propagated everywhere. Returning an 'Any' as type hint will trigger
       # usage of the fallback coder (i.e., cPickler).
       element_type = typehints.Any
+      use_fnapi = False  # TODO(chambers): XXX do the right thing for this
 
 Review comment:
   I could rename this local variable, but that would be masking the intent.  
The intent of the local variable is indeed whether the CloudObject is being 
generated for a backend using the FnAPI.  This particular line is "I don't know 
how to figure out if we're using the FnAPI, so for now just assume we're not, 
to preserve behavior for non-experimental backends; TODO: figure out how to 
tell".  The comment is intending to capture that.  The rest of the code in this 
function is acting as intended.
   
   The one test that failed, which motivated adding all this use_fnapi stuff, 
doesn't take this branch, so its failure is unrelated to this line.
   
   (Out of curiosity, what is your wish for how this code becomes obsolete?)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 171178)
            Time Spent: 6h  (was: 5h 50m)
    Remaining Estimate: 162h  (was: 162h 10m)

> Dataflow runner should include portable pipeline coder id in CloudObject 
> coder representation
> ---------------------------------------------------------------------------------------------
>
>                 Key: BEAM-6067
>                 URL: https://issues.apache.org/jira/browse/BEAM-6067
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-model
>            Reporter: Craig Chambers
>            Assignee: Craig Chambers
>            Priority: Major
>   Original Estimate: 168h
>          Time Spent: 6h
>  Remaining Estimate: 162h
>
> When translating a BeamJava Coder into the DataflowRunner's CloudObject 
> property map, include a property that specifies the id in the Beam model 
> Pipeline coders map corresponding to that Coder.  This will allow the 
> DataflowRunner to reference the corresponding Beam coder in the FnAPI 
> processing bundle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to