[
https://issues.apache.org/jira/browse/CAMEL-26121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136530#comment-18136530
]
Claus Ibsen commented on CAMEL-26121:
-------------------------------------
PR: https://github.com/apache/camel/pull/28898
Both bugs are fixed. The endpoint now falls back to the component dataStream
and dataStreamCallback. A DataStream returned by the callback is the body and
the CamelFlinkDataStream header unless collect=true is set explicitly, which
still fails. The collect option keeps its type and default. Upgrade guide entry
added.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-flink - the component dataStream and dataStreamCallback options are
> ignored, and a DataStream callback always fails with the default collect=true
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26121
> URL: https://issues.apache.org/jira/browse/CAMEL-26121
> Project: Camel
> Issue Type: Bug
> Components: camel-flink
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of flink, spring-batch and
> optaplanner (CAMEL-24961, PR #28418).
> h4. 1. The component-level dataStream and dataStreamCallback options are
> ignored
> {{FlinkEndpoint.doInit}} (main 2a465aa4814c, lines 74-84) falls back to the
> component's {{dataSet}} and {{dataSetCallback}}, but not to its
> {{dataStream}} and {{dataStreamCallback}}. With those set only on the
> component, {{flink:datastream}} fails "No DataStream defined"
> ({{DataStreamFlinkProducer}}, line 95). Checked on 4.24.0-SNAPSHOT with a
> local Flink environment.
> Proposed: also fall back to the component's {{dataStream}} and
> {{dataStreamCallback}} in {{doInit}}.
> h4. 2. A DataStream callback always fails with the default collect=true
> {{collect}} defaults to {{true}} ({{FlinkEndpoint}}, main 2a465aa4814c, line
> 50), and {{DataStreamFlinkProducer.collectResults}} (line 79) throws "collect
> mode not supported for Flink DataStreams." when the callback returns a
> DataStream. So a DataStream callback returning a DataStream fails until
> {{collect=false}} is set. Checked on 4.24.0-SNAPSHOT with a local Flink
> environment.
> Proposed: for {{flink:datastream}} return the DataStream as is when
> {{collect}} was not set explicitly (or default collect to false there).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)