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

Add custom libs to Flink classpath with an environment variable.

    XMLWordPrintableJSON

Details

    Description

      To use plugin library you need to add it to the flink classpath. The documentation explains to put the jar file in the lib path.

      https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/metrics.html#prometheus-orgapacheflinkmetricsprometheusprometheusreporter

      However, to deploy metric-enabled Flinks on a kubernetes cluster, we have the burden of creating and managing another container image. It would be more efficient to add the classpath using environment variables inside the constructFlinkClassPath function in the config.sh file.

      In particular, it seems inconvenient for me to create separate images to use the jars, even though the /opt/ flink/opt of the stock image already contains them.

      For example, there are metrics libs and file system libs:

      flink-azure-fs-hadoop-1.9.1.jar
      flink-s3-fs-hadoop-1.9.1.jar
      flink-metrics-prometheus-1.9.1.jar
      flink-metrics-influxdb-1.9.1.jar

      Attachments

        Activity

          People

            Unassigned Unassigned
            elanv Eui Heo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m