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

PyFlink TableEnvironment executes the SQL randomly MalformedURLException with the configuration for 'pipeline.classpaths'

    XMLWordPrintableJSON

Details

    Description

      When I run flink client to submit a python based workflow, I got the MalformedURLException like this:

      https://gist.github.com/is/faabafc7f8750f3f3161fbb6517ed6ff

      After some debug work, I found the problem is related with
      TableEvneriontment.execute_sql. The root cause is
      TableEvenriontment._add_jars_to_j_env_config in pyflink/table/TableEnverionment.py.

      ```
      if j_configuration.containsKey(config_key):
      for url in j_configuration.getString(config_key, "").split(";"):
      jar_urls_set.add(url)
      ```

      In our case, pipeline.classpaths was set by empty list value
      from FromProgramOption, so the upper code block will
      introduce a empty string ("") into pipeline.classpaths, for example
      "a.jar;b.jar;;c.jar", and it will cause the according exception.

      Another problem, the order of string set in python is not
      determinate, so ";".join(jar_urls_set) does NOT keep the
      classpaths order. The list is more suiteable in this case.

      Attachments

        Issue Links

          Activity

            People

              is Xin Yu
              nicholasjiang Nicholas Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: