Return-Path: X-Original-To: apmail-kafka-users-archive@www.apache.org Delivered-To: apmail-kafka-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF07AF6A1 for ; Thu, 9 May 2013 05:22:31 +0000 (UTC) Received: (qmail 87829 invoked by uid 500); 9 May 2013 05:22:31 -0000 Delivered-To: apmail-kafka-users-archive@kafka.apache.org Received: (qmail 87800 invoked by uid 500); 9 May 2013 05:22:30 -0000 Mailing-List: contact users-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@kafka.apache.org Delivered-To: mailing list users@kafka.apache.org Received: (qmail 87774 invoked by uid 99); 9 May 2013 05:22:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 05:22:30 +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 jbr@squareup.com designates 209.85.210.180 as permitted sender) Received: from [209.85.210.180] (HELO mail-ia0-f180.google.com) (209.85.210.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 05:22:25 +0000 Received: by mail-ia0-f180.google.com with SMTP id 21so2879301iay.11 for ; Wed, 08 May 2013 22:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squareup.com; s=google; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=SCzlR+aWTTVhmagJDcvc26jEqxd0oe0gCc/3ji1HNK4=; b=ZgvU2feCYM6q7rpa+W7CTumOKF2Zl9ObP4nlmOs53dUbTK9bx2MF/YvsDTta4p4Zp/ Xha8FS2OTqRH0YWzNhFbkKVgz2vFBJus7pK3h7lb7r7PbA1bSHnJGI9Aw8I6UWPJZ8tk nd68nu/PNGZWkw39IqkMT6aPiLgNP1hNgK9L8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=SCzlR+aWTTVhmagJDcvc26jEqxd0oe0gCc/3ji1HNK4=; b=UBrJcrlvZCebCygrfNr63oo3rVrD0iOKS67ImL01YRziVByIPccaPZ2d9JouQapNOX 6Y82Epvk5DmH087y5y7T2wOL8Mci7ue/jr16OKjxWytdUBFz3dDCuNI7GODt2AIUPiA/ sMEzd8/x8UPd1RLspmsHxej5KNaxdeja9PwLUuvYo8YqmOu1qCSFJuxnYJ56MNbsLokX 3xtomh4oRaqd85uHshTzK17rngrR60VE1dTCSiTvtdPPfYrh6afkxFnutLu3tgsFcg8f ujoCEhIRbbEt39iN3PduaQ6Tc07PHbqTchrU1u9c8IGlzp2A/tPByVLB0zfH/v9mnYwY Q5rA== MIME-Version: 1.0 X-Received: by 10.50.11.229 with SMTP id t5mr7378435igb.65.1368076924920; Wed, 08 May 2013 22:22:04 -0700 (PDT) Received: by 10.50.11.228 with HTTP; Wed, 8 May 2013 22:22:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 8 May 2013 22:22:04 -0700 Message-ID: Subject: Re: expected exceptions? From: Jason Rosenberg To: users@kafka.apache.org Content-Type: multipart/alternative; boundary=e89a8f646d152308d904dc423b15 X-Gm-Message-State: ALoCoQk9NNt8n7B8Zxxxg/3tiYy49/Tp5vxqeQvsVn45W9+CGXw4q0HoJGSprL6NUFmFtasuCBUg X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f646d152308d904dc423b15 Content-Type: text/plain; charset=ISO-8859-1 Filed: https://issues.apache.org/jira/browse/KAFKA-899 https://issues.apache.org/jira/browse/KAFKA-900 Jason On Wed, May 8, 2013 at 9:22 PM, Jun Rao wrote: > Yes, could you file a jira? Please include the log messages before those > exceptions. > > Thanks, > > Jun > > > On Wed, May 8, 2013 at 9:55 AM, Jason Rosenberg wrote: > > > If expected, does it make sense to log them as exceptions as such? Can > we > > instead log something meaningful to the console, like: > > > > "No leader was available, one will now be created" > > > > or > > > > "ConsumerConnector has shutdown" > > > > etc. > > > > Should I file jira's for these? > > > > Jason > > > > > > On Wed, May 8, 2013 at 8:22 AM, Jun Rao wrote: > > > > > Yes, both are expected. > > > > > > Thanks, > > > > > > Jun > > > > > > > > > On Wed, May 8, 2013 at 12:16 AM, Jason Rosenberg > > wrote: > > > > > > > I'm porting some unit tests from 0.7.2 to 0.8.0. The test does the > > > > following, all embedded in the same java process: > > > > > > > > -- spins up a zk instance > > > > -- spins up a kafka server using a fresh log directory > > > > -- creates a producer and sends a message > > > > -- creates a high-level consumer and verifies that it can consume the > > > > message > > > > -- shuts down the consumer > > > > -- stops the kafka server > > > > -- stops zk > > > > > > > > The test seems to be working fine now, however, I consistently see > the > > > > following exceptions (which from poking around the mailing list seem > to > > > be > > > > expected?). If these are expected, can we suppress the logging of > > these > > > > exceptions, since it clutters the output of tests, and presumably, > > > clutters > > > > the logs of the running server/consumers, during clean startup and > > > > shutdown...... > > > > > > > > When I call producer.send(), I get: > > > > > > > > kafka.common.LeaderNotAvailableException: No leader for any partition > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$getPartition(DefaultEventHandler.scala:212) > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.apply(DefaultEventHandler.scala:150) > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler$$anonfun$partitionAndCollate$1.apply(DefaultEventHandler.scala:148) > > > > at > > > > > > > > > > > > > > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57) > > > > at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler.partitionAndCollate(DefaultEventHandler.scala:148) > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:94) > > > > at > > > > > > > > > > > > > > kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:72) > > > > at kafka.producer.Producer.send(Producer.scala:74) > > > > at kafka.javaapi.producer.Producer.send(Producer.scala:32) > > > > ... > > > > ... > > > > > > > > When I call consumerConnector.shutdown(), I get: > > > > > > > > java.nio.channels.ClosedByInterruptException > > > > at > > > > > > > > > > > > > > java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184) > > > > at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:543) > > > > at kafka.network.BlockingChannel.connect(BlockingChannel.scala:57) > > > > at kafka.consumer.SimpleConsumer.connect(SimpleConsumer.scala:47) > > > > at kafka.consumer.SimpleConsumer.reconnect(SimpleConsumer.scala:60) > > > > at > kafka.consumer.SimpleConsumer.liftedTree1$1(SimpleConsumer.scala:81) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer.kafka$consumer$SimpleConsumer$$sendRequest(SimpleConsumer.scala:73) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(SimpleConsumer.scala:112) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1$$anonfun$apply$mcV$sp$1.apply(SimpleConsumer.scala:112) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1$$anonfun$apply$mcV$sp$1.apply(SimpleConsumer.scala:112) > > > > at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:33) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1.apply$mcV$sp(SimpleConsumer.scala:111) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1.apply(SimpleConsumer.scala:111) > > > > at > > > > > > > > > > > > > > kafka.consumer.SimpleConsumer$$anonfun$fetch$1.apply(SimpleConsumer.scala:111) > > > > at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:33) > > > > at kafka.consumer.SimpleConsumer.fetch(SimpleConsumer.scala:110) > > > > at > > > > > > > > > > > > > > kafka.server.AbstractFetcherThread.processFetchRequest(AbstractFetcherThread.scala:96) > > > > at > > > > > > kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:88) > > > > at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51) > > > > > > > > Jason > > > > > > > > > > --e89a8f646d152308d904dc423b15--