spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexis Seigneurin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-4560) Lambda deserialization error
Date Thu, 08 Jan 2015 17:29:36 GMT

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

Alexis Seigneurin commented on SPARK-4560:
------------------------------------------

Any update on this one?

> Lambda deserialization error
> ----------------------------
>
>                 Key: SPARK-4560
>                 URL: https://issues.apache.org/jira/browse/SPARK-4560
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 1.1.1
>         Environment: Java 8.0.25
>            Reporter: Alexis Seigneurin
>         Attachments: IndexTweets.java, pom.xml
>
>
> I'm getting an error saying a lambda could not be deserialized. Here is the code:
> {code}
>         TwitterUtils.createStream(sc, twitterAuth, filters)
>                 .map(t -> t.getText())
>                 .foreachRDD(tweets -> {
>                     tweets.foreach(x -> System.out.println(x));
>                     return null;
>                 });
> {code}
> Here is the exception:
> {noformat}
> java.io.IOException: unexpected exception type
> 	at java.io.ObjectStreamClass.throwMiscException(ObjectStreamClass.java:1538)
> 	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1110)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1810)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> 	at org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:62)
> 	at org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:87)
> 	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:57)
> 	at org.apache.spark.scheduler.Task.run(Task.scala:54)
> 	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:177)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.reflect.InvocationTargetException
> 	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:483)
> 	at java.lang.invoke.SerializedLambda.readResolve(SerializedLambda.java:230)
> 	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:483)
> 	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1104)
> 	... 27 more
> Caused by: java.lang.IllegalArgumentException: Invalid lambda deserialization
> 	at com.seigneurin.spark.IndexTweets.$deserializeLambda$(IndexTweets.java:1)
> 	... 37 more
> {noformat}
> The weird thing is, if I write the following code (the map operation is inside the foreachRDD),
it works without problem.
> {code}
>         TwitterUtils.createStream(sc, twitterAuth, filters)
>                 .foreachRDD(tweets -> {
>                     tweets.map(t -> t.getText())
>                             .foreach(x -> System.out.println(x));
>                     return null;
>                 });
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message