WillemJiang commented on a change in pull request #550: [SCB-327] Update 
metrics publish data module
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/550#discussion_r167118327
 
 

 ##########
 File path: 
metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/publish/DefaultDataSource.java
 ##########
 @@ -67,32 +66,37 @@ public DefaultDataSource(RegistryMonitor registryMonitor, 
String pollingSettings
         throw new ServiceCombException("bad format 
servicecomb.metrics.window_time", e);
       }
     }
-    String finalPollingSettings = Strings.join(",", 
parsePollingSettings.iterator());
-    System.getProperties().setProperty("servo.pollers", finalPollingSettings);
-    List<Long> appliedWindowTimes = getAppliedWindowTime();
-    for (int i = 0; i < appliedWindowTimes.size(); i++) {
-      this.appliedWindowTimes.put(appliedWindowTimes.get(i), i);
+
+    List<Long> sortedPollingSettings = 
Lists.newArrayList(parsePollingSettings);
+    System.getProperties().setProperty("servo.pollers", Strings.join(",", 
sortedPollingSettings.iterator()));
 
 Review comment:
   It's not good way to set the system properties here (as it could be 
overridden anytime), can we setup the servo poller directly? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to