kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1352980 - /incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala
Date Fri, 22 Jun 2012 17:31:38 GMT
Author: junrao
Date: Fri Jun 22 17:31:38 2012
New Revision: 1352980

URL: http://svn.apache.org/viewvc?rev=1352980&view=rev
Log:
Exception java.util.NoSuchElementException: None.get appears inconsistently; patched by Jun
Rao; reviewed by Joel Koshy; KAFKA-370

Modified:
    incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala

Modified: incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala?rev=1352980&r1=1352979&r2=1352980&view=diff
==============================================================================
--- incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala (original)
+++ incubator/kafka/branches/0.8/core/src/main/scala/kafka/producer/ProducerPool.scala Fri
Jun 22 17:31:38 2012
@@ -73,7 +73,7 @@ class ProducerPool(val config: ProducerC
         if(syncProducers.size == 0)
           throw new NoBrokersForPartitionException("No brokers available")
       }
-      syncProducers.get(Utils.random.nextInt(syncProducers.size)).get
+      syncProducers.head._2
     }
   }
 



Mime
View raw message