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

How to use it in Scala #33

Open
MJeremy2017 opened this issue Feb 27, 2019 · 1 comment
Open

How to use it in Scala #33

MJeremy2017 opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@MJeremy2017
Copy link

Hi, thanks for sharing this project.

  • I am now running a scala project and wondering if it is possible to use your project in scala(may be import ...kmeans, make it into a package).

  • My resource is from Kafka rather than a static offline file, may I know how to use this kmeans with Kafka resource?

@kkrugler
Copy link
Member

You should be able to call KMeansClustering.build() from your Scala code, assuming you import that package (as you noted in your question).

The current .build() API requires that you pass in a SourceFunction<Feature>. You should provide a DeserializationSchema for the Kafka Connector that converts the binary data in your topic to a Feature object.

@kkrugler kkrugler added the question Further information is requested label Feb 27, 2019
@kkrugler kkrugler self-assigned this Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants