[jira] [Commented] (KAFKA-831) Controller does not send the complete list of partitions to a newly started broker

2013-03-29 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617414#comment-13617414
 ] 

Jun Rao commented on KAFKA-831:
---

+1 on patch v2.

> Controller does not send the complete list of partitions to a newly started 
> broker
> --
>
> Key: KAFKA-831
> URL: https://issues.apache.org/jira/browse/KAFKA-831
> Project: Kafka
>  Issue Type: Bug
>  Components: controller
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Neha Narkhede
>Priority: Blocker
>  Labels: kafka-0.8, p1
> Attachments: kafka-831-v1.patch, kafka-831-v2.patch
>
>
> On a new broker startup, the controller is supposed to send the entire list 
> of partitions that the new broker is supposed to host in one leader and isr 
> request. In this request, it specifies if the new broker is the leader or 
> follower for each of those partitions. For most of the partitions, the new 
> broker will be a follower. However, for some partitions that don't have any 
> other broker alive, the new broker will be the leader. The bug is that the 
> controller first elects the leaders for offline partitons to see if the new 
> broker is the leader for any of those and sends only those partitions for 
> which leader was elected in the first leader and isr request. Right after 
> that, it does send a leader and isr request with all partitions, but that 
> breaks the guarantee that the very first leader and isr request has all 
> partitions. As a result of this bug, the high watermark checkpointing logic 
> behaves incorrectly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (KAFKA-831) Controller does not send the complete list of partitions to a newly started broker

2013-03-29 Thread Neha Narkhede (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617426#comment-13617426
 ] 

Neha Narkhede commented on KAFKA-831:
-

Thank you for the follow up review!

> Controller does not send the complete list of partitions to a newly started 
> broker
> --
>
> Key: KAFKA-831
> URL: https://issues.apache.org/jira/browse/KAFKA-831
> Project: Kafka
>  Issue Type: Bug
>  Components: controller
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Neha Narkhede
>Priority: Blocker
>  Labels: kafka-0.8, p1
> Attachments: kafka-831-v1.patch, kafka-831-v2.patch
>
>
> On a new broker startup, the controller is supposed to send the entire list 
> of partitions that the new broker is supposed to host in one leader and isr 
> request. In this request, it specifies if the new broker is the leader or 
> follower for each of those partitions. For most of the partitions, the new 
> broker will be a follower. However, for some partitions that don't have any 
> other broker alive, the new broker will be the leader. The bug is that the 
> controller first elects the leaders for offline partitons to see if the new 
> broker is the leader for any of those and sends only those partitions for 
> which leader was elected in the first leader and isr request. Right after 
> that, it does send a leader and isr request with all partitions, but that 
> breaks the guarantee that the very first leader and isr request has all 
> partitions. As a result of this bug, the high watermark checkpointing logic 
> behaves incorrectly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-807) LineMessageReader doesn't correctly parse the key separator

