Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-3153: KStream,Type and Serialization #794

Closed
wants to merge 26 commits into from

Conversation

ymatsuda
Copy link
Contributor

@guozhangwang
Copy link
Contributor

@ymatsuda What is yet to be finished?


import java.util.Arrays;

class TypeWithTypeArgs implements java.lang.reflect.Type {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use java.lang.reflect.ParameterizedType?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. ParameterizedType is an interface, and its method are not appropriate for our use.
We want a type representation that every type variable is resolved. It is better to have our own class to represent such a type.

@guozhangwang
Copy link
Contributor

In the final state, we can consider:

  1. Remove Default Serde from configs.
  2. Add default serdes for primitives / and Java collections types.

@ymatsuda
Copy link
Contributor Author

  • pulled recent changes in from trunk.
  • removed serdes from kstream.aggregateByKey()

@guozhangwang

Yasuhiro Matsuda added 2 commits January 22, 2016 10:21
@ymatsuda
Copy link
Contributor Author

  • added type inference for stateless transformation

@ymatsuda
Copy link
Contributor Author

  • added type inference to stateful transformation (transform() and transformValue())

@ymatsuda ymatsuda changed the title WIP: KStream,Type and Serialization KAFKA-3153: KStream,Type and Serialization Jan 26, 2016
@ymatsuda ymatsuda closed this Feb 10, 2016
@aviflax
Copy link
Contributor

aviflax commented Feb 15, 2016

Just curious, why was this closed? Was it merged elsewhere? Or has this been canceled?

@ymatsuda
Copy link
Contributor Author

It is canceled for now.
It turned out that it has an issue with lambda expressions of current Java8. Java8 compiler does not capture the type information of the return type. Thus, we cannot infer the type when a user use lambda expression.
And there are people who are concerned about this type inference approach although they didn't publicly comment their opinions here. Basically their concern is that type inference is a difficult concept for users to understand especially when it does not always work.

@aviflax
Copy link
Contributor

aviflax commented Feb 17, 2016

@ymatsuda that makes sense, thanks for explaining!

efeg pushed a commit to efeg/kafka that referenced this pull request Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants