fixes incorrect use of iterator in earlier commit 5d499854bf4b236b2d5fc7078d7fc5343d89dbeb
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8c0dcb1f Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8c0dcb1f Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8c0dcb1f Branch: refs/heads/master Commit: 8c0dcb1fede52512f2599ae4732372346bb36ba3 Parents: 5d49985 Author: Pete Prokopowicz <pprokopow...@groupon.com> Authored: Wed Sep 23 12:30:06 2015 -0500 Committer: Pete Prokopowicz <pprokopow...@groupon.com> Committed: Wed Sep 23 12:30:06 2015 -0500 ---------------------------------------------------------------------- external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/8c0dcb1f/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java ---------------------------------------------------------------------- diff --git a/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java b/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java index fc757aa..afff87c 100644 --- a/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java +++ b/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java @@ -136,7 +136,7 @@ public class PartitionManager { return EmitState.NO_EMITTED; } Iterable<List<Object>> tups = KafkaUtils.generateTuples(_spoutConfig, toEmit.msg); - if ((tups != null) && (tups.size() > 0)) { + if ((tups != null) && tups.iterator.hasNext()) { if(_spoutConfig.topicAsStreamId) { for (List<Object> tup : tups) { collector.emit(_spoutConfig.topic, tup, new KafkaMessageId(_partition, toEmit.offset));