@InterfaceAudience.Private @InterfaceStability.Evolving protected static class HBaseAdmin.ProcedureFuture<V> extends Object implements Future<V>
Modifier and Type | Class and Description |
---|---|
protected static interface |
HBaseAdmin.ProcedureFuture.WaitForStateCallable |
Modifier and Type | Field and Description |
---|---|
private HBaseAdmin |
admin |
private boolean |
cancelled |
private boolean |
done |
private ExecutionException |
exception |
protected Long |
procId |
private boolean |
procResultFound |
private V |
result |
Constructor and Description |
---|
ProcedureFuture(HBaseAdmin admin,
Long procId) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.AbortProcedureResponse |
abortProcedureResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.AbortProcedureRequest request) |
boolean |
cancel(boolean mayInterruptIfRunning) |
protected V |
convertResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultResponse response)
Convert the procedure result response to a specified type.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
protected HBaseAdmin |
getAdmin() |
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultResponse |
getProcedureResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultRequest request) |
boolean |
isCancelled() |
boolean |
isDone() |
protected V |
postOperationFailure(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.
|
private static IOException |
unwrapException(IOException e) |
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.
|
private V |
waitProcedureResult(long procId,
long deadlineTs) |
private ExecutionException exception
private boolean procResultFound
private boolean done
private boolean cancelled
private final HBaseAdmin admin
public ProcedureFuture(HBaseAdmin admin, Long procId)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<V>
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.AbortProcedureResponse abortProcedureResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.AbortProcedureRequest request) throws IOException
IOException
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
protected HBaseAdmin getAdmin()
private V waitProcedureResult(long procId, long deadlineTs) throws IOException, TimeoutException, InterruptedException
private static IOException unwrapException(IOException e)
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultResponse getProcedureResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultRequest request) throws IOException
IOException
protected V convertResult(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetProcedureResultResponse response) throws IOException
response
- the procedure result object to parseIOException
protected V waitOperationResult(long deadlineTs) throws IOException, TimeoutException
deadlineTs
- the timestamp after which this method should throw a TimeoutExceptionIOException
TimeoutException
protected V postOperationResult(V result, long deadlineTs) throws IOException, TimeoutException
result
- the result of the proceduredeadlineTs
- the timestamp after which this method should throw a TimeoutExceptionIOException
TimeoutException
protected V postOperationFailure(IOException exception, long deadlineTs) throws IOException, TimeoutException
exception
- the exception got from fetching the resultdeadlineTs
- the timestamp after which this method should throw a TimeoutExceptionIOException
TimeoutException
protected void waitForState(long deadlineTs, HBaseAdmin.ProcedureFuture.WaitForStateCallable callable) throws IOException, TimeoutException
IOException
TimeoutException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.