Re: IllegalStateException Printing Plan

Posted by Dawid Wysakowicz-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/IllegalStateException-Printing-Plan-tp39522p39533.html

Hi Rex,

The executeInsert method as the name states executes the query. Therefore after the method there is nothing in the topology and thus you get the exception.

You can either explain the userDocsTable:

userDocsTable.explain()

or you can explain a statement set if you want to postpone the execution:

StatementSet set = tEnv.createStatementSet();

set.addInsert(SINK_ES_PEOPLE, userDocsTable);

set.explain()

or you can explain SQL:

String sqlQuery = ...

tEnv.explainSql(sqlQuery);

Best,

Dawid

On 17/11/2020 09:16, Khachatryan Roman wrote:
Hello,

Can you share the full program? 
getExecutionPlan call is probably misplaced.

Regards,
Roman


On Tue, Nov 17, 2020 at 8:26 AM Rex Fenley <[hidden email]> wrote:
Hello,

I have the following code attempting to print the execution plan for my job locally. The job runs fine and Flink UI displays so I'd expect this to work.

val tableResult = userDocsTable.executeInsert(SINK_ES_PEOPLE)
println(s"execution plan:\n${this.env.getExecutionPlan()}")

but instead I end up with

Caused by: java.lang.IllegalStateException: No operators defined in streaming topology. Cannot execute.

What am I doing wrong?

--

Rex Fenley  |  Software Engineer - Mobile and Backend


Remind.com |  BLOG  |  FOLLOW US  |  LIKE US


signature.asc (849 bytes) Download Attachment