Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

APEXMALHAR-2481 support lambda expressions with high level API #617

Merged
merged 1 commit into from
May 8, 2017

Conversation

tweise
Copy link
Contributor

@tweise tweise commented May 7, 2017

@davidyan74 @siyuanh please review

@@ -35,7 +35,7 @@
* @since 3.4.0
*/
@InterfaceStability.Evolving
public interface Function
public interface Function extends java.io.Serializable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would kryo's @DefaultSerializer work for interfaces? If so, maybe we should add it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kryo cannot load a lambda class. Therefore the problem described below applies, even if the annotation is recognized, which I'm not sure about either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused by: com.esotericsoftware.kryo.KryoException: Unable to find class: com.example.myapexapp.ApplicationWithHighLevelAPI$$Lambda$4/1847509784
Serialization trace:
value (org.apache.commons.lang3.mutable.MutableObject)
statefulF (org.apache.apex.malhar.lib.function.FunctionOperator$FlatMapFunctionOperator)
	at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:138)
	at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:115)
	at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:641)
	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:99)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
	at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:679)
	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
	at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:761)
	at com.datatorrent.common.util.FSStorageAgent.retrieve(FSStorageAgent.java:192)
	at com.datatorrent.stram.plan.logical.LogicalPlan$OperatorMeta.readObject(LogicalPlan.java:898)

@asfgit asfgit merged commit 8eb7500 into apache:master May 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants