HBASE-16016 Fix overflow deadline value in AssignmentManager#waitForAssignment (Stephen Yuan Jiang)

This commit is contained in:
Stephen Yuan Jiang 2016-06-13 18:21:41 -07:00
parent 56c209c8aa
commit e486d274c5
1 changed files with 3 additions and 0 deletions

View File

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