You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/20 05:46:21 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #10505: [Fix]Recovery Traffic Control Config

ruanwenjun commented on code in PR #10505:
URL: https://github.com/apache/dolphinscheduler/pull/10505#discussion_r901273667


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/TrafficConfiguration.java:
##########
@@ -25,15 +25,15 @@
 @Configuration
 public class TrafficConfiguration {
 
-    @Value("${traffic.control.global.switch:false}")
+    @Value("${traffic.control.global-switch:false}")

Review Comment:
   Can we use `@ConfigurationProperties` to simplify this.
   ```java
   @Data
   @Configuration
   @ConfigurationProperties(prefix = "traffic.control")
   public class TrafficConfiguration {
   
       private boolean globalSwitch;
       private Integer maxGlobalQpsRate = 300;
       private boolean tenantSwitch;
       private Integer defaultTenantQpsRate = 10;
       private Map<String, Integer> customizeTenantQpsRate = new HashMap<>();
   }
   ```



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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