flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-5541) Missing null check for localJar in FlinkSubmitter#submitTopology()
Date Tue, 17 Jan 2017 21:25:26 GMT
Ted Yu created FLINK-5541:
-----------------------------

             Summary: Missing null check for localJar in FlinkSubmitter#submitTopology()
                 Key: FLINK-5541
                 URL: https://issues.apache.org/jira/browse/FLINK-5541
             Project: Flink
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


{code}
      if (localJar == null) {
        try {
          for (final URL url : ((ContextEnvironment) ExecutionEnvironment.getExecutionEnvironment())
              .getJars()) {
            // TODO verify that there is only one jar
            localJar = new File(url.toURI()).getAbsolutePath();
          }
        } catch (final URISyntaxException e) {
          // ignore
        } catch (final ClassCastException e) {
          // ignore
        }
      }

      logger.info("Submitting topology " + name + " in distributed mode with conf " + serConf);
      client.submitTopologyWithOpts(name, localJar, topology);
{code}
Since the try block may encounter URISyntaxException / ClassCastException, we should check
that localJar is not null before calling submitTopologyWithOpts().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message