You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2013/03/04 05:22:03 UTC

[6/37] git commit: partition state machine log4j change

partition state machine log4j change


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/aed6c3c0
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/aed6c3c0
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/aed6c3c0

Branch: refs/heads/trunk
Commit: aed6c3c0313ec00fa10b2fb0dd07658c96a99647
Parents: 1086d00
Author: Neha Narkhede <ne...@gmail.com>
Authored: Tue Feb 5 17:35:58 2013 -0800
Committer: Neha Narkhede <ne...@gmail.com>
Committed: Tue Feb 5 17:35:58 2013 -0800

----------------------------------------------------------------------
 .../kafka/controller/PartitionStateMachine.scala   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/aed6c3c0/core/src/main/scala/kafka/controller/PartitionStateMachine.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/controller/PartitionStateMachine.scala b/core/src/main/scala/kafka/controller/PartitionStateMachine.scala
index 9bb318c..4078604 100644
--- a/core/src/main/scala/kafka/controller/PartitionStateMachine.scala
+++ b/core/src/main/scala/kafka/controller/PartitionStateMachine.scala
@@ -299,8 +299,9 @@ class PartitionStateMachine(controller: KafkaController) extends Logging {
       brokerRequestBatch.addLeaderAndIsrRequestForBrokers(replicasForThisPartition, topic, partition,
         newLeaderIsrAndControllerEpoch, controllerContext.partitionReplicaAssignment(TopicAndPartition(topic, partition)).size)
     } catch {
-      case poe: PartitionOfflineException => throw new PartitionOfflineException("All replicas for partition %s are dead."
-        .format(topicAndPartition) + " Marking this partition offline", poe)
+      case poe: PartitionOfflineException => throw new PartitionOfflineException("All replicas %s for partition %s are dead."
+        .format(controllerContext.partitionReplicaAssignment(topicAndPartition).mkString(","), topicAndPartition) +
+        " Marking this partition offline", poe)
       case sce => throw new StateChangeFailedException(("Error while electing leader for partition " +
         " %s due to: %s.").format(topicAndPartition, sce.getMessage), sce)
     }