[ 
https://issues.apache.org/jira/browse/FLINK-24883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Caizhi Weng updated FLINK-24883:
--------------------------------
    Description: 
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?

  was:
version:
flink verison:1.14.0  java version:1.8

a simple example code:
   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());
        }

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?


> 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
>    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