> On July 18, 2015, 12:10 a.m., Ashish Singh wrote:
> > core/src/main/scala/kafka/admin/TopicCommand.scala, line 87
> > <https://reviews.apache.org/r/36578/diff/1/?file=1014811#file1014811line87>
> >
> >     I guess it is unnecessary to parse "0" as int. You can have 
> > maxMessageSize init to 0 and update if getProperty returns a non null value.

Okay, but doing so it will be something like:

```
var maxMessageSize = 0
if (configs.getProperty(LogConfig.MaxMessageBytesProp) != null) 
   maxMessageSize = 
Integer.parseInt(configs.getProperty(LogConfig.MaxMessageBytesProp))
```

The second case still has to parseInt() a String, it uses a ``var``, and spends 
more lines (three or four, if I create a second variable to hold 
getProperty()). I don't see a particular advantage in doing this tbh, but I am 
fine with either way.


- Edward


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36578/#review92145
-----------------------------------------------------------


On July 17, 2015, 7:32 p.m., Edward Ribeiro wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36578/
> -----------------------------------------------------------
> 
> (Updated July 17, 2015, 7:32 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2338
>     https://issues.apache.org/jira/browse/KAFKA-2338
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-2338 Warn users if they change max.message.bytes that they also need to 
> update broker and consumer settings
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/admin/TopicCommand.scala 
> a90aa8787ff21b963765a547980154363c1c93c6 
>   core/src/main/scala/kafka/server/AbstractFetcherThread.scala 
> f84306143c43049e3aa44e42beaffe7eb2783163 
> 
> Diff: https://reviews.apache.org/r/36578/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Edward Ribeiro
> 
>

Reply via email to