io.findify.flink.api.async

Type members

Classlikes

@PublicEvolving
trait AsyncFunction[IN, OUT] extends Function

A function to trigger async I/O operations.

A function to trigger async I/O operations.

For each asyncInvoke an async io operation can be triggered, and once it has been done, the result can be collected by calling ResultFuture.complete. For each async operation, its context is stored in the operator immediately after invoking asyncInvoke, avoiding blocking for each stream input as long as the internal buffer is not full.

ResultFuture can be passed into callbacks or futures to collect the result data. An error can also be propagate to the async IO operator by ResultFuture.completeExceptionally.

Type parameters:
IN

The type of the input element

OUT

The type of the output elements

@Internal
class JavaResultFutureWrapper[OUT](val javaResultFuture: ResultFuture[OUT]) extends ResultFuture[OUT]

Internal wrapper class to map a Flink's Java API org.apache.flink.streaming.api.functions.async.ResultFuture to a Scala io.findify.flink.api.async.ResultFuture.

Internal wrapper class to map a Flink's Java API org.apache.flink.streaming.api.functions.async.ResultFuture to a Scala io.findify.flink.api.async.ResultFuture.

Type parameters:
OUT

type of the output elements

Value parameters:
javaResultFuture

to forward the calls to

@PublicEvolving
trait ResultFuture[OUT]

The result future collects data/errors from the user code while processing asynchronous I/O operations.

The result future collects data/errors from the user code while processing asynchronous I/O operations.

Type parameters:
OUT

type of the output element

abstract class RichAsyncFunction[IN, OUT] extends AbstractRichFunction with AsyncFunction[IN, OUT]

Rich variant of AsyncFunction. As a org.apache.flink.api.common.functions.RichFunction, it gives access to the org.apache.flink.api.common.functions.RuntimeContext and provides setup and teardown methods.

Rich variant of AsyncFunction. As a org.apache.flink.api.common.functions.RichFunction, it gives access to the org.apache.flink.api.common.functions.RuntimeContext and provides setup and teardown methods.

State related apis in org.apache.flink.api.common.functions.RuntimeContext are not supported yet because the key may get changed while accessing states in the working thread.

org.apache.flink.api.common.functions.IterationRuntimeContext#getIterationAggregator is not supported since the aggregator may be modified by multiple threads.

Type parameters:
IN

The type of the input value.

OUT

The type of the output value.

final class ScalaRichAsyncFunctionWrapper[IN, OUT](func: RichAsyncFunction[IN, OUT]) extends RichAsyncFunction[IN, OUT]

A wrapper function that exposes a Scala RichAsyncFunction as a Java Rich Async Function.

A wrapper function that exposes a Scala RichAsyncFunction as a Java Rich Async Function.

The Scala and Java RichAsyncFunctions differ in their type of "ResultFuture"