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

Robert Metzger commented on FLINK-916:
--------------------------------------

This code from the *AvroOutputFormat.java* needs some reworking:
{code:java}
                        datumWriter = new SpecificDatumWriter<E>(avroValueType);
                        try {
                                schema = 
((org.apache.avro.specific.SpecificRecordBase)avroValueType.newInstance()).getSchema();
                        } catch (InstantiationException e) {
                                throw new RuntimeException(e.getMessage());
                        } catch (IllegalAccessException e) {
                                throw new RuntimeException(e.getMessage());
                        }
{code}
I would do something like 
{code:java}
throw new RuntimeException("Unable to instantiate value type",e);
{code}
The problem is that you are loosing the stack of the exception you've caught.

Can you re-open the pull request against apache/incubator-flink ?
https://github.com/apache/incubator-flink 

> Implement AvroOutputFormat
> --------------------------
>
>                 Key: FLINK-916
>                 URL: https://issues.apache.org/jira/browse/FLINK-916
>             Project: Flink
>          Issue Type: Bug
>            Reporter: GitHub Import
>              Labels: github-import
>             Fix For: pre-apache
>
>         Attachments: pull-request-916-200075741937579057.patch
>
>
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/pull/916
> Created by: [qmlmoon|https://github.com/qmlmoon]
> Labels: 
> Created at: Fri Jun 06 21:20:02 CEST 2014
> State: open



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to