Index: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java (revision 1631660) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java (working copy) @@ -396,7 +396,9 @@ public void addEvent(InputInitializerEvent event) { synchronized(sourcesWaitingForEvents) { if (sourcesWaitingForEvents.contains(event.getSourceVertexName())) { - queue.offer(event); + if(!queue.offer(event)) { + throw new IllegalStateException("Queue full"); + } } } } @@ -409,7 +411,9 @@ if (sourcesWaitingForEvents.isEmpty()) { // we've got what we need; mark the queue - queue.offer(endOfEvents); + if(!queue.offer(endOfEvents)) { + throw new IllegalStateException("Queue full"); + } } else { LOG.info("Waiting for " + sourcesWaitingForEvents.size() + " events."); }