[
https://issues.apache.org/jira/browse/FLINK-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146496#comment-15146496
]
ASF GitHub Bot commented on FLINK-3304:
---------------------------------------
GitHub user kl0u opened a pull request:
https://github.com/apache/flink/pull/1635
FLINK-3304: Making the Avro Schema serializable.
This solves the issue FLINK-3304 by making the Avro Schema serializable.
This is done by having a custom serializer which transforms the Schema into
a JSON string, and the deserializer de-serializes the JSON to re-create the
original schema.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kl0u/flink avro
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1635.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 #1635
----
commit 173bf6a013f78fab2352f23cb7dae9399aa0ba5a
Author: Kostas Kloudas <[email protected]>
Date: 2016-02-11T17:24:29Z
FLINK-3304: Making the Avro Schema serializable.
----
> AvroOutputFormat.setSchema() doesn't work in yarn-cluster mode
> --------------------------------------------------------------
>
> Key: FLINK-3304
> URL: https://issues.apache.org/jira/browse/FLINK-3304
> Project: Flink
> Issue Type: Bug
> Affects Versions: 1.0.0, 0.10.1
> Reporter: Sebastian Klemke
> Assignee: Klou
>
> Quoting flink cli (schema and names modified):
> "The program finished with the following exception:
> User-defined object org.apache.flink.api.java.io.AvroOutputFormat@5f253dfb
> (org.apache.flink.api.java.io.AvroOutputFormat) contains non-serializable
> field userDefinedSchema =
> {"type":"record","name":"Pojo","namespace":"com.example","fields":[{"name":"id","type":["null","string"],"default":null,"subtype":"objectid"}],"EntityVersion":"0.1.0"}
>
> org.apache.flink.api.common.operators.util.UserCodeObjectWrapper.<init>(UserCodeObjectWrapper.java:84)
>
> org.apache.flink.api.common.operators.GenericDataSinkBase.<init>(GenericDataSinkBase.java:68)
>
> org.apache.flink.api.java.operators.DataSink.translateToDataFlow(DataSink.java:258)
>
> org.apache.flink.api.java.operators.OperatorTranslation.translate(OperatorTranslation.java:64)
>
> org.apache.flink.api.java.operators.OperatorTranslation.translateToPlan(OperatorTranslation.java:49)
>
> org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:939)
>
> org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:907)
>
> org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:57)
> com.example.Tool.main(Tool.java:86)
> Shutting down YARN cluster"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)