Package org.apache.hadoop.fs.impl
Class FutureIOSupport
java.lang.Object
org.apache.hadoop.fs.impl.FutureIOSupport
Deprecated.
Support for future IO and the FS Builder subclasses.
All methods in this class have been superceded by those in
FutureIO.
The methods here are retained but all marked as deprecated.
This is to ensure that any external
filesystem implementations can still use these methods
without linkage problems surfacing.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TawaitFuture(Future<T> future) Deprecated.static <T> TawaitFuture(Future<T> future, long timeout, TimeUnit unit) Deprecated.static <T> CompletableFuture<T>eval(CallableRaisingIOE<T> callable) Deprecated.Evaluate a CallableRaisingIOE in the current thread, converting IOEs to RTEs and propagating.static voidpropagateOptions(FSBuilder<?, ?> builder, Configuration conf, String prefix, boolean mandatory) Deprecated.propagateOptions(FSBuilder<T, U> builder, Configuration conf, String optionalPrefix, String mandatoryPrefix) Deprecated.static <T> TDeprecated.static <T> TDeprecated.
-
Method Details
-
awaitFuture
@Deprecated public static <T> T awaitFuture(Future<T> future) throws InterruptedIOException, IOException, RuntimeException Deprecated.Given a future, evaluate it. Raised exceptions are extracted and handled. SeeFutureIO.awaitFuture(Future, long, TimeUnit).- Type Parameters:
T- type of the result.- Parameters:
future- future to evaluate- Returns:
- the result, if all went well.
- Throws:
InterruptedIOException- future was interruptedIOException- if something went wrongRuntimeException- any nested RTE thrown
-
awaitFuture
@Deprecated public static <T> T awaitFuture(Future<T> future, long timeout, TimeUnit unit) throws InterruptedIOException, IOException, RuntimeException, TimeoutException Deprecated.Given a future, evaluate it. Raised exceptions are extracted and handled. SeeFutureIO.awaitFuture(Future, long, TimeUnit).- Type Parameters:
T- type of the result.- Parameters:
future- future to evaluatetimeout- timeout.unit- unit.- Returns:
- the result, if all went well.
- Throws:
InterruptedIOException- future was interruptedIOException- if something went wrongRuntimeException- any nested RTE thrownTimeoutException- the future timed out.
-
raiseInnerCause
Deprecated.From the inner cause of an execution exception, extract the inner cause if it is an IOE or RTE. SeeFutureIO.raiseInnerCause(ExecutionException).- Type Parameters:
T- type of return value.- Parameters:
e- exception.- Returns:
- nothing, ever.
- Throws:
IOException- either the inner IOException, or a wrapper around any non-Runtime-ExceptionRuntimeException- if that is the inner cause.
-
raiseInnerCause
Deprecated.Extract the cause of a completion failure and rethrow it if an IOE or RTE. SeeFutureIO.raiseInnerCause(CompletionException).- Type Parameters:
T- type of return value.- Parameters:
e- exception.- Returns:
- nothing, ever.
- Throws:
IOException- either the inner IOException, or a wrapper around any non-Runtime-ExceptionRuntimeException- if that is the inner cause.
-
propagateOptions
@Deprecated public static <T,U extends FSBuilder<T, FSBuilder<T,U>> U> propagateOptions(FSBuilder<T, U> builder, Configuration conf, String optionalPrefix, String mandatoryPrefix) Deprecated.Propagate options to any builder.FutureIO.propagateOptions(FSBuilder, Configuration, String, String)- Type Parameters:
T- type of resultU- type of builder- Parameters:
builder- builder to modifyconf- configuration to readoptionalPrefix- prefix for optional settingsmandatoryPrefix- prefix for mandatory settings- Returns:
- the builder passed in.
-
propagateOptions
@Deprecated public static void propagateOptions(FSBuilder<?, ?> builder, Configuration conf, String prefix, boolean mandatory) Deprecated.Propagate options to any builder.FutureIO.propagateOptions(FSBuilder, Configuration, String, boolean)- Parameters:
builder- builder to modifyconf- configuration to readprefix- prefix to scan/stripmandatory- are the options to be mandatory or optional?
-
eval
Deprecated.Evaluate a CallableRaisingIOE in the current thread, converting IOEs to RTEs and propagating. SeeFutureIO.eval(CallableRaisingIOE).- Type Parameters:
T- Return type.- Parameters:
callable- callable to invoke- Returns:
- the evaluated result.
- Throws:
UnsupportedOperationException- fail fast if unsupportedIllegalArgumentException- invalid argument
-