@InterfaceAudience.Private @InterfaceStability.Evolving protected static class HBaseAdmin.ProcedureFuture<V> extends java.lang.Object implements java.util.concurrent.Future<V>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
HBaseAdmin.ProcedureFuture.WaitForStateCallable |
| Constructor and Description |
|---|
ProcedureFuture(HBaseAdmin admin,
java.lang.Long procId) |
| Modifier and Type | Method and Description |
|---|---|
protected MasterProtos.AbortProcedureResponse |
abortProcedureResult(MasterProtos.AbortProcedureRequest request) |
boolean |
cancel(boolean mayInterruptIfRunning) |
protected V |
convertResult(MasterProtos.GetProcedureResultResponse response)
Convert the procedure result response to a specified type.
|
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
protected HBaseAdmin |
getAdmin() |
protected MasterProtos.GetProcedureResultResponse |
getProcedureResult(MasterProtos.GetProcedureResultRequest request) |
boolean |
isCancelled() |
boolean |
isDone() |
protected V |
postOpeartionFailure(java.io.IOException exception,
long deadlineTs)
Called after the operation is terminated with a failure.
|
protected V |
postOperationFailure(java.io.IOException exception,
long deadlineTs)
Called after the operation is terminated with a failure.
|
protected V |
postOperationResult(V result,
long deadlineTs)
Called after the operation is completed and the result fetched.
|
protected void |
waitForState(long deadlineTs,
HBaseAdmin.ProcedureFuture.WaitForStateCallable callable) |
protected V |
waitOperationResult(long deadlineTs)
Fallback implementation in case the procedure is not supported by the server.
|
public ProcedureFuture(HBaseAdmin admin, java.lang.Long procId)
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<V>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<V>protected MasterProtos.AbortProcedureResponse abortProcedureResult(MasterProtos.AbortProcedureRequest request) throws java.io.IOException
java.io.IOExceptionpublic V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic boolean isDone()
isDone in interface java.util.concurrent.Future<V>protected HBaseAdmin getAdmin()
protected MasterProtos.GetProcedureResultResponse getProcedureResult(MasterProtos.GetProcedureResultRequest request) throws java.io.IOException
java.io.IOExceptionprotected V convertResult(MasterProtos.GetProcedureResultResponse response) throws java.io.IOException
response - the procedure result object to parsejava.io.IOExceptionprotected V waitOperationResult(long deadlineTs) throws java.io.IOException, java.util.concurrent.TimeoutException
deadlineTs - the timestamp after which this method should throw a TimeoutExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutExceptionprotected V postOperationResult(V result, long deadlineTs) throws java.io.IOException, java.util.concurrent.TimeoutException
result - the result of the proceduredeadlineTs - the timestamp after which this method should throw a TimeoutExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutExceptionprotected V postOperationFailure(java.io.IOException exception, long deadlineTs) throws java.io.IOException, java.util.concurrent.TimeoutException
exception - the exception got from fetching the resultdeadlineTs - the timestamp after which this method should throw a TimeoutExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutExceptionprotected V postOpeartionFailure(java.io.IOException exception, long deadlineTs) throws java.io.IOException, java.util.concurrent.TimeoutException
exception - the exception got from fetching the resultdeadlineTs - the timestamp after which this method should throw a TimeoutExceptionjava.io.IOExceptionjava.util.concurrent.TimeoutExceptionprotected void waitForState(long deadlineTs,
HBaseAdmin.ProcedureFuture.WaitForStateCallable callable)
throws java.io.IOException,
java.util.concurrent.TimeoutException
java.io.IOExceptionjava.util.concurrent.TimeoutException