[
https://issues.apache.org/jira/browse/KAFKA-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14360637#comment-14360637
]
Jun Rao commented on KAFKA-1927:
--------------------------------
The following is a rough outline to do this.
1. kafka.network.Request:
Change the way that we deserialize bytes into object. Basically, we will first
deserialize the common request header. Then, based on the request id, we
deserialize the remaining bytes into the specific request object in
org.apache.kafka.common.requests. The requestObj will now be represented as the
header object plus org.apache.kafka.common.requests.AbstractRequestResponse.
2. In KafkaApis: Change all request/response references to those in
org.apache.kafka.common.requests. We will have to do some conversion from java
to scala (for things like map and list). It will be good if such conversion can
be done just once in an isolated scope.
3. We will need to leave all the scala request/response objects used by
SimpleConsumer for now since they are part of the public api. Once the scala
consumer is deprecated, we can delete those objects. The rest of the scala
request/response objects that are only used by the broker code can be
immediately removed.
> Replace requests in kafka.api with requests in
> org.apache.kafka.common.requests
> -------------------------------------------------------------------------------
>
> Key: KAFKA-1927
> URL: https://issues.apache.org/jira/browse/KAFKA-1927
> Project: Kafka
> Issue Type: Improvement
> Reporter: Jay Kreps
>
> The common package introduced a better way of defining requests using a new
> protocol definition DSL and also includes wrapper objects for these.
> We should switch KafkaApis over to use these request definitions and consider
> the scala classes deprecated (we probably need to retain some of them for a
> while for the scala clients).
> This will be a big improvement because
> 1. We will have each request now defined in only one place (Protocol.java)
> 2. We will have built-in support for multi-version requests
> 3. We will have much better error messages (no more cryptic underflow errors)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)