Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3189

Error while parsing job arguments passed by CLI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.10.1
    • 0.10.2, 1.0.0
    • Command Line Client
    • None

    Description

      Flink CLI treats job arguments provided in format "-<char>" as its own parameters, which results in errors in execution.

      Example 1:
      call: >bin/flink info myJarFile.jar -f flink -i <filepath> -m 1
      error: Unrecognized option: -f

      Example 2:
      Job myJarFile.jar is uploaded to web submission client, flink parameter box is empty
      program arguments box: -f flink -i <filepath> -m 1
      error:
      An unexpected error occurred:
      Unrecognized option: -f
      org.apache.flink.client.cli.CliArgsException: Unrecognized option: -f
      at org.apache.flink.client.cli.CliFrontendParser.parseInfoCommand(CliFrontendParser.java:296)
      at org.apache.flink.client.CliFrontend.info(CliFrontend.java:376)
      at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:983)
      at org.apache.flink.client.web.JobSubmissionServlet.doGet(JobSubmissionServlet.java:171)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:532)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:965)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:388)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:187)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:901)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
      at org.eclipse.jetty.server.Server.handle(Server.java:348)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211)
      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:425)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:489)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
      at java.lang.Thread.run(Thread.java:745)

      Execution of
      >bin/flink run myJarFile.jar -f flink -i <filepath> -m 1
      works perfectly fine

      Attachments

        Activity

          People

            mjsax Matthias J. Sax
            LECZYF Filip Leczycki
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: