[ 
https://issues.apache.org/jira/browse/FLINK-24883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442602#comment-17442602
 ] 

Caizhi Weng commented on FLINK-24883:
-------------------------------------

Hi [~aresyhzhang], thanks for raising this issue.

Collecting results require a client to continuously fetching the result till 
the end or explicitly closes the iterator (causing the job to be cancelled). If 
client goes away without fetching all the results or terminating the job it 
will hang forever. Submitting by web UI does not fulfill this requirement (as 
it does not have a long existing client) so we're not supporting {{collect}} in 
web UI. I'll give out a more proper exception message and refine the document 
of {{collect}}.

Closing this issue as this is a duplicate.

> Use flink web ui to submit the jar throw Job client must be a 
> CoordinationRequestGateway. This is a bug.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-24883
>                 URL: https://issues.apache.org/jira/browse/FLINK-24883
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Web Frontend, Table SQL / API
>    Affects Versions: 1.14.0
>            Reporter: aresyhzhang
>            Priority: Critical
>
> version:
> flink verison:1.14.0  java version:1.8
> a simple example code:
> {code:java}
> public static void main(String[] args) throws Exception {
>     EnvironmentSettings batchSettings =
>             
> EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build();
>     TableEnvironment batchTableEnv = TableEnvironment.create(batchSettings);
>     Row rowData = Row.of(1, "test");
>     Table table =
>             batchTableEnv.fromValues(
>                     DataTypes.ROW(
>                             DataTypes.FIELD("id", DataTypes.INT()),
>                             DataTypes.FIELD("name", DataTypes.STRING())),
>                     rowData);
>     CloseableIterator<org.apache.flink.types.Row> it = 
> table.execute().collect();
>     System.out.println(it.next());
> }
> {code}
> describe:
> My local idea can run normally and output:
> +I[1, test]
> But when I submit a batch sql job using flink web ui throws: 
> java.lang.IllegalArgumentException: Job client must be a 
> CoordinationRequestGateway. This is a bug.
> I think this is caused by the "table.execute().collect()" code. Why can't I 
> submit the task through ui to execute, maybe this is a bug?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to