HBASE-11201 Addendum restores Procedure#waitForCompleted() which returns void (Jerry He)
This commit is contained in:
parent
2db8aafe7d
commit
cf896d0671
|
@ -335,6 +335,17 @@ public class Procedure implements Callable<Void>, ForeignExceptionListener {
|
|||
dataFromFinishedMembers.put(member, dataFromMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits until the entire procedure has globally completed, or has been aborted. If an
|
||||
* exception is thrown the procedure may or not have run cleanup to trigger the completion latch
|
||||
* yet.
|
||||
* @throws ForeignException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void waitForCompleted() throws ForeignException, InterruptedException {
|
||||
waitForLatch(completedLatch, monitor, wakeFrequency, procName + " completed");
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits until the entire procedure has globally completed, or has been aborted. If an
|
||||
* exception is thrown the procedure may or not have run cleanup to trigger the completion latch
|
||||
|
@ -343,8 +354,8 @@ public class Procedure implements Callable<Void>, ForeignExceptionListener {
|
|||
* @throws ForeignException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public HashMap<String, byte[]> waitForCompleted() throws ForeignException, InterruptedException {
|
||||
waitForLatch(completedLatch, monitor, wakeFrequency, procName + " completed");
|
||||
public HashMap<String, byte[]> waitForCompletedWithRet() throws ForeignException, InterruptedException {
|
||||
waitForCompleted();
|
||||
return dataFromFinishedMembers;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue