Does a Flink JAR Job Support Configuration File Upload? How Do I Upload a Configuration File?

Uploading a Configuration File for a Flink JAR Job

Configuration files can be uploaded for user-defined jobs (JAR).

  1. Upload the configuration file to DLI through Package Management.
  2. In the Other Dependencies area of the Flink JAR job, select the created DLI package.
  3. Load the file through ClassName.class.getClassLoader().getResource("userData/fileName") in the code. In the file name, fileName indicates the name of the file to be accessed, and ClassName indicates the name of the class that needs to access the file.

Using a Configuration File