[ 
https://issues.apache.org/jira/browse/KAFKA-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233598#comment-14233598
 ] 

Jun Rao commented on KAFKA-1772:
--------------------------------

Another comment on the request format. I am not sure if it's better to use (a) 
a single generic admin request than (b) multiple individual ones. The benefit 
of (a) is that there will be fewer request types. However, the downside is that 
since it's generic, the required arguments also have to be made generic as a 
json string. Each type of request will need its own format for the json and the 
required format is implicit in the code and not part of the request. Another 
issue is that we have to bump up the request version as long as the format of 
one request type changes.

An alternative is to have a separate request for each specific admin command. 
Currently, the ones that we can really do are the followings. So, there aren't 
that many requests needed. The benefit is that each request can have a very 
specific request format and each request can be evolved individually.

1. create topic
2. alter topic
3. delete topic
4. list topic
5. list broker
6. list controller
7. list consumer

> Add an Admin message type for request response
> ----------------------------------------------
>
>                 Key: KAFKA-1772
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1772
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Joe Stein
>            Assignee: Andrii Biletskyi
>             Fix For: 0.8.3
>
>         Attachments: KAFKA-1772.patch, KAFKA-1772_2014-12-02_16:23:26.patch
>
>
> - utility int8
> - command int8
> - format int8
> - args variable length bytes
> utility 
> 0 - Broker
> 1 - Topic
> 2 - Replication
> 3 - Controller
> 4 - Consumer
> 5 - Producer
> Command
> 0 - Create
> 1 - Alter
> 3 - Delete
> 4 - List
> 5 - Audit
> format
> 0 - JSON
> args e.g. (which would equate to the data structure values == 2,1,0)
> "meta-store": {
> {"zookeeper":"localhost:12913/kafka"}
> }"args": {
>  "partitions":
>   [
>     {"topic": "topic1", "partition": "0"},
>     {"topic": "topic1", "partition": "1"},
>     {"topic": "topic1", "partition": "2"},
>  
>     {"topic": "topic2", "partition": "0"},
>     {"topic": "topic2", "partition": "1"},
>   ]
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to