Skip to content

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

@GitEasonXu

Description

@GitEasonXu

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions