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

Support override of DEFAULT_JOB_NAME with system property for StreamExecutionEnvironment

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • 1.10.0
    • None
    • None

    Description

      We are running multiple jobs on a shared standalone HA Cluster.

      We want to be able to provide the job name via the submitting shell script using a system property; for example "job.name".

      We could of course write Java application code in each job to achieve this by passing the system property value ourselves to the execute(name) method, however we want to do this from the env.

      However, there exists already default job name in StreamExecutionEnvironment.DEFAULT_JOB_NAME.

      Our proposed changed to add a method to StreamExecutionEnvironment...

      String getDefaultJobName() {
            return System.getProperty("default.job.name", StreamExecutionEnvironment.DEFAULT_JOB_NAME);
      }
      

      .. and call that method rather than directly accessing StreamExecutionEnvironment.DEFAULT_JOB_NAME

      This change is backwards compatible.

      We need this method to evalulate on a job by job basis so for example the following small amendment to the existing DEFAULT_JOB_NAME value will NOT work because this will not allow us to vary the value job by job.

      class StreamExecutionEnvironment {
       static final String DEFAULT_JOB_NAME = System.getProperty("default.job.name", "Flink Streaming Job"))
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnlon John Lonergan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: