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 using cluster serving cli to push image data for Kafka? #26

Open
GitEasonXu opened this issue Oct 26, 2021 · 3 comments
Open

How to using cluster serving cli to push image data for Kafka? #26

GitEasonXu opened this issue Oct 26, 2021 · 3 comments

Comments

@GitEasonXu
Copy link

Analytics Zoo Version: 0.11.0

I have successfully tested Kafka according to the kafka_guide.
But now how do I use the zoo.serving.client to push image data for Kafka, zoo.serving.client.InputQueue superclass API don't implement KafkaProducer.

class API:
    """
    base level of API control
    select data pipeline here, Redis/Kafka/...
    interface preserved for API class
    """
    def __init__(self, host=None, port=None, name="serving_stream"):
        self.name = name
        self.host = host if host else "localhost"
        self.port = port if port else "6379"

        self.db = redis.StrictRedis(host=self.host,
                                    port=self.port, db=0)
        try:
            self.db.xgroup_create(name, "serving")
        except Exception:
            print("redis group exist, will not create new one")
@Litchilitchy
Copy link
Contributor

For current Analytics Zoo usage, you could refer to https://github.com/intel-analytics/analytics-zoo/pull/4155, the functions are in this branch.

And the functions of this PR would be merged to BigDL https://github.com/intel-analytics/BigDL

@GitEasonXu
Copy link
Author

There are two new files(FlinkKafkaSink.scala FlinkKafkaSource.scala) in https://github.com/intel-analytics/analytics-zoo/pull/4155#issue-929789442.
Next, do I need to recompile the source code to replace the original zoo.jar.

@Litchilitchy
Copy link
Contributor

Litchilitchy commented Oct 26, 2021

There are two new files(FlinkKafkaSink.scala FlinkKafkaSource.scala) in #4155 (comment). Next, do I need to recompile the source code to replace the original zoo.jar.

Yes, you need to build a jar with these 2 files.

The function is about to merge to BigDL 2.0 in PR intel-analytics/ipex-llm#3277, you could try it in BigDL, the new dev of code would be at BigDL project

@liu-shaojun liu-shaojun transferred this issue from intel-analytics/BigDL-2.x Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants