From e486d274c508bea01b93f7c3175177c35482a5f1 Mon Sep 17 00:00:00 2001 From: Stephen Yuan Jiang Date: Mon, 13 Jun 2016 18:21:41 -0700 Subject: [PATCH] HBASE-16016 Fix overflow deadline value in AssignmentManager#waitForAssignment (Stephen Yuan Jiang) --- .../java/org/apache/hadoop/hbase/master/AssignmentManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 49026ac3392..55a15ee6110 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -1444,6 +1444,9 @@ public class AssignmentManager { final boolean waitTillAllAssigned, final int reassigningRegions, final long minEndTime) throws InterruptedException { long deadline = minEndTime + bulkPerRegionOpenTimeGuesstimate * (reassigningRegions + 1); + if (deadline < 0) { // Overflow + deadline = Long.MAX_VALUE; // wait forever + } return waitForAssignment(regionSet, waitTillAllAssigned, deadline); }