Review Request 25420: Patch for KAFKA-686
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25420/ --- Review request for kafka. Bugs: KAFKA-686 https://issues.apache.org/jira/browse/KAFKA-686 Repository: kafka Description --- Merge branch 'trunk' into fix-null-pointer-in-zk-utils unify topic partition path constructing; refactoring and better code reuse reuse method to fetch broker data unify fetching topics raise InvalidTopicException if unable to properly parse json data from Zookeeper TopicRegistrationInfo class base controller failure test on invalid topic data Diffs - core/src/main/scala/kafka/common/TopicRegistrationInfo.scala PRE-CREATION core/src/main/scala/kafka/consumer/TopicCount.scala 0954b3c3ff8b3b7a7a4095436bc9e6c494a38c37 core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala fbc680fde21b02f11285a4f4b442987356abd17b core/src/main/scala/kafka/controller/PartitionStateMachine.scala e20b63a6ec1c1a848bc3823701b0f8ceaeb6100d core/src/main/scala/kafka/server/KafkaHealthcheck.scala 4acdd70fe9c1ee78d6510741006c2ece65450671 core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala d1e7c434e77859d746b8dc68dd5d5a3740425e79 core/src/main/scala/kafka/tools/ExportZkOffsets.scala 4d051bc2db12f0e15aa6a3289abeb9dd25d373d2 core/src/main/scala/kafka/tools/UpdateOffsetsInZK.scala 111c9a8b94ce45d95551482e9fd3f8c1cccbf548 core/src/main/scala/kafka/utils/ZkUtils.scala a7b1fdcb50d5cf930352d37e39cb4fc9a080cb12 core/src/test/scala/unit/kafka/integration/AutoOffsetResetTest.scala 95303e098d40cd790fb370e9b5a47d20860a6da3 core/src/test/scala/unit/kafka/server/ControllerFailureTest.scala PRE-CREATION core/src/test/scala/unit/kafka/utils/TestUtils.scala c4e13c5240c8303853d08cc3b40088f8c7dae460 Diff: https://reviews.apache.org/r/25420/diff/ Testing --- Thanks, Viktor Tarananeko
[jira] [Commented] (KAFKA-686) 0.8 Kafka broker should give a better error message when running against 0.7 zookeeper
[ https://issues.apache.org/jira/browse/KAFKA-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14125015#comment-14125015 ] Viktor Taranenko commented on KAFKA-686: [~guozhang] I've put initial changeset on reviewboard. https://reviews.apache.org/r/25420/diff/ It contains some code refactoring to centralise getting and parsing data from ZK and implementation of shutting down the controller when it receives invalid topic exception while trying to sync with new topics. I would to get initial feedback if that is the behaviour you would expect or I'm missing something. If everything is fine so far, I will continue working on it this week. Thanks > 0.8 Kafka broker should give a better error message when running against 0.7 > zookeeper > -- > > Key: KAFKA-686 > URL: https://issues.apache.org/jira/browse/KAFKA-686 > Project: Kafka > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: Jay Kreps >Priority: Blocker > Labels: newbie, patch > Fix For: 0.8.2 > > Attachments: KAFAK-686-null-pointer-fix.patch, > KAFKA-686-null-pointer-fix-2.patch > > > People will not know that the zookeeper paths are not compatible. When you > try to start the 0.8 broker pointed at a 0.7 zookeeper you get a > NullPointerException. We should detect this and give a more sane error. > Error: > kafka.common.KafkaException: Can't parse json string: null > at kafka.utils.Json$.liftedTree1$1(Json.scala:20) > at kafka.utils.Json$.parseFull(Json.scala:16) > at > kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$2.apply(ZkUtils.scala:498) > at > kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$2.apply(ZkUtils.scala:494) > at > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61) > at scala.collection.immutable.List.foreach(List.scala:45) > at > kafka.utils.ZkUtils$.getReplicaAssignmentForTopics(ZkUtils.scala:494) > at > kafka.controller.KafkaController.initializeControllerContext(KafkaController.scala:446) > at > kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:220) > at > kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:85) > at > kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:53) > at > kafka.server.ZookeeperLeaderElector.startup(ZookeeperLeaderElector.scala:43) > at kafka.controller.KafkaController.startup(KafkaController.scala:381) > at kafka.server.KafkaServer.startup(KafkaServer.scala:90) > at > kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34) > at kafka.Kafka$.main(Kafka.scala:46) > at kafka.Kafka.main(Kafka.scala) > Caused by: java.lang.NullPointerException > at > scala.util.parsing.combinator.lexical.Scanners$Scanner.(Scanners.scala:52) > at scala.util.parsing.json.JSON$.parseRaw(JSON.scala:71) > at scala.util.parsing.json.JSON$.parseFull(JSON.scala:85) > at kafka.utils.Json$.liftedTree1$1(Json.scala:17) > ... 16 more -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-1591) Clean-up Unnecessary stack trace in error/warn logs
[ https://issues.apache.org/jira/browse/KAFKA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Abhishek Sharma updated KAFKA-1591: --- Attachment: Jira1591-SendProducerRequest-Warning.patch Jira-1591 Changed print stack trace to exception.toString(). For WARN Log entries 'Failed to send producer request with correlation id XX to broker YY with data for partitions' from class 'DefaultEventHandler' > Clean-up Unnecessary stack trace in error/warn logs > --- > > Key: KAFKA-1591 > URL: https://issues.apache.org/jira/browse/KAFKA-1591 > Project: Kafka > Issue Type: Bug >Reporter: Guozhang Wang > Labels: newbie > Fix For: 0.9.0 > > Attachments: Jira-1591-SocketConnection-Warning.patch, > Jira1591-SendProducerRequest-Warning.patch > > > Some of the unnecessary stack traces in error / warning log entries can > easily pollute the log files. Examples include KAFKA-1066, etc. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-1591) Clean-up Unnecessary stack trace in error/warn logs
[ https://issues.apache.org/jira/browse/KAFKA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14125243#comment-14125243 ] Abhishek Sharma commented on KAFKA-1591: Attached is the another patch for WARN Log entries from DefaultEventHandler class. Please assign this jira to me and let me know more what left in this jira ticket? > Clean-up Unnecessary stack trace in error/warn logs > --- > > Key: KAFKA-1591 > URL: https://issues.apache.org/jira/browse/KAFKA-1591 > Project: Kafka > Issue Type: Bug >Reporter: Guozhang Wang > Labels: newbie > Fix For: 0.9.0 > > Attachments: Jira-1591-SocketConnection-Warning.patch, > Jira1591-SendProducerRequest-Warning.patch > > > Some of the unnecessary stack traces in error / warning log entries can > easily pollute the log files. Examples include KAFKA-1066, etc. -- This message was sent by Atlassian JIRA (v6.3.4#6332)