[jira] [Resolved] (KAFKA-5596) TopicCommand methods fail to handle topic name with "."

2017-07-17 Thread Shuai Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-5596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shuai Zhang resolved KAFKA-5596.

Resolution: Not A Problem

> TopicCommand methods fail to handle topic name with "."
> ---
>
> Key: KAFKA-5596
> URL: https://issues.apache.org/jira/browse/KAFKA-5596
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 0.10.0.0, 0.10.0.1, 0.10.1.1, 0.10.2.1, 0.11.0.0
>Reporter: Shuai Zhang
> Fix For: 0.12.0.0
>
>
> When there is one topic which name includes ".", then we invoke *list*, 
> *describe*, *alter*, *delete* functions and set this topic name, those 
> functions will not only operate this topic, but also operate all other topics 
> that have same name regex pattern.
> For example, there are two topics on Kafka cluster:
> * test.a
> * test_a
> If you run command "--describe --topic test.a", it will return both of 
> *test.a* and *test_a*. Other functions have the same effect.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (KAFKA-5596) TopicCommand methods(describe, alter, delete) fail to handle topic name with "."

2017-07-15 Thread Shuai Zhang (JIRA)
Shuai Zhang created KAFKA-5596:
--

 Summary: TopicCommand methods(describe, alter, delete) fail to 
handle topic name with "."
 Key: KAFKA-5596
 URL: https://issues.apache.org/jira/browse/KAFKA-5596
 Project: Kafka
  Issue Type: Bug
  Components: admin
Affects Versions: 0.11.0.0, 0.10.2.1, 0.10.1.1, 0.10.0.1, 0.10.0.0
Reporter: Shuai Zhang
 Fix For: 0.12.0.0


When there is one topic which name includes ".", then we invoke *describe*, 
*alter*, *delete* functions and set this topic name, those functions will not 
only operate this topic, but also operate all other topics that have same name 
regex pattern.

For example, there are two topics on Kafka cluster:
* test.a
* test_a

If you run command "--describe --topic test.a", it will return both of *test.a* 
and *test_a*. Other functions have the same effect.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (KAFKA-4053) Refactor TopicCommand to remove redundant if/else statements

2016-08-21 Thread Shuai Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shuai Zhang closed KAFKA-4053.
--

This issue is solved by pull request: https://github.com/apache/kafka/pull/1751

> Refactor TopicCommand to remove redundant if/else statements
> 
>
> Key: KAFKA-4053
> URL: https://issues.apache.org/jira/browse/KAFKA-4053
> Project: Kafka
>  Issue Type: Improvement
>  Components: admin
>Affects Versions: 0.10.0.1
>Reporter: Shuai Zhang
>Priority: Minor
> Fix For: 0.10.1.0
>
>
> In TopicCommand, there are a lot of redundant if/else statements, such as
> ```val ifNotExists = if (opts.options.has(opts.ifNotExistsOpt)) true else 
> false```
> We can refactor it as the following statement:
> ```val ifNotExists = opts.options.has(opts.ifNotExistsOpt)```



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


[jira] [Created] (KAFKA-4053) Refactor TopicCommand to remove redundant if/else statements

2016-08-17 Thread Shuai Zhang (JIRA)
Shuai Zhang created KAFKA-4053:
--

 Summary: Refactor TopicCommand to remove redundant if/else 
statements
 Key: KAFKA-4053
 URL: https://issues.apache.org/jira/browse/KAFKA-4053
 Project: Kafka
  Issue Type: Improvement
  Components: admin
Affects Versions: 0.10.0.1
Reporter: Shuai Zhang
Priority: Minor
 Fix For: 0.10.0.2


In TopicCommand, there are a lot of redundant if/else statements, such as
```val ifNotExists = if (opts.options.has(opts.ifNotExistsOpt)) true else 
false```

We can refactor it as the following statement:
```val ifNotExists = opts.options.has(opts.ifNotExistsOpt)```



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