You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Ning Kang (Jira)" <ji...@apache.org> on 2021/05/27 17:28:00 UTC

[jira] [Comment Edited] (BEAM-12391) WriteToAvro fails if fastavro loads its python implementation of writer

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

Ning Kang edited comment on BEAM-12391 at 5/27/21, 5:27 PM:
------------------------------------------------------------

Beam notebooks have mitigated the issue by setting an environment variable 
{code:json}
{"env": {"LD_LIBRARY_PATH":"/opt/conda/lib"}}
{code}
 in each IPython kernel.


was (Author: ningk):
Beam notebooks have mitigated the issue by setting an environment variable `"env": {"LD_LIBRARY_PATH":"/opt/conda/lib"}` in each IPython kernel.

> WriteToAvro fails if fastavro loads its python implementation of writer
> -----------------------------------------------------------------------
>
>                 Key: BEAM-12391
>                 URL: https://issues.apache.org/jira/browse/BEAM-12391
>             Project: Beam
>          Issue Type: Bug
>          Components: io-py-avro
>    Affects Versions: 2.25.0, 2.26.0, 2.27.0, 2.28.0, 2.29.0
>            Reporter: Chris Chandler
>            Priority: P2
>
> It's possible for fastavro to fail to correctly load its cython implementation of the Writer class in which case it will silently fall back to a pure python implementation. If this happens there's no outward indication, but line 621 in io/avroio.py will fail because writer.fo is only present on the cython implementation.
> To reproduce you can modify fastavro's write.py to only use its fallback:
> {code}
> #from . import _write
> from . import _write_py as _write
> {code}
> And then run a workflow that sinks to WriteToAvro(use_fastavro=True).



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