[ 
https://issues.apache.org/jira/browse/BEAM-12769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425322#comment-17425322
 ] 

Chamikara Madhusanka Jayalath commented on BEAM-12769:
------------------------------------------------------

[https://github.com/apache/beam/pull/15677] fixes issues related to 
"JavaClassLookupPayloadBuilder".

 

But trying to use "JavaExternalTransform" results in following additional 
failure. Seems like this is because "ptransform.py" depends on "__getattr__" 
which is overridden by "JavaExternalTransform".

 

INFO:root:Python SDK container image set to 
"gcr.io/cloud-dataflow/v1beta3/python37-fnapi:beam-master-20210920" for Docker 
environment

Traceback (most recent call last):

  File "/Users/chamikara/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 
193, in _run_module_as_main

    "__main__", mod_spec)

  File "/Users/chamikara/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 
85, in _run_code

    exec(code, run_globals)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/examples/wordcount.py",
 line 121, in <module>

    run()

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/examples/wordcount.py",
 line 98, in run

    assert_that(res, equal_to([i for i in range(1, 10)]))

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 596, in __exit__

    self.result = self.run()

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 573, in run

    return self.runner.run_pipeline(self, self._options)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py",
 line 475, in run_pipeline

    return_context=True, default_environment=self._default_environment)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 909, in to_runner_api

    root_transform_id = context.transforms.get_id(self._root_transform())

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/runners/pipeline_context.py",
 line 104, in get_id

    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 1294, in to_runner_api

    for part in self.parts

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 1294, in <listcomp>

    for part in self.parts

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/runners/pipeline_context.py",
 line 104, in get_id

    self._id_to_proto[id] = obj.to_runner_api(self._pipeline_context)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 1281, in to_runner_api

    transform_spec = transform_to_runner_api(self.transform, context)

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/pipeline.py",
 line 1277, in transform_to_runner_api

    return transform.to_runner_api(context, has_parts=bool(self.parts))

  File 
"/Users/chamikara/code/beam_checkout_2/beam/sdks/python/apache_beam/transforms/ptransform.py",
 line 750, in to_runner_api

    if isinstance(typed_param, str) else typed_param)

TypeError: <function JavaExternalTransform.__getattr__.<locals>.construct at 
0x11ce71c20> has type function, but expected one of: bytes

 

> Adds support for expanding a Java cross-language transform using the class 
> name and builder methods
> ---------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-12769
>                 URL: https://issues.apache.org/jira/browse/BEAM-12769
>             Project: Beam
>          Issue Type: Improvement
>          Components: cross-language, sdk-java-core
>            Reporter: Chamikara Madhusanka Jayalath
>            Assignee: Chamikara Madhusanka Jayalath
>            Priority: P1
>             Fix For: 2.34.0
>
>          Time Spent: 28h 10m
>  Remaining Estimate: 0h
>
> Please see here for the design: 
> https://docs.google.com/document/d/1ECXSWicE31K-vSxdb4qL6UcmovOAWvE-ZHFT3NTM654/edit?usp=sharing



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

Reply via email to