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

Application mode doesn't support multiple lines argument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • 1.18.0
    • None
    • Deployment / YARN
    • None

    Description

      When running a job in application mode, flink will save program arguments in flink-conf.yaml. These arguments will be loaded when deploying an application on YARN. However multiple lines argument cannot be loaded properly.

      In my case, I submit a job with sql which is a multiple lines argument:

       

      /bin/flink run-application
      -t yarn-application
      ...
      myjob.jar
      "INSERT INTO tableA
      SELECT
      a,
      b,
      c 
      FROM tableB;"

      In flink-conf.yaml,it saved as:

      $internal.application.program-args: "INSERT INTO tableA 
      SELECT 
      a,
      b,
      c 
      FROM tableB;"

      And produced some warning logs when loaded from flink-conf.yaml :

      INFO  org.apache.flink.configuration.GlobalConfiguration           [] - Loading configuration property: $internal.application.program-args, "INSERT INTO tableA SELECT a,
      WARN  org.apache.flink.configuration.GlobalConfiguration           [] - Error while trying to split key and value in configuration file /{working dir}/flink-conf.yaml:{line num} "SELECT "
      ...

      I dig into the source code and find out that the reader and writer methods of YAML file cannot properly parse YAML format. Maybe it would be better to use some third-party tools, such as snakeyaml, to do this job.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            chenjx Jiaxing Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: