Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4075#discussion_r123015168
  
    --- Diff: 
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosApplicationMasterRunner.java
 ---
    @@ -492,42 +492,38 @@ public static MesosConfiguration 
createMesosConfig(Configuration flinkConfig, St
                        .setHostname(hostname);
                Protos.Credential.Builder credential = null;
     
    -           if (!flinkConfig.containsKey(ConfigConstants.MESOS_MASTER_URL)) 
{
    -                   throw new 
IllegalConfigurationException(ConfigConstants.MESOS_MASTER_URL + " must be 
configured.");
    +           if (!flinkConfig.contains(MesosConfigOptions.MESOS_MASTER_URL)) 
{
    +                   throw new 
IllegalConfigurationException(MesosConfigOptions.MESOS_MASTER_URL.key() + " 
must be configured.");
                }
    -           String masterUrl = 
flinkConfig.getString(ConfigConstants.MESOS_MASTER_URL, null);
    +           String masterUrl = 
flinkConfig.getString(MesosConfigOptions.MESOS_MASTER_URL, null);
     
                Duration failoverTimeout = FiniteDuration.apply(
                        flinkConfig.getInteger(
    -                           ConfigConstants.MESOS_FAILOVER_TIMEOUT_SECONDS,
    -                           
ConfigConstants.DEFAULT_MESOS_FAILOVER_TIMEOUT_SECS),
    +                           
MesosConfigOptions.MESOS_FAILOVER_TIMEOUT_SECONDS),
                        TimeUnit.SECONDS);
                frameworkInfo.setFailoverTimeout(failoverTimeout.toSeconds());
     
                frameworkInfo.setName(flinkConfig.getString(
    -                   ConfigConstants.MESOS_RESOURCEMANAGER_FRAMEWORK_NAME,
    -                   
ConfigConstants.DEFAULT_MESOS_RESOURCEMANAGER_FRAMEWORK_NAME));
    +                   
MesosConfigOptions.MESOS_RESOURCEMANAGER_FRAMEWORK_NAME));
     
                frameworkInfo.setRole(flinkConfig.getString(
    -                   ConfigConstants.MESOS_RESOURCEMANAGER_FRAMEWORK_ROLE,
    -                   
ConfigConstants.DEFAULT_MESOS_RESOURCEMANAGER_FRAMEWORK_ROLE));
    +                   
MesosConfigOptions.MESOS_RESOURCEMANAGER_FRAMEWORK_ROLE));
     
                frameworkInfo.setUser(flinkConfig.getString(
    -                   ConfigConstants.MESOS_RESOURCEMANAGER_FRAMEWORK_USER,
    -                   
ConfigConstants.DEFAULT_MESOS_RESOURCEMANAGER_FRAMEWORK_USER));
    +                   
MesosConfigOptions.MESOS_RESOURCEMANAGER_FRAMEWORK_USER));
     
    -           if 
(flinkConfig.containsKey(ConfigConstants.MESOS_RESOURCEMANAGER_FRAMEWORK_PRINCIPAL))
 {
    +           if 
(flinkConfig.contains(MesosConfigOptions.MESOS_RESOURCEMANAGER_FRAMEWORK_PRINCIPAL))
 {
                        frameworkInfo.setPrincipal(flinkConfig.getString(
    -                           
ConfigConstants.MESOS_RESOURCEMANAGER_FRAMEWORK_PRINCIPAL, null));
    +                           
MesosConfigOptions.MESOS_RESOURCEMANAGER_FRAMEWORK_PRINCIPAL, null));
    --- End diff --
    
    We can remove the null argument here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to