From 88e4e58f19355696c7dfca1b5c58078994b5d07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20H=C3=B6gqvist?= Date: Sat, 21 Mar 2015 09:23:07 +0100 Subject: [PATCH] Updated to kafka to 0.8.2.1, added new error codes --- build.sbt | 4 ++-- .../okapies/finagle/kafka/protocol/KafkaError.scala | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 17dd70c..7a3388e 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ net.virtualvoid.sbt.graph.Plugin.graphSettings libraryDependencies ++= List( "com.twitter" % "finagle-core_2.10" % "6.24.0", - "org.apache.kafka" % "kafka_2.10" % "0.8.1.1" + "org.apache.kafka" % "kafka_2.10" % "0.8.2.1" exclude("com.101tec", "zkclient") exclude("com.yammer.metrics", "metrics-core") exclude("net.sf.jopt-simple", "jopt-simple") @@ -26,7 +26,7 @@ libraryDependencies ++= List( "org.apache.curator" % "curator-test" % "2.7.1" % "test", "com.101tec" % "zkclient" % "0.4" % "test", "com.yammer.metrics" % "metrics-core" % "2.2.0" % "test", - "org.apache.kafka" % "kafka_2.10" % "0.8.1.1" % "test" classifier "test" + "org.apache.kafka" % "kafka_2.10" % "0.8.2.1" % "test" classifier "test" ) publishTo := { diff --git a/src/main/scala/okapies/finagle/kafka/protocol/KafkaError.scala b/src/main/scala/okapies/finagle/kafka/protocol/KafkaError.scala index 69df28c..9440183 100644 --- a/src/main/scala/okapies/finagle/kafka/protocol/KafkaError.scala +++ b/src/main/scala/okapies/finagle/kafka/protocol/KafkaError.scala @@ -20,7 +20,10 @@ case class KafkaError(code: Short /* int16 */) { case ErrorMapping.ReplicaNotAvailableCode => "ReplicaNotAvailable" case ErrorMapping.MessageSizeTooLargeCode => "MessageSizeTooLarge" case ErrorMapping.StaleControllerEpochCode => "StaleControllerEpoch" - //case ErrorMapping.OffsetMetadataTooLargeCode => "OffsetMetadataTooLarge" + case ErrorMapping.OffsetMetadataTooLargeCode => "OffsetMetadataTooLarge" + case ErrorMapping.OffsetsLoadInProgressCode => "OffsetsLoadInProgress" + case ErrorMapping.ConsumerCoordinatorNotAvailableCode => "ConsumerCoordinatorNotAvailable" + case ErrorMapping.NotCoordinatorForConsumerCode => "NotCoordinatorForConsumer" case _ => super.toString } @@ -54,8 +57,13 @@ object KafkaError { final val StaleControllerEpoch = KafkaError(ErrorMapping.StaleControllerEpochCode) - //val OffsetMetadataTooLarge = KafkaError(ErrorMapping.OffsetMetadataTooLargeCode) + final val OffsetMetadataTooLarge = KafkaError(ErrorMapping.OffsetMetadataTooLargeCode) + final val OffsetsLoadInProgress = KafkaError(ErrorMapping.OffsetsLoadInProgressCode) + + final val ConsumerCoordinatorNotAvailable = KafkaError(ErrorMapping.ConsumerCoordinatorNotAvailableCode) + + final val NotCoordinatorForConsumer = KafkaError(ErrorMapping.NotCoordinatorForConsumerCode) } class KafkaCodecException(message: String = null, cause: Throwable = null)