From 2af266a7225cc6c772c6f8cb05418effa5669cb3 Mon Sep 17 00:00:00 2001 From: mu <59917266+4eUeP@users.noreply.github.com> Date: Wed, 15 May 2024 17:11:14 +0800 Subject: [PATCH] tmp --- .../HStream/Kafka/Server/Handler.hsc | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/hstream-kafka/HStream/Kafka/Server/Handler.hsc b/hstream-kafka/HStream/Kafka/Server/Handler.hsc index d9bca1f1a..9c258f0f0 100644 --- a/hstream-kafka/HStream/Kafka/Server/Handler.hsc +++ b/hstream-kafka/HStream/Kafka/Server/Handler.hsc @@ -13,10 +13,13 @@ import HStream.Kafka.Server.Handler.Group import HStream.Kafka.Server.Handler.Offset import HStream.Kafka.Server.Handler.Produce import HStream.Kafka.Server.Handler.Security +import HStream.Kafka.Server.Handler.SparseOffset.Consume +import HStream.Kafka.Server.Handler.SparseOffset.Offset +import HStream.Kafka.Server.Handler.SparseOffset.Produce import HStream.Kafka.Server.Handler.Topic -import HStream.Kafka.Server.Types (ServerContext (..)) -import qualified Kafka.Protocol.Message as K -import qualified Kafka.Protocol.Service as K +import HStream.Kafka.Server.Types (ServerContext (..)) +import qualified Kafka.Protocol.Message as K +import qualified Kafka.Protocol.Service as K ------------------------------------------------------------------------------- @@ -93,16 +96,24 @@ import qualified Kafka.Protocol.Service as K #cv_handler CreateAcls, 0, 0 #cv_handler DeleteAcls, 0, 0 +-- SparseOffset +#cv_handler ListOffsets, 0, 2, SparseOffset +#cv_handler Produce, 0, 7, SparseOffset +#cv_handler Fetch, 0, 6, SparseOffset + handlers :: ServerContext -> [K.ServiceHandler] handlers sc = [ #mk_handler ApiVersions, 0, 3 - , #mk_handler ListOffsets, 0, 2 + -- , #mk_handler ListOffsets, 0, 2 + , #mk_handler ListOffsets, 0, 2, SparseOffset , #mk_handler Metadata, 0, 5 -- Write - , #mk_handler Produce, 0, 7 + --, #mk_handler Produce, 0, 7 + , #mk_handler Produce, 0, 7, SparseOffset , #mk_handler InitProducerId, 0, 0 -- Read - , #mk_handler Fetch, 0, 6 + --, #mk_handler Fetch, 0, 6 + , #mk_handler Fetch, 0, 6, SparseOffset , #mk_handler FindCoordinator, 0, 1