You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/06 02:30:12 UTC

[GitHub] [flink] fredia commented on a diff in pull request #20160: [FLINK-28286] move 'enablechangelog' constant to flink-core module

fredia commented on code in PR #20160:
URL: https://github.com/apache/flink/pull/20160#discussion_r914358528


##########
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java:
##########
@@ -138,6 +139,8 @@ public class ExecutionConfig implements Serializable, Archiveable<ArchivedExecut
 
     private boolean isLatencyTrackingConfigured = false;
 
+    private TernaryBoolean changelogEnabled = TernaryBoolean.UNDEFINED;
+

Review Comment:
   Yes, but there are two things to consider:
   1. `JobInformation` is in `flink-runtime` module. Moving the configuration to `JobInformation.jobConfiguration` is not much different from the [current situation](https://github.com/apache/flink/pull/19907#discussion_r902485780) (`changelogEnabled ` is in `TaskInformation.taskConfiguration`). Do you mean moving the parsing to `JobInformation`? something like:
   
   ```java
   public class JobInformation implements Serializable {
   private static final String ENABLE_CHANGE_LOG_STATE_BACKEND = "enablechangelog";
     /** Configuration of the job. */
    private final Configuration jobConfiguration;
   ...
    public void setChangelogStateBackendEnabled(TernaryBoolean enabled) {
           try {
               InstantiationUtil.writeObjectToConfig(
                       enabled, this.jobConfiguration, ENABLE_CHANGE_LOG_STATE_BACKEND);
           } catch (Exception e) {
               throw new StreamTaskException(
                       "Could not serialize change log state backend enable flag.", e);
           }
       }
   public TernaryBoolean isChangelogStateBackendEnabled(ClassLoader cl) {
           try {
               return InstantiationUtil.readObjectFromConfig(
                       this.jobConfiguration, ENABLE_CHANGE_LOG_STATE_BACKEND, cl);
           } catch (Exception e) {
               throw new StreamTaskException(
                       "Could not instantiate change log state backend enable flag.", e);
           }
       }
   ...
   }
   ```
   2. `BootstrapTransformation` in `flink-state-processing-api` also needs `enablechangelog` configuration, if move it  to `JobInformation.jobConfiguration`, do we need to keep a copy of this configuration in `flink-streaming-java`?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org