You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2016/05/06 23:27:45 UTC

hive git commit: HIVE-8343 : Return value from BlockingQueue.offer() is not checked in DynamicPartitionPruner (JongWon Park via Ashutosh Chauhan)

Repository: hive
Updated Branches:
  refs/heads/master db8a6db99 -> 1f1740673


HIVE-8343 : Return value from BlockingQueue.offer() is not checked in DynamicPartitionPruner (JongWon Park via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/1f174067
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/1f174067
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/1f174067

Branch: refs/heads/master
Commit: 1f17406738fd0e22db1267e3b1ad4a3f95dcc7f3
Parents: db8a6db
Author: JongWon Park <yo...@lgcns.com>
Authored: Tue Oct 14 01:36:00 2014 -0800
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Fri May 6 16:26:56 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1f174067/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java
index 3f16359..9e1bf0b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java
@@ -481,7 +481,9 @@ public class DynamicPartitionPruner {
       if (sourcesWaitingForEvents.contains(event.getSourceVertexName())) {
         ++totalEventCount;
         numEventsSeenPerSource.get(event.getSourceVertexName()).increment();
-        queue.offer(event);
+        if(!queue.offer(event)) {
+          throw new IllegalStateException("Queue full");
+        }
         checkForSourceCompletion(event.getSourceVertexName());
       }
     }
@@ -511,7 +513,9 @@ public class DynamicPartitionPruner {
         sourcesWaitingForEvents.remove(name);
         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() + " sources.");
         }