jihaozh commented on a change in pull request #4286: [TE] Translator code
refactor to accommodate entity config translation
URL: https://github.com/apache/incubator-pinot/pull/4286#discussion_r292580668
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/ConfigTranslator.java
##########
@@ -19,25 +19,30 @@
package org.apache.pinot.thirdeye.detection.yaml.translator;
+import java.util.HashMap;
import java.util.Map;
import org.apache.pinot.thirdeye.datalayer.dto.AbstractDTO;
+import org.apache.pinot.thirdeye.detection.ConfigUtils;
import org.apache.pinot.thirdeye.detection.DataProvider;
import org.apache.pinot.thirdeye.detection.validators.ConfigValidator;
+import org.yaml.snakeyaml.Yaml;
/**
* Translate a raw yaml config and map it to a config object
*/
public abstract class ConfigTranslator<T extends AbstractDTO, V extends
ConfigValidator> {
- Map<String, Object> yamlConfig;
-
protected ConfigValidator validator;
protected DataProvider dataProvider;
+ protected String yamlConfig;
+ protected Map<String, Object> yamlConfigMap;
+ protected Yaml yaml;
Review comment:
could you make these instance variables final when possible?
----------------------------------------------------------------
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]