mirror of https://github.com/apache/kafka.git
Exception java.util.NoSuchElementException: None.get appears inconsistently; patched by Jun Rao; reviewed by Joel Koshy; KAFKA-370
git-svn-id: https://svn.apache.org/repos/asf/incubator/kafka/branches/0.8@1352980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a16448b71e
commit
0efd609fe7
|
@ -73,7 +73,7 @@ class ProducerPool(val config: ProducerConfig, val zkClient: ZkClient) extends L
|
|||
if(syncProducers.size == 0)
|
||||
throw new NoBrokersForPartitionException("No brokers available")
|
||||
}
|
||||
syncProducers.get(Utils.random.nextInt(syncProducers.size)).get
|
||||
syncProducers.head._2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue