akshayrai commented on a change in pull request #4250: SoC - Separate out 
Tuning from Translator
URL: https://github.com/apache/incubator-pinot/pull/4250#discussion_r288670294
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionPipeline.java
 ##########
 @@ -90,22 +90,21 @@ private void initComponents() throws Exception {
     Map<String, BaseComponent> instancesMap = config.getComponents();
     Map<String, Object> componentSpecs = config.getComponentSpecs();
     if (componentSpecs != null) {
-      for (String componentName : componentSpecs.keySet()) {
-        Map<String, Object> componentSpec = MapUtils.getMap(componentSpecs, 
componentName);
-        if (!instancesMap.containsKey(componentName)){
-          instancesMap.put(componentName, createComponent(componentSpec));
+      for (String componentKey : componentSpecs.keySet()) {
+        Map<String, Object> componentSpec = MapUtils.getMap(componentSpecs, 
componentKey);
+        if (!instancesMap.containsKey(componentKey)){
+          instancesMap.put(componentKey, createComponent(componentSpec));
         }
       }
 
-      for (String componentName : componentSpecs.keySet()) {
-        Map<String, Object> componentSpec = MapUtils.getMap(componentSpecs, 
componentName);
+      for (String componentKey : componentSpecs.keySet()) {
 
 Review comment:
   Not really! In the second loop, we replace all component references with the 
components. This comes by looking up the componentKey to Component mapping 
which is generated in the first loop.

----------------------------------------------------------------
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