You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/02/03 11:58:35 UTC

[jira] [Commented] (FLINK-1464) Added ResultTypeQueryable interface to TypeSerializerInputFormat.

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

ASF GitHub Bot commented on FLINK-1464:
---------------------------------------

Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/349#issuecomment-72631504
  
    Looks good to me. I think the API breaking is minor, since it does not affect the methods on `DataSet` or on any of the operators. The TypeSerializerInputFormat is only used explicitly and is rather new, so it should be okay.
    
    +1
    
    Will merge this.


> Added ResultTypeQueryable interface to TypeSerializerInputFormat.
> -----------------------------------------------------------------
>
>                 Key: FLINK-1464
>                 URL: https://issues.apache.org/jira/browse/FLINK-1464
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Runtime, Optimizer
>    Affects Versions: 0.8, 0.9, 0.8.1
>            Reporter: Alexander Alexandrov
>            Assignee: Alexander Alexandrov
>            Priority: Minor
>              Labels: easyfix
>             Fix For: 0.9, 0.8.1
>
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> It is currently impossible to use the {{TypeSerializerInputFormat}} with generic Tuple types.
> For example, [this example gist|https://gist.github.com/aalexandrov/90bf21f66bf604676f37] fails with a
> {quote}
> Exception in thread "main" org.apache.flink.api.common.InvalidProgramException: The type returned by the input format could not be automatically determined. Please specify the TypeInformation of the produced type explicitly.
>     at org.apache.flink.api.java.ExecutionEnvironment.readFile(ExecutionEnvironment.java:341)
>     at SerializedFormatExample$.main(SerializedFormatExample.scala:48)
>     at SerializedFormatExample.main(SerializedFormatExample.scala)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> {quote}
> exaception. 
> To fix the issue, I changed the constructor to take a {{TypeInformation<T>}} instad of a {{TypeSerializer<T>}} argument. If this is indeed a bug, I think that this is a good solution. 
> Unfortunately the fix breaks the API. Feel free to change it if you find a more elegant solution compatible with the 0.8 branch.
> The suggested fix can be found in the GitHub [PR#349|https://github.com/apache/flink/pull/349].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)