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

Andrii Biletskyi commented on KAFKA-1772:
-----------------------------------------

[~junrao]: Thanks for your feedback!  My vision:
1. Yes, looks like utility+command fits flawlessly only topic command. 
Although, I like the idea separating request types at utility level - this 
structures a bit tons of our commands. I.e. limit possible utilities to 
mentioned in the ticket but do not regulate commands as shared among all 
utilities.
2. Not sure about that, it is still being discussed whether we should use json 
for that (because of third-party json lib dependency); maybe we also can 
represent args in simple byte format (as all current requests).
3. Since all commands are really subtype of AdminRequest we can't have specific 
response for each command. Currently AdminResponse is a just an outcome string 
(and optionally error code). So if mutating command is successful - empty 
Response is returned, if it is list/describe command - description is returned 
in outcome string.
4. No final decision here. It's proposed to make all commands async on broker 
side and leave to client responsibility to block, executing verify or whatever 
else method to check command is completed. When commands are called from cli, 
this logic, of course, will be plugged into cli code, so user (if he wants) 
will experience such commands as blocking.


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