kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject svn commit: r1395809 - in /incubator/kafka: branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
Date Mon, 08 Oct 2012 23:18:48 GMT
Author: jjkoshy
Date: Mon Oct  8 23:18:48 2012
New Revision: 1395809

URL: http://svn.apache.org/viewvc?rev=1395809&view=rev
Log:
ConsumerOffsetChecker now works with hostnames (in addition to IP) in the brokers/ids zk path;
KAFKA-549; patched by Bob Cotton; reviewed by Joel Koshy

Modified:
    incubator/kafka/branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
    incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala

Modified: incubator/kafka/branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala?rev=1395809&r1=1395808&r2=1395809&view=diff
==============================================================================
--- incubator/kafka/branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
(original)
+++ incubator/kafka/branches/0.8/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
Mon Oct  8 23:18:48 2012
@@ -34,8 +34,9 @@ object ConsumerOffsetChecker extends Log
 
   private val BidPidPattern = """(\d+)-(\d+)""".r
 
-  private val BrokerIpPattern = """.*:(\d+\.\d+\.\d+\.\d+):(\d+$)""".r
+  private val BrokerIpPattern = """.*:([^:]+):(\d+$)""".r
   // e.g., 127.0.0.1-1315436360737:127.0.0.1:9092
+  // e.g., host.domain.com-1315436360737:host.domain.com:9092
 
   private def getConsumer(zkClient: ZkClient, bid: String): Option[SimpleConsumer] = {
     val brokerInfo = ZkUtils.readDataMaybeNull(zkClient, "/brokers/ids/%s".format(bid))._1

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala?rev=1395809&r1=1395808&r2=1395809&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala Mon
Oct  8 23:18:48 2012
@@ -29,8 +29,9 @@ object ConsumerOffsetChecker extends Log
 
   private val BidPidPattern = """(\d+)-(\d+)""".r
 
-  private val BrokerIpPattern = """.*:(\d+\.\d+\.\d+\.\d+):(\d+$)""".r
+  private val BrokerIpPattern = """.*:([^:]+):(\d+$)""".r
   // e.g., 127.0.0.1-1315436360737:127.0.0.1:9092
+  // e.g., host.domain.com-1315436360737:host.domain.com:9092
 
   private def getConsumer(zkClient: ZkClient, bid: String): Option[SimpleConsumer] = {
     val brokerInfo = ZkUtils.readDataMaybeNull(zkClient, "/brokers/ids/%s".format(bid))



Mime
View raw message