Return-Path: X-Original-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 444CE9FE0 for ; Sun, 25 Mar 2012 22:23:40 +0000 (UTC) Received: (qmail 8584 invoked by uid 500); 25 Mar 2012 22:23:40 -0000 Delivered-To: apmail-incubator-kafka-dev-archive@incubator.apache.org Received: (qmail 8525 invoked by uid 500); 25 Mar 2012 22:23:39 -0000 Mailing-List: contact kafka-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kafka-dev@incubator.apache.org Delivered-To: mailing list kafka-dev@incubator.apache.org Received: (qmail 8510 invoked by uid 99); 25 Mar 2012 22:23:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 22:23:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jay.kreps@gmail.com designates 209.85.210.175 as permitted sender) Received: from [209.85.210.175] (HELO mail-iy0-f175.google.com) (209.85.210.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 22:23:33 +0000 Received: by iaag37 with SMTP id g37so7820947iaa.6 for ; Sun, 25 Mar 2012 15:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=aKea08bSOA6QQ40erALgKOZSTCqBeLfxz8ovMJHjlRM=; b=fS75x/q/4Avt6EykyKk+O/+KICypnkJIgL9iMYs2f2wiU2pqZ7B0xH6u64qsZMslTc RcYNQeX8O3VpvlzRDvDo1vEnEIvZP8fSevcts3Fam4CrIPtGIIad9eIqEaRJ92JRaFhv rwqjUb3PytOIdnvJxhqfTqu4VJqeCByigp6iX2ggZu01BEl3/Ir1S14udfZ2EFxk1R2U mK83c1vinreVYnnucJIPyfk6ikWKMS8BhPh+P1c2fOgkHBu0V2NLEIOykpP/0+gS7Z+2 At4S+aHdSwbXLrNcufqOO/auMfIj1/7UawlbHSUCOTkU9MgT4O5twCtsPXlqgKvOT0yA qKHw== MIME-Version: 1.0 Received: by 10.42.119.129 with SMTP id b1mr6757608icr.48.1332714192603; Sun, 25 Mar 2012 15:23:12 -0700 (PDT) Received: by 10.231.105.1 with HTTP; Sun, 25 Mar 2012 15:23:12 -0700 (PDT) Date: Sun, 25 Mar 2012 15:23:12 -0700 Message-ID: Subject: kafka.utils.Utils From: Jay Kreps To: kafka-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=90e6ba61456a098aab04bc18b4a4 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba61456a098aab04bc18b4a4 Content-Type: text/plain; charset=ISO-8859-1 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): CompressionCodec 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. -Jay --90e6ba61456a098aab04bc18b4a4--