jihaozh commented on a change in pull request #4072: [TE] detection - handle 
day light savings time in moving windows
URL: https://github.com/apache/incubator-pinot/pull/4072#discussion_r272288427
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java
 ##########
 @@ -309,30 +309,30 @@ private void fillInDetectorWrapperProperties(Map<String, 
Object> properties, Map
           properties.put(PROP_WINDOW_SIZE, 6);
           properties.put(PROP_WINDOW_UNIT, TimeUnit.HOURS);
       }
-      // override from yaml
-      if (yamlConfig.containsKey(PROP_WINDOW_SIZE)) {
-        properties.put(PROP_MOVING_WINDOW_DETECTION, true);
-        properties.put(PROP_WINDOW_SIZE, MapUtils.getString(yamlConfig, 
PROP_WINDOW_SIZE));
-      }
-      if (yamlConfig.containsKey(PROP_WINDOW_UNIT)) {
-        properties.put(PROP_MOVING_WINDOW_DETECTION, true);
-        properties.put(PROP_WINDOW_UNIT, MapUtils.getString(yamlConfig, 
PROP_WINDOW_UNIT));
-      }
-      if (yamlConfig.containsKey(PROP_WINDOW_DELAY)) {
-        properties.put(PROP_WINDOW_DELAY, MapUtils.getString(yamlConfig, 
PROP_WINDOW_DELAY));
-      }
-      if (yamlConfig.containsKey(PROP_WINDOW_DELAY_UNIT)) {
-        properties.put(PROP_WINDOW_DELAY_UNIT, MapUtils.getString(yamlConfig, 
PROP_WINDOW_DELAY_UNIT));
-      }
-      if (yamlConfig.containsKey(PROP_TIMEZONE)){
-        properties.put(PROP_TIMEZONE, MapUtils.getString(yamlConfig, 
PROP_TIMEZONE));
-      }
-      if (yamlConfig.containsKey(PROP_BUCKET_PERIOD)){
-        properties.put(PROP_BUCKET_PERIOD, MapUtils.getString(yamlConfig, 
PROP_BUCKET_PERIOD));
-      }
-      if (yamlConfig.containsKey(PROP_CACHE_PERIOD_LOOKBACK)) {
-        properties.put(PROP_CACHE_PERIOD_LOOKBACK, 
MapUtils.getString(yamlConfig, PROP_CACHE_PERIOD_LOOKBACK));
-      }
+    }
+    // override from yaml
+    if (yamlConfig.containsKey(PROP_WINDOW_SIZE)) {
+      properties.put(PROP_MOVING_WINDOW_DETECTION, true);
+      properties.put(PROP_WINDOW_SIZE, MapUtils.getString(yamlConfig, 
PROP_WINDOW_SIZE));
+    }
+    if (yamlConfig.containsKey(PROP_WINDOW_UNIT)) {
+      properties.put(PROP_MOVING_WINDOW_DETECTION, true);
+      properties.put(PROP_WINDOW_UNIT, MapUtils.getString(yamlConfig, 
PROP_WINDOW_UNIT));
+    }
+    if (yamlConfig.containsKey(PROP_WINDOW_DELAY)) {
 
 Review comment:
   Agree. It's confusing now. The correct approach is to use Period. However, 
with the legacy notations already stored in config files, it's hard to 
eliminate them. We can come up with a way to use Period only in the future.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to