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:
Jun Rao 2012-06-22 17:31:38 +00:00
parent a16448b71e
commit 0efd609fe7
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}