kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Kreps <jay.kr...@gmail.com>
Subject kafka.utils.Utils
Date Sun, 25 Mar 2012 22:23:12 GMT
Hey guys,

The Utils helpers are meant to be generic non-kafka-specific utility
functions. Ideally it should not have dependencies outside java.* and
scala.*. I notice a lot of code in there that is zookeeper-specific (my
fault I think), that should really be a ZkUtils class. I also notice a lot
of code that isn't properly helper code at all but actually very
kafka-specific stuff.  This isn't a big deal, just a little hacky.

Here are some suspicious methods:

  def getCompressionCodec(props: Properties, codec: String):
  def getTopicRentionHours(retentionHours: String) : Map[String, Int]
  def getTopicFlushIntervals(allIntervals: String) : Map[String, Int]
  def getTopicPartitions(allPartitions: String) : Map[String, Int]
  def getConsumerTopicMap(consumerTopicString: String) : Map[String, Int]
  class SnapshotStats
  class Stats

In general if we are putting domain-specific logic into generic static
helpers like this it probably means we are missing some domain object to
stick these on.

I will file a ticket to clean these up, but I wanted to email around to try
to explain the motivation.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message