Skip to content

Adapt exception handler preparation in FlinkCustomNodeContext for Flink 2.0 #8656

@DeamonDev

Description

@DeamonDev

💥 Proposal

In the current implementation of FlinkCustomNodeContext we have exceptionHandlerPreparer: RuntimeContext => ExceptionHandler. With new Flink API there are changes (for example for sinks) which cause that context is not being retrieved via RichFunction#getRuntimeContext method and context is being passed down explicitly via constructor injection.

We should change the signature of this function to (RuntimeContext | WriterInitContext | ... ) => ExceptionHandler (this ADT will probably expand while adapting other components to use new API).

We also should add new analogous trait for WithExceptionHandler since it uses a self-type requirement: self: RichFunction and new sink2.Sink does not conform this requirement.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions