Skip to content

Commit

Permalink
Updated to kafka to 0.8.2.1, added new error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikael Högqvist committed Mar 21, 2015
1 parent e972431 commit 88e4e58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 := {
Expand Down
12 changes: 10 additions & 2 deletions src/main/scala/okapies/finagle/kafka/protocol/KafkaError.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 88e4e58

Please sign in to comment.