You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "TisonKun (JIRA)" <ji...@apache.org> on 2019/07/19 06:40:00 UTC

[jira] [Created] (FLINK-13333) Potentially NPE of preview plan functionality

TisonKun created FLINK-13333:
--------------------------------

             Summary: Potentially NPE of preview plan functionality
                 Key: FLINK-13333
                 URL: https://issues.apache.org/jira/browse/FLINK-13333
             Project: Flink
          Issue Type: Bug
    Affects Versions: 1.10.0
            Reporter: TisonKun


{{PackagedProgram#getPreviewPlan}} contains code as below

{code:java}
if (isUsingProgramEntryPoint()) {
    previewPlan = Optimizer.createPreOptimizedPlan(getPlan());
} else if (isUsingInteractiveMode()) {
    // ...
    getPlan().getJobId();
    // ....
}
{code}
 
when the latter {{#getPlan}} executed, it will finally execute {{program.getPlan(options)}} where {{program}} equals null.

To solve this problem, we can replace {{getPlan}} with {{env.getPlan}}. Where {{env}} is an instance of {{PreviewPlanEnvironment}}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)