2013-03-29 Thread Jun Rao (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jun Rao updated KAFKA-807:
--

Resolution: Fixed
  Assignee: Dragos Manolescu
Status: Resolved  (was: Patch Available)

Thanks for the patch. Committed the change to ConsoleProducer to 0.8.

> LineMessageReader doesn't correctly parse the key separator
> ---
>
> Key: KAFKA-807
> URL: https://issues.apache.org/jira/browse/KAFKA-807
> Project: Kafka
>  Issue Type: Bug
>  Components: tools
>Affects Versions: 0.8
>Reporter: Dragos Manolescu
>Assignee: Dragos Manolescu
>Priority: Trivial
>  Labels: patch, producer
> Fix For: 0.8
>
>
> Typo in key name prevents extracting the key separator. The patch follows; 
> what's the recommended way to submit patches?
> Index: core/src/main/scala/kafka/producer/ConsoleProducer.scala
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
> <+>/**\n * Licensed to the Apache Software Foundation (ASF) under one or 
> more\n * contributor license agreements.  See the NOTICE file distributed 
> with\n * this work for additional information regarding copyright 
> ownership.\n * The ASF licenses this file to You under the Apache License, 
> Version 2.0\n * (the \"License\"); you may not use this file except in 
> compliance with\n * the License.  You may obtain a copy of the License at\n * 
> \n *http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by 
> applicable law or agreed to in writing, software\n * distributed under the 
> License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY KIND, either express or implied.\n * See the License for 
> the specific language governing permissions and\n * limitations under the 
> License.\n */\n\npackage kafka.producer\n\nimport 
> scala.collection.JavaConversions._\nimport joptsimple._\nimport 
> java.util.Properties\nimport java.io._\nimport kafka.common._\nimport 
> kafka.message._\nimport kafka.serializer._\n\nobject ConsoleProducer { \n\n  
> def main(args: Array[String]) { \nval parser = new OptionParser\nval 
> topicOpt = parser.accepts(\"topic\", \"REQUIRED: The topic id to produce 
> messages to.\")\n   .withRequiredArg\n
>.describedAs(\"topic\")\n   
> .ofType(classOf[String])\nval brokerListOpt = 
> parser.accepts(\"broker-list\", \"REQUIRED: The broker list string in the 
> form HOST1:PORT1,HOST2:PORT2.\")\n   
> .withRequiredArg\n   .describedAs(\"broker-list\")\n  
>  .ofType(classOf[String])\nval syncOpt = 
> parser.accepts(\"sync\", \"If set message send requests to the brokers are 
> synchronously, one at a time as they arrive.\")\nval compressOpt = 
> parser.accepts(\"compress\", \"If set, messages batches are sent 
> compressed\")\nval batchSizeOpt = parser.accepts(\"batch-size\", \"Number 
> of messages to send in a single batch if they are not being sent 
> synchronously.\")\n .withRequiredArg\n
>  .describedAs(\"size\")\n 
> .ofType(classOf[java.lang.Integer])\n 
> .defaultsTo(200)\nval sendTimeoutOpt = parser.accepts(\"timeout\", \"If 
> set and the producer is running in asynchronous mode, this gives the maximum 
> amount of time\" + \n   \" a 
> message will queue awaiting suffient batch size. The value is given in 
> ms.\")\n   .withRequiredArg\n 
>   .describedAs(\"timeout_ms\")\n   
> .ofType(classOf[java.lang.Long])\n   
> .defaultsTo(1000)\nval queueSizeOpt = parser.accepts(\"queue-size\", \"If 
> set and the producer is running in asynchronous mode, this gives the maximum 
> amount of \" + \n   \" 
> messages will queue awaiting suffient batch size.\")\n
>.withRequiredArg\n   
> .describedAs(\"queue_size\")\n   
> .ofType(classOf[java.lang.Long])\n   
> .defaultsTo(1)\nval queueEnqueueTimeoutMsOpt = 
> parser.accepts(\"queue-enqueuetimeout-ms\", \"Timeout for event enqueue\")\n  
>  .withRequiredArg\n   
> .describedAs(\"queue enqueuetimeout ms\")\n   
> .ofType(classOf[java.lang.Long])\n  

[jira] [Commented] (KAFKA-826) Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x

2013-03-29 Thread Scott Carey (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617539#comment-13617539
 ] 

Scott Carey commented on KAFKA-826:
---

The only real trouble with 3.0.x is if:
* it conflicts with 2.2.x if in the same classloader
* there is no released artifact in a public maven repo to provide repeatable 
builds.

We might be able to find out when a 3.0-alpha may be available and pushed to a 
public maven repo.  It does  not appear that a final version is due out in time.


> Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x
> -
>
> Key: KAFKA-826
> URL: https://issues.apache.org/jira/browse/KAFKA-826
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Jun Rao
>Priority: Blocker
>  Labels: build, kafka-0.8, metrics
>
> In order to mavenize Kafka 0.8, we have to depend on metrics 2.2.0 since 
> metrics 3.x is a huge change as well as not an officially supported release.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (KAFKA-826) Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x

2013-03-29 Thread Swapnil Ghike (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617646#comment-13617646
 ] 

Swapnil Ghike commented on KAFKA-826:
-

[~dragosm]: Could you upload a patch using the attach files options above? I 
tried applying your patch using "patch -p1", but it could not be applied. 
Thanks.

> Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x
> -
>
> Key: KAFKA-826
> URL: https://issues.apache.org/jira/browse/KAFKA-826
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Jun Rao
>Priority: Blocker
>  Labels: build, kafka-0.8, metrics
>
> In order to mavenize Kafka 0.8, we have to depend on metrics 2.2.0 since 
> metrics 3.x is a huge change as well as not an officially supported release.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-823) merge 0.8 (51421fcc0111031bb77f779a6f6c00520d526a34) to trunk

2013-03-29 Thread Jun Rao (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jun Rao updated KAFKA-823:
--

Attachment: kafka-823_v2.patch

Attach patch v2. It fixes a problem with counting the number of appended 
messages from the return value of log.append().

Log.append() now only returns (firstOffset, lastOffset), which provides enough 
information for all callers.

> merge 0.8 (51421fcc0111031bb77f779a6f6c00520d526a34) to trunk
> -
>
> Key: KAFKA-823
> URL: https://issues.apache.org/jira/browse/KAFKA-823
> Project: Kafka
>  Issue Type: Task
>  Components: core
>Reporter: Jun Rao
>Assignee: Jun Rao
> Attachments: kafka-823.patch, kafka-823_v2.patch
>
>
> merge 0.8 up to the following commit to trunk
> commit 51421fcc0111031bb77f779a6f6c00520d526a34
> Author: Neha Narkhede 
> Date:   Fri Mar 22 09:32:27 2013 -0700
> KAFKA-816 Reduce noise in Kafka server logs due to 
> NotLeaderForPartitionException; reviewed by Jun Rao

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-826) Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x

2013-03-29 Thread Dragos Manolescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dragos Manolescu updated KAFKA-826:
---

Attachment: kafka-fix-for-826.patch

Alternatively this code is checked into my fork of the project, 
https://github.com/polymorphic/kafka, the metrics2 branch

> Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x
> -
>
> Key: KAFKA-826
> URL: https://issues.apache.org/jira/browse/KAFKA-826
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Jun Rao
>Priority: Blocker
>  Labels: build, kafka-0.8, metrics
> Attachments: kafka-fix-for-826.patch
>
>
> In order to mavenize Kafka 0.8, we have to depend on metrics 2.2.0 since 
> metrics 3.x is a huge change as well as not an officially supported release.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (KAFKA-826) Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x

2013-03-29 Thread Swapnil Ghike (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617818#comment-13617818
 ] 

Swapnil Ghike commented on KAFKA-826:
-

Hi Dragos, I am still not able to cleanly apply the patch. Is it created off 
0.8 HEAD? Could you rebase in case it helps? Thanks.

sghike@machine:~/kafka-local/kafka$ patch -p1 --dry-run < 
../kafka-fix-for-826.patch 
patching file core/src/main/scala/kafka/cluster/Partition.scala
patching file 
core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
Hunk #1 succeeded at 650 (offset -3 lines).
patching file core/src/main/scala/kafka/controller/KafkaController.scala
Hunk #1 succeeded at 97 (offset 2 lines).
patching file core/src/main/scala/kafka/log/Log.scala
Hunk #1 succeeded at 130 with fuzz 2 (offset 53 lines).
patching file core/src/main/scala/kafka/network/RequestChannel.scala
patching file core/src/main/scala/kafka/producer/async/ProducerSendThread.scala
patching file core/src/main/scala/kafka/server/AbstractFetcherThread.scala
Hunk #1 succeeded at 195 (offset -8 lines).
patching file core/src/main/scala/kafka/server/ReplicaManager.scala
Hunk #1 FAILED at 56.
1 out of 1 hunk FAILED -- saving rejects to file 
core/src/main/scala/kafka/server/ReplicaManager.scala.rej
patching file core/src/main/scala/kafka/server/RequestPurgatory.scala
patching file core/src/test/scala/unit/kafka/metrics/KafkaTimerTest.scala
patching file project/Build.scala
Hunk #2 FAILED at 34.
1 out of 2 hunks FAILED -- saving rejects to file project/Build.scala.rej
patching file project/build/KafkaProject.scala
Hunk #1 FAILED at 74.
Hunk #2 FAILED at 82.
2 out of 2 hunks FAILED -- saving rejects to file 
project/build/KafkaProject.scala.rej

> Make Kafka 0.8 depend on metrics 2.2.0 instead of 3.x
> -
>
> Key: KAFKA-826
> URL: https://issues.apache.org/jira/browse/KAFKA-826
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 0.8
>Reporter: Neha Narkhede
>Assignee: Jun Rao
>Priority: Blocker
>  Labels: build, kafka-0.8, metrics
> Attachments: kafka-fix-for-826.patch
>
>
> In order to mavenize Kafka 0.8, we have to depend on metrics 2.2.0 since 
> metrics 3.x is a huge change as well as not an officially supported release.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-827) improve list topic output format

2013-03-29 Thread Jun Rao (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jun Rao updated KAFKA-827:
--

Attachment: kafka-827_v2.patch

Attach patch v2. 

1. Back ported the fix from trunk and made a slight change to print each 
partition in a single line. 
2. Fixed the description of the topic option.
3. Didn't make the change to use TopicMetadataRequest since it's not a blocker. 
Also, in trunk, list topic is merged into a single tool that requires ZK.

> improve list topic output format
> 
>
> Key: KAFKA-827
> URL: https://issues.apache.org/jira/browse/KAFKA-827
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 0.8
>Reporter: Jun Rao
>Assignee: Jun Rao
>Priority: Blocker
> Attachments: kafka-827.patch, kafka-827_v2.patch
>
>
> We need to make the output of list topic command more readable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-784) creating topic without partitions, deleting then creating with partition causes errors in 'kafka-list-topic'

2013-03-29 Thread Swapnil Ghike (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swapnil Ghike updated KAFKA-784:


Issue Type: Sub-task  (was: Bug)
Parent: KAFKA-330

> creating topic without partitions, deleting then creating with partition 
> causes errors in 'kafka-list-topic'
> 
>
> Key: KAFKA-784
> URL: https://issues.apache.org/jira/browse/KAFKA-784
> Project: Kafka
>  Issue Type: Sub-task
>  Components: core
>Affects Versions: 0.8
> Environment: 0.8.0 head as of 3/4/2013
>Reporter: Chris Curtin
>Priority: Minor
>
> Create a new topic using the command line:
> ./kafka-create-topic.sh --topic trash-1 --replica 3 --zookeeper localhost
> Realize you forgot to add the partition command, so remove it:
> ./kafka-delete-topic.sh --topic trash-1 --zookeeper localhost
> Recreate it with partitions:
> ./kafka-create-topic.sh --topic trash-1 --replica 3 --zookeeper localhost 
> --partition 5
> Try to get a listing:
> ./kafka-list-topic.sh --topic trash-1 --zookeeper localhost
> Errors:
> [2013-03-04 14:15:23,876] ERROR Error while fetching metadata for partition 
> [trash-1,0] (kafka.admin.AdminUtils$)
> kafka.common.LeaderNotAvailableException: Leader not available for topic 
> trash-1 partition 0
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:120)
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:103)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at 
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at 
> scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.immutable.List.map(List.scala:45)
> at 
> kafka.admin.AdminUtils$.kafka$admin$AdminUtils$$fetchTopicMetadataFromZk(AdminUtils.scala:103)
> at 
> kafka.admin.AdminUtils$.fetchTopicMetadataFromZk(AdminUtils.scala:92)
> at kafka.admin.ListTopicCommand$.showTopic(ListTopicCommand.scala:80)
> at 
> kafka.admin.ListTopicCommand$$anonfun$main$2.apply(ListTopicCommand.scala:66)
> at 
> kafka.admin.ListTopicCommand$$anonfun$main$2.apply(ListTopicCommand.scala:65)
> at 
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at kafka.admin.ListTopicCommand$.main(ListTopicCommand.scala:65)
> at kafka.admin.ListTopicCommand.main(ListTopicCommand.scala)
> Caused by: kafka.common.LeaderNotAvailableException: No leader exists for 
> partition 0
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:117)
> ... 16 more
> topic: trash-1
> PartitionMetadata(0,None,List(),List(),5)
> Can't recover until you restart all the Brokers in the cluster. Then the list 
> command works correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (KAFKA-784) creating topic without partitions, deleting then creating with partition causes errors in 'kafka-list-topic'

2013-03-29 Thread Swapnil Ghike (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swapnil Ghike reassigned KAFKA-784:
---

Assignee: Swapnil Ghike

> creating topic without partitions, deleting then creating with partition 
> causes errors in 'kafka-list-topic'
> 
>
> Key: KAFKA-784
> URL: https://issues.apache.org/jira/browse/KAFKA-784
> Project: Kafka
>  Issue Type: Sub-task
>  Components: core
>Affects Versions: 0.8
> Environment: 0.8.0 head as of 3/4/2013
>Reporter: Chris Curtin
>Assignee: Swapnil Ghike
>Priority: Minor
>
> Create a new topic using the command line:
> ./kafka-create-topic.sh --topic trash-1 --replica 3 --zookeeper localhost
> Realize you forgot to add the partition command, so remove it:
> ./kafka-delete-topic.sh --topic trash-1 --zookeeper localhost
> Recreate it with partitions:
> ./kafka-create-topic.sh --topic trash-1 --replica 3 --zookeeper localhost 
> --partition 5
> Try to get a listing:
> ./kafka-list-topic.sh --topic trash-1 --zookeeper localhost
> Errors:
> [2013-03-04 14:15:23,876] ERROR Error while fetching metadata for partition 
> [trash-1,0] (kafka.admin.AdminUtils$)
> kafka.common.LeaderNotAvailableException: Leader not available for topic 
> trash-1 partition 0
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:120)
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:103)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at 
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at 
> scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.immutable.List.map(List.scala:45)
> at 
> kafka.admin.AdminUtils$.kafka$admin$AdminUtils$$fetchTopicMetadataFromZk(AdminUtils.scala:103)
> at 
> kafka.admin.AdminUtils$.fetchTopicMetadataFromZk(AdminUtils.scala:92)
> at kafka.admin.ListTopicCommand$.showTopic(ListTopicCommand.scala:80)
> at 
> kafka.admin.ListTopicCommand$$anonfun$main$2.apply(ListTopicCommand.scala:66)
> at 
> kafka.admin.ListTopicCommand$$anonfun$main$2.apply(ListTopicCommand.scala:65)
> at 
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at kafka.admin.ListTopicCommand$.main(ListTopicCommand.scala:65)
> at kafka.admin.ListTopicCommand.main(ListTopicCommand.scala)
> Caused by: kafka.common.LeaderNotAvailableException: No leader exists for 
> partition 0
> at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:117)
> ... 16 more
> topic: trash-1
> PartitionMetadata(0,None,List(),List(),5)
> Can't recover until you restart all the Brokers in the cluster. Then the list 
> command works correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (KAFKA-840) Controller tries to perform preferred replica election on failover before state machines have started up

2013-03-29 Thread Swapnil Ghike (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617919#comment-13617919
 ] 

Swapnil Ghike commented on KAFKA-840:
-

1. Renamed inShuttingdown in partition/replica state machines to isRunning, 
because the former does not let us distinguish between a state machine that has 
not started, and a state machine that has started and is not shutting down. 
Made changes at other places accordingly.

2. With this patch, if the state machine has not started, then 
handleStateChange() throws a StateChangeFailedException with a message "because 
the state machine has not started". 

> Controller tries to perform preferred replica election on failover before 
> state machines have started up
> 
>
> Key: KAFKA-840
> URL: https://issues.apache.org/jira/browse/KAFKA-840
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.8
>Reporter: Swapnil Ghike
>Assignee: Swapnil Ghike
>Priority: Blocker
>  Labels: bugs
> Fix For: 0.8
>
> Attachments: kafka-840.patch
>
>
> If the admin/preferred_replica_election path is non-empty when a new 
> controller starts, the controller attempts to perform preferred replica 
> election before the partition and replica state machine have been 
> initialized. In this case, the controller will try to make invalid state 
> transitions. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (KAFKA-840) Controller tries to perform preferred replica election on failover before state machines have started up

2013-03-29 Thread Swapnil Ghike (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swapnil Ghike updated KAFKA-840:


Attachment: kafka-840-v2.patch

> Controller tries to perform preferred replica election on failover before 
> state machines have started up
> 
>
> Key: KAFKA-840
> URL: https://issues.apache.org/jira/browse/KAFKA-840
> Project: Kafka
>  Issue Type: Bug
>Affects Versions: 0.8
>Reporter: Swapnil Ghike
>Assignee: Swapnil Ghike
>Priority: Blocker
>  Labels: bugs
> Fix For: 0.8
>
> Attachments: kafka-840.patch, kafka-840-v2.patch
>
>
> If the admin/preferred_replica_election path is non-empty when a new 
> controller starts, the controller attempts to perform preferred replica 
> election before the partition and replica state machine have been 
> initialized. In this case, the controller will try to make invalid state 
> transitions. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira