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 D8895998B for ; Sat, 5 Nov 2011 02:18:14 +0000 (UTC) Received: (qmail 46455 invoked by uid 500); 5 Nov 2011 02:18:14 -0000 Delivered-To: apmail-incubator-kafka-dev-archive@incubator.apache.org Received: (qmail 46430 invoked by uid 500); 5 Nov 2011 02:18:14 -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 46422 invoked by uid 99); 5 Nov 2011 02:18:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2011 02:18:14 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2011 02:18:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9DA4B331F9B for ; Sat, 5 Nov 2011 02:17:51 +0000 (UTC) Date: Sat, 5 Nov 2011 02:17:51 +0000 (UTC) From: "Jun Rao (Commented) (JIRA)" To: kafka-dev@incubator.apache.org Message-ID: <1382934501.2099.1320459471647.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1697798691.410.1320427671129.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (KAFKA-186) no clean way to getCompressionCodec from Java-the-language MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/KAFKA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144521#comment-13144521 ] Jun Rao commented on KAFKA-186: ------------------------------- You only need do deal with the codec directly if you use SyncProducer. We recommend most people use Producer, in which compress level can be configured in the producer property. > no clean way to getCompressionCodec from Java-the-language > ---------------------------------------------------------- > > Key: KAFKA-186 > URL: https://issues.apache.org/jira/browse/KAFKA-186 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.7 > Reporter: Chris Burroughs > > The obvious thing fails: > CompressionCodec.getCompressionCodec(1) results in cannot find symbol > symbol : method getCompressionCodec(int) > location: interface kafka.message.CompressionCodec > Writing a switch statement with kafka.message.NoCompressionCodec$.MODULE$ and duplicating the logic in CompressionCodec.getCompressionCodec is no fun, nor is creating a Hashtable just to call Utils.getCompressionCodec. I'm not sure if there is a magic keyword to make it easy for javac to understand which CompressionCodec I'm referring to. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira