Class LambdaUtils

java.lang.Object
org.apache.hadoop.util.LambdaUtils

@Private @Unstable public final class LambdaUtils extends Object
Lambda-expression utilities be they generic or specific to Hadoop datatypes.
  • Method Details

    • eval

      public static <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. 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