Class FutureIO


  • public final class FutureIO
    extends Object
    Methods to work with futures, based on. org.apache.hadoop.util.functional.FutureIO. These methods are used in production code.
    • Constructor Detail

      • FutureIO

        public FutureIO()
    • Method Detail

      • unwrapInnerException

        public static IOException unwrapInnerException​(Throwable e)
        From the inner cause of an execution exception, extract the inner cause to an IOException, raising Errors immediately.
        1. If it is an IOE: Return.
        2. If it is a UncheckedIOException: return the cause
        3. Completion/Execution Exceptions: extract and repeat
        4. If it is an RTE or Error: throw.
        5. Any other type: wrap in an IOE
        6. If there is no cause: wrap the passed exception by an IOE
        Recursively handles wrapped Execution and Completion Exceptions in case something very complicated has happened.
        Parameters:
        e - exception.
        Returns:
        an IOException extracted or built from the cause.
        Throws:
        RuntimeException - if that is the inner cause.
        Error - if that is the inner cause.