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

Params in jarURI end up in file name

    XMLWordPrintableJSON

Details

    Description

      Context

      Jar files for jobs are submitted to the operator by supplying a URI to the .jar file. This URI can be a file system path or a URI to some HTTP resource. If a HTTP URI is given, the file will be fetched using the HttpArtifactFetcher

      There are cases where the supplied URI will contain additional params. For example if pre-signed S3 URLs are used.

      Example:

      https://some-domain.example.com/some.jar?some=params

      Problem

      When the HttpArtifactFetcher determines the name of the .jar file it does also use the params as part of the file name. In the example from above the resulting file name would be:  some.jar?some=params

      Submitting this job to Flink will result in an error as it will be checked for the file name to end with .jar

      Possible Solution
      In the HttpArtifactFetcher it would be enough to replace:

      String fileName = FilenameUtils.getName(url.getFile());

      with

      String fileName = FilenameUtils.getName(url.getPath());

      Attachments

        Issue Links

          Activity

            People

              fabiowanner Fabio Wanner
              fabiowanner Fabio Wanner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: