Package org.apache.hadoop.util
Class LambdaUtils
java.lang.Object
org.apache.hadoop.util.LambdaUtils
Lambda-expression utilities be they generic or specific to
Hadoop datatypes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T>eval(CompletableFuture<T> result, Callable<T> call) Utility method to evaluate a callable and fill in the future with the result or the exception raised.
-
Method Details
-
eval
Utility method to evaluate a callable and fill in the future with the result or the exception raised. Once this method returns, the future will have been evaluated to either a return value or an exception.- Type Parameters:
T- type of future- Parameters:
result- future for the result.call- callable to invoke.- Returns:
- the future passed in
-