flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yakov Goldberg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-4804) Grouping.first() function usage fails
Date Tue, 11 Oct 2016 19:16:20 GMT

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

Yakov Goldberg updated FLINK-4804:
----------------------------------
    Description: 
Trying to use Grouping.first()  in following example:
{code}
dd2 = env.from_elements((1, "data"), (1, "hello"), (1, "z")) 
dd2 \        
     .group_by(0) \       
     .sort_group(1, Order.ASCENDING) \        
     .first(2) \        
     .reduce_group(PlainReduce(), combinable=True)
{code} 

1. Is this example correct?
2. If so, get the following error:

{code}
------------------------------------------------------------
 The program finished with the following exception:
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error.
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:520)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
	at org.apache.flink.client.program.Client.runBlocking(Client.java:248)
	at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866)
	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:333)
	at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1192)
	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1243)
Caused by: java.lang.ClassCastException: org.apache.flink.api.java.operators.SortedGrouping
cannot be cast to org.apache.flink.api.java.DataSet
	at org.apache.flink.python.api.PythonPlanBinder.createFirstOperation(PythonPlanBinder.java:470)
	at org.apache.flink.python.api.PythonPlanBinder.receiveOperations(PythonPlanBinder.java:325)
	at org.apache.flink.python.api.PythonPlanBinder.receivePlan(PythonPlanBinder.java:236)
	at org.apache.flink.python.api.PythonPlanBinder.runPlan(PythonPlanBinder.java:140)
	at org.apache.flink.python.api.PythonPlanBinder.main(PythonPlanBinder.java:113)
	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 org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
{code}

  was:
Trying to use Grouping.first()  in following example:
{code}
dd2 = env.from_elements((1, "data"), (1, "hello"), (1, "z")) 
dd2 \        
     .group_by(0) \       
     .sort_group(1, Order.ASCENDING) \        
     .first(2) \        
     .reduce_group(PlainReduce(), combinable=True)
{code} 

1. Is this example correct?
2. If so, get the following error:

------------------------------------------------------------
 The program finished with the following exception:

{code}
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error.
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:520)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
	at org.apache.flink.client.program.Client.runBlocking(Client.java:248)
	at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866)
	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:333)
	at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1192)
	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1243)
Caused by: java.lang.ClassCastException: org.apache.flink.api.java.operators.SortedGrouping
cannot be cast to org.apache.flink.api.java.DataSet
	at org.apache.flink.python.api.PythonPlanBinder.createFirstOperation(PythonPlanBinder.java:470)
	at org.apache.flink.python.api.PythonPlanBinder.receiveOperations(PythonPlanBinder.java:325)
	at org.apache.flink.python.api.PythonPlanBinder.receivePlan(PythonPlanBinder.java:236)
	at org.apache.flink.python.api.PythonPlanBinder.runPlan(PythonPlanBinder.java:140)
	at org.apache.flink.python.api.PythonPlanBinder.main(PythonPlanBinder.java:113)
	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 org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
{code}


> Grouping.first() function usage fails
> -------------------------------------
>
>                 Key: FLINK-4804
>                 URL: https://issues.apache.org/jira/browse/FLINK-4804
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Yakov Goldberg
>
> Trying to use Grouping.first()  in following example:
> {code}
> dd2 = env.from_elements((1, "data"), (1, "hello"), (1, "z")) 
> dd2 \        
>      .group_by(0) \       
>      .sort_group(1, Order.ASCENDING) \        
>      .first(2) \        
>      .reduce_group(PlainReduce(), combinable=True)
> {code} 
> 1. Is this example correct?
> 2. If so, get the following error:
> {code}
> ------------------------------------------------------------
>  The program finished with the following exception:
> org.apache.flink.client.program.ProgramInvocationException: The main method caused an
error.
> 	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:520)
> 	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403)
> 	at org.apache.flink.client.program.Client.runBlocking(Client.java:248)
> 	at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866)
> 	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:333)
> 	at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1192)
> 	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1243)
> Caused by: java.lang.ClassCastException: org.apache.flink.api.java.operators.SortedGrouping
cannot be cast to org.apache.flink.api.java.DataSet
> 	at org.apache.flink.python.api.PythonPlanBinder.createFirstOperation(PythonPlanBinder.java:470)
> 	at org.apache.flink.python.api.PythonPlanBinder.receiveOperations(PythonPlanBinder.java:325)
> 	at org.apache.flink.python.api.PythonPlanBinder.receivePlan(PythonPlanBinder.java:236)
> 	at org.apache.flink.python.api.PythonPlanBinder.runPlan(PythonPlanBinder.java:140)
> 	at org.apache.flink.python.api.PythonPlanBinder.main(PythonPlanBinder.java:113)
> 	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 org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505)
> {code}



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

Mime
View raw message