GitHub user azurezyq opened a pull request:
https://github.com/apache/beam/pull/3733
Fix a function serialization bug in AvroIO
Hi @jkff , can you please take a look?
If ValueProvider<String> is specified as outputPrefix, a
NestedValueProvider is created with a SerializableFunction enclosed to perform
some translation work.
However, in the original codes the function is created as an anonymous
class, capturing the enclosing class TypedWrite as "this", which contains a
un-serializable member Schema. An exception is thrown from expand() if run
because the function is not serializable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/azurezyq/beam master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/3733.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3733
----
commit cd43044d7b80a3c36b2cb9fa18665ff12bb77760
Author: Yunqing Zhou <[email protected]>
Date: 2017-08-18T06:17:52Z
Fix a bug in AvroIO, in which a SerializableFunction is created with a
context containing a un-serializable member (Schema)
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---