kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thunder Stumpges <tstump...@ntent.com>
Subject RE: per-topic configuration names... unit suffix ?
Date Fri, 30 Jan 2015 19:23:28 GMT
Well, in lack of a response, I rolled up my sleeves and took to the code. It appears that these
ARE indeed in Milliseconds!

So, while you set the log.retention.minutes in increments of minutes, you must set the topic-level
configuration in milliseconds. Pretty odd. Though it does appear that you can set the global
config in other units..

    
    if(props.containsKey("log.retention.ms")){
       props.getIntInRange("log.retention.ms", (1, Int.MaxValue))
    }
    else if(props.containsKey("log.retention.minutes")){
       millisInMinute * props.getIntInRange("log.retention.minutes", (1, Int.MaxValue))
    } 
    else {
       millisInHour * props.getIntInRange("log.retention.hours", 24*7, (1, Int.MaxValue))
    }

Cheers,
Thunder


-----Original Message-----
From: Thunder Stumpges [mailto:tstumpges@ntent.com] 
Sent: Thursday, January 29, 2015 2:39 PM
To: users@kafka.apache.org
Subject: per-topic configuration names... unit suffix ?

Hi all,

I am reading about the per-topic configs<http://kafka.apache.org/documentation.html#topic-config>
and the unit suffixes on a couple don't seem to match to the global/server ones.

Specifically:

retention.ms => log.retention.minutes
segment.ms => log.roll.hours

Can someone clear this up?

Is the per-topic key really 'ms'? If so, are the units actually in milliseconds?

I would expect the units to match the global, and therefore I would expect the key suffix
to match. Maybe this is just a documentation error?

Thanks!
Thunder


Mime
View raw message