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

Change default value of execution.runtime-mode from STREAMING to AUTOMATIC

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • API / Core

    Description

      Hi team,

      I debug with WordCount locally, and find 
      StreamGraphGenerator#shouldExecuteInBatchMode will return false due to we get the  default value of `execution.runtime-mode`.
       
      The logic seems incorrect here.

      private boolean shouldExecuteInBatchMode() {
          final RuntimeExecutionMode configuredMode =
                  configuration.get(ExecutionOptions.RUNTIME_MODE);
      
          final boolean existsUnboundedSource = existsUnboundedSource();
      
          checkState(
                  configuredMode != RuntimeExecutionMode.BATCH || !existsUnboundedSource,
                  "Detected an UNBOUNDED source with the '"
                          + ExecutionOptions.RUNTIME_MODE.key()
                          + "' set to 'BATCH'. "
                          + "This combination is not allowed, please set the '"
                          + ExecutionOptions.RUNTIME_MODE.key()
                          + "' to STREAMING or AUTOMATIC");
      
          if (checkNotNull(configuredMode) != RuntimeExecutionMode.AUTOMATIC) {
              return configuredMode == RuntimeExecutionMode.BATCH;
          }
          return !existsUnboundedSource;
      } 

      If we don't set `execution.runtime-mode` then this method will always return false, although we use boundedSource.
       
      Why we didn't choose to use AUTOMATIC as the default value, this should be work in most cases? Is there any other reason?
       
       
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wenjun Wenjun Ruan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: