Class DoFnInvokers


  • @Internal
    public class DoFnInvokers
    extends java.lang.Object
    Static utilities for working with DoFnInvoker.
    • Method Detail

      • invokerFor

        public static <InputT,​OutputT> DoFnInvoker<InputT,​OutputT> invokerFor​(DoFn<InputT,​OutputT> fn)
        Returns an DoFnInvoker for the given DoFn, using a default choice of DoFnInvokerFactory.

        The default is permitted to change at any time. Users of this method may not depend on any details DoFnInvokerFactory-specific details of the invoker. Today it is ByteBuddyDoFnInvokerFactory.

      • tryInvokeSetupFor

        public static <InputT,​OutputT> DoFnInvoker<InputT,​OutputT> tryInvokeSetupFor​(DoFn<InputT,​OutputT> fn,
                                                                                                 PipelineOptions options)
        Tries to invoke setup on the given DoFn. If setup throws any exception, the given DoFn will be torn down immediately and the exception rethrown.

        On success returns an DoFnInvoker for the given DoFn.