Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: Client
    • Labels:
    • Environment:

      Mac OS X 10.12.2, Java 1.8.0_92-b14

      Description

      I've run a simple program on a local cluster. It always fails with code Version: 1.3-SNAPSHOTCommit: e24a866.

      Zhuoluos-MacBook-Pro:build-target zhuoluo.yzl$ bin/flink run -c com.alibaba.blink.TableApp ~/gitlab/tableapp/target/tableapp-1.0-SNAPSHOT.jar
      Cluster configuration: Standalone cluster with JobManager at localhost/127.0.0.1:6123
      Using address localhost:6123 to connect to JobManager.
      JobManager web interface address http://localhost:8081
      Starting execution of program

      ------------------------------------------------------------
      The program finished with the following exception:

      java.lang.NullPointerException
      at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:845)
      at org.apache.flink.client.CliFrontend.run(CliFrontend.java:259)
      at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1076)
      at org.apache.flink.client.CliFrontend$2.call(CliFrontend.java:1123)
      at org.apache.flink.client.CliFrontend$2.call(CliFrontend.java:1120)
      at org.apache.flink.runtime.security.HadoopSecurityContext$1.run(HadoopSecurityContext.java:43)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
      at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
      at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1120)

      I don't think there should be a NullPointerException here, even if you forgot the "execute()" call.

      The reproducing code looks like following:

          public static void main(String[] args) throws Exception {
              ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
              DataSource<String> customer = env.readTextFile("/Users/zhuoluo.yzl/customer.tbl");
              customer.filter(new FilterFunction<String>() {
                  public boolean filter(String value) throws Exception {
                      return true;
                  }
              })
              .writeAsText("/Users/zhuoluo.yzl/customer.txt");
      //        env.execute();
          }
      

      We can use start-cluster.sh on a local computer to reproduce the problem.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user clarkyzl opened a pull request:

          https://github.com/apache/flink/pull/3292

          FLINK-5739 [client] fix NullPointerException in CliFrontend

          Type: Bug
          Priority: Major
          Problem Definition: CliFrontEnd throws a NullPointerException
          Design:
          see https://issues.apache.org/jira/browse/FLINK-5739
          Client will throw a NullPointerException if use forgot to call method "execute()".
          User may be confused by this NullPointerException. This patch adds a message here, and makes the NullPointerException meaningful.
          Impact Analysis:
          Only the client and messages are affected.
          Test:
          mvn clean verify has been done.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/clarkyzl/flink master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3292.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3292


          commit 2921e4170502f54e1c2fb11e22cb2169deebe78e
          Author: Zhuoluo Yang <zhuoluo.yzl@alibaba-inc.com>
          Date: 2017-02-10T07:22:50Z

          FLINK-5739 [client] fix NullPointerException in CliFrontend

          commit db035643c782fb65c26efd10c8bf36d4173103f0
          Author: Zhuoluo Yang <zhuoluo.yzl@alibaba-inc.com>
          Date: 2017-02-10T07:33:35Z

          FLINK-5739 [client] fix code style


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user clarkyzl opened a pull request: https://github.com/apache/flink/pull/3292 FLINK-5739 [client] fix NullPointerException in CliFrontend Type: Bug Priority: Major Problem Definition: CliFrontEnd throws a NullPointerException Design: see https://issues.apache.org/jira/browse/FLINK-5739 Client will throw a NullPointerException if use forgot to call method "execute()". User may be confused by this NullPointerException. This patch adds a message here, and makes the NullPointerException meaningful. Impact Analysis: Only the client and messages are affected. Test: mvn clean verify has been done. You can merge this pull request into a Git repository by running: $ git pull https://github.com/clarkyzl/flink master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3292.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3292 commit 2921e4170502f54e1c2fb11e22cb2169deebe78e Author: Zhuoluo Yang <zhuoluo.yzl@alibaba-inc.com> Date: 2017-02-10T07:22:50Z FLINK-5739 [client] fix NullPointerException in CliFrontend commit db035643c782fb65c26efd10c8bf36d4173103f0 Author: Zhuoluo Yang <zhuoluo.yzl@alibaba-inc.com> Date: 2017-02-10T07:33:35Z FLINK-5739 [client] fix code style
          Hide
          clarkyzl Zhuoluo Yang added a comment -

          please see the pull request of github

          Show
          clarkyzl Zhuoluo Yang added a comment - please see the pull request of github
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user wuchong commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3292#discussion_r100719358

          — Diff: flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java —
          @@ -842,6 +842,12 @@ protected int executeProgram(PackagedProgram program, ClusterClient client, int
          program.deleteExtractedLibraries();
          }

          + if (null == result) {
          + logAndSysout("No JobSubmissionResult returned, please make sure you called" +
          — End diff –

          Please add a space at the end

          Show
          githubbot ASF GitHub Bot added a comment - Github user wuchong commented on a diff in the pull request: https://github.com/apache/flink/pull/3292#discussion_r100719358 — Diff: flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java — @@ -842,6 +842,12 @@ protected int executeProgram(PackagedProgram program, ClusterClient client, int program.deleteExtractedLibraries(); } + if (null == result) { + logAndSysout("No JobSubmissionResult returned, please make sure you called" + — End diff – Please add a space at the end
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user wuchong commented on the issue:

          https://github.com/apache/flink/pull/3292

          Thank you for fixing this. This issue is only occurred when submitting remotely.

          +1 LGTM

          Show
          githubbot ASF GitHub Bot added a comment - Github user wuchong commented on the issue: https://github.com/apache/flink/pull/3292 Thank you for fixing this. This issue is only occurred when submitting remotely. +1 LGTM
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user wuchong commented on the issue:

          https://github.com/apache/flink/pull/3292

          It seems that you introduced some commits not belong to this PR. You can try rebase your branch onto master (not merge).

          Show
          githubbot ASF GitHub Bot added a comment - Github user wuchong commented on the issue: https://github.com/apache/flink/pull/3292 It seems that you introduced some commits not belong to this PR. You can try rebase your branch onto master (not merge).
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user clarkyzl commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3292#discussion_r100945289

          — Diff: flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java —
          @@ -842,6 +842,12 @@ protected int executeProgram(PackagedProgram program, ClusterClient client, int
          program.deleteExtractedLibraries();
          }

          + if (null == result) {
          + logAndSysout("No JobSubmissionResult returned, please make sure you called " +
          — End diff –

          Added a space here and try again

          Show
          githubbot ASF GitHub Bot added a comment - Github user clarkyzl commented on a diff in the pull request: https://github.com/apache/flink/pull/3292#discussion_r100945289 — Diff: flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java — @@ -842,6 +842,12 @@ protected int executeProgram(PackagedProgram program, ClusterClient client, int program.deleteExtractedLibraries(); } + if (null == result) { + logAndSysout("No JobSubmissionResult returned, please make sure you called " + — End diff – Added a space here and try again
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/3292

          Change looks good, thank you!
          Merging this...

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3292 Change looks good, thank you! Merging this...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user clarkyzl commented on the issue:

          https://github.com/apache/flink/pull/3292

          Thanks a lot

          Show
          githubbot ASF GitHub Bot added a comment - Github user clarkyzl commented on the issue: https://github.com/apache/flink/pull/3292 Thanks a lot
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3292

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3292
          Hide
          clarkyzl Zhuoluo Yang added a comment -

          Many thanks to Stephan Ewen for merging.

          Show
          clarkyzl Zhuoluo Yang added a comment - Many thanks to Stephan Ewen for merging.
          Hide
          clarkyzl Zhuoluo Yang added a comment -

          Fixed via 5e32eb549d3bc2195548620005fcf54437e75f48

          Show
          clarkyzl Zhuoluo Yang added a comment - Fixed via 5e32eb549d3bc2195548620005fcf54437e75f48
          Hide
          StephanEwen Stephan Ewen added a comment -

          Fixed in

          • 1.2.1 via a082335f993fa6d6dea8820027cfeb6177f94d4b
          • 1.3.0 via 5e32eb549d3bc2195548620005fcf54437e75f48
          Show
          StephanEwen Stephan Ewen added a comment - Fixed in 1.2.1 via a082335f993fa6d6dea8820027cfeb6177f94d4b 1.3.0 via 5e32eb549d3bc2195548620005fcf54437e75f48

            People

            • Assignee:
              clarkyzl Zhuoluo Yang
              Reporter:
              clarkyzl Zhuoluo Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development