flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FLINK-2569) CsvReader support for ValueTypes
Date Thu, 27 Aug 2015 11:34:46 GMT

     [ https://issues.apache.org/jira/browse/FLINK-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stephan Ewen closed FLINK-2569.
-------------------------------

> CsvReader support for ValueTypes
> --------------------------------
>
>                 Key: FLINK-2569
>                 URL: https://issues.apache.org/jira/browse/FLINK-2569
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>    Affects Versions: 0.9
>            Reporter: Greg Hogan
>            Assignee: Chiwan Park
>            Priority: Minor
>             Fix For: 0.10
>
>
> From the Flink Programming Guide section on Data Sources:
> {quote}
> readCsvFile(path) / CsvInputFormat - Parses files of comma (or another char) delimited
fields. Returns a DataSet of tuples or POJOs. Supports the basic java types and their Value
counterparts as field types.
> {quote}
> When specifying a ValueType, i.e.
> {code}
> CsvReader csvReader = env.readCsvFile(filename);
> csvReader.types(IntValue.class, IntValue.class);
> {code}
> the following error occurs as BasicTypeInfo is specifically requested in CsvReader.types(...).
> {code}
> org.apache.flink.client.program.ProgramInvocationException: The main method caused an
error.
> 	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:452)
> 	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:353)
> 	at org.apache.flink.client.program.Client.run(Client.java:327)
> 	at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:608)
> 	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:296)
> 	at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:927)
> 	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:977)
> Caused by: java.lang.IllegalArgumentException: Type at position 0 is not a basic type.
> 	at org.apache.flink.api.java.typeutils.TupleTypeInfo.getBasicTupleTypeInfo(TupleTypeInfo.java:177)
> 	at org.apache.flink.api.java.io.CsvReader.types(CsvReader.java:393)
> 	at Driver.main(Driver.java:105)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:437)
> 	... 6 more
> {code}



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

Mime
View raw message