This is an automated email from the ASF dual-hosted git repository.
xhsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 0a890fe [TE] Remove MIGRATED_ALGORITHM type (#5172)
0a890fe is described below
commit 0a890fe50db38975fcb6f36a3ca475f7cca11fbd
Author: Xiaohui Sun <[email protected]>
AuthorDate: Wed Apr 8 19:24:55 2020 -0700
[TE] Remove MIGRATED_ALGORITHM type (#5172)
---
.../thirdeye/detection/annotation/registry/DetectionRegistry.java | 7 -------
.../apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java | 4 +---
.../detection/yaml/translator/DetectionConfigTranslator.java | 4 ++--
.../apache/pinot/thirdeye/formatter/DetectionConfigFormatter.java | 3 ---
4 files changed, 3 insertions(+), 15 deletions(-)
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
index 3913969..d7f8070 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
@@ -91,13 +91,6 @@ public class DetectionRegistry {
}
}
}
- // todo: get rid of MIGRATED_ALGORITHM and MIGRATED_ALGORITHM_FILTER
after the migration is completed
- if (REGISTRY_MAP.containsKey("ALGORITHM")) {
- REGISTRY_MAP.put("MIGRATED_ALGORITHM", REGISTRY_MAP.get("ALGORITHM"));
- }
- if (REGISTRY_MAP.containsKey("ALGORITHM_FILTER")) {
- REGISTRY_MAP.put("MIGRATED_ALGORITHM_FILTER",
REGISTRY_MAP.get("ALGORITHM_FILTER"));
- }
} catch (Exception e) {
LOG.warn("initialize detection registry error", e);
}
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
index b3a91d5..171c36c 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
@@ -60,8 +60,6 @@ public class DetectionConfigTuner {
private static final DetectionRegistry DETECTION_REGISTRY =
DetectionRegistry.getInstance();
public static final String PROP_YAML_PARAMS = "yamlParams";
- public static final Set<String> TURNOFF_TUNING_COMPONENTS =
- ImmutableSet.of("MIGRATED_ALGORITHM_FILTER", "MIGRATED_ALGORITHM",
"MIGRATED_ALGORITHM_BASELINE");
private final DetectionConfigDTO detectionConfig;
private final DataProvider dataProvider;
@@ -139,7 +137,7 @@ public class DetectionConfigTuner {
// For tunable components, the model params are computed from user
supplied yaml params and previous model params.
String componentClassName =
existingComponentProps.get(PROP_CLASS_NAME).toString();
String type = DetectionUtils.getComponentType(componentKey);
- if (!TURNOFF_TUNING_COMPONENTS.contains(type) &&
DETECTION_REGISTRY.isTunable(componentClassName)) {
+ if (DETECTION_REGISTRY.isTunable(componentClassName)) {
try {
tunedComponentProps.putAll(getTunedSpecs(existingComponentProps,
tuningWindowStart, tuningWindowEnd));
} catch (Exception e) {
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
index 4481c41..1610818 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
@@ -169,7 +169,7 @@ public class DetectionConfigTranslator extends
ConfigTranslator<DetectionConfigD
private static final DetectionRegistry DETECTION_REGISTRY =
DetectionRegistry.getInstance();
- private static final Set<String> MOVING_WINDOW_DETECTOR_TYPES =
ImmutableSet.of("ALGORITHM", "MIGRATED_ALGORITHM");
+ private static final Set<String> MOVING_WINDOW_DETECTOR_TYPES =
ImmutableSet.of("ALGORITHM");
private final Map<String, Object> components = new HashMap<>();
private DataProvider dataProvider;
@@ -503,7 +503,7 @@ public class DetectionConfigTranslator extends
ConfigTranslator<DetectionConfigD
// For tunable components, the model params are computed from user
supplied yaml params and previous model params.
// We store the yaml params under a separate key, PROP_YAML_PARAMS, to
distinguish from model params.
- if (!TURNOFF_TUNING_COMPONENTS.contains(type) &&
DETECTION_REGISTRY.isTunable(componentClassName)) {
+ if (DETECTION_REGISTRY.isTunable(componentClassName)) {
componentSpecs.put(PROP_YAML_PARAMS, params);
} else {
componentSpecs.putAll(params);
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/formatter/DetectionConfigFormatter.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/formatter/DetectionConfigFormatter.java
index 72fddea..b64075e 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/formatter/DetectionConfigFormatter.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/formatter/DetectionConfigFormatter.java
@@ -93,7 +93,6 @@ public class DetectionConfigFormatter implements
DTOFormatter<DetectionConfigDTO
private static final TimeGranularity DEFAULT_SHOW_GRANULARITY = new
TimeGranularity(1, TimeUnit.DAYS);
private static final String ALGORITHM_TYPE = "ALGORITHM";
- private static final String MIGRATED_ALGORITHM_TYPE = "MIGRATED_ALGORITHM";
private static final String CONFIGURATION = "configuration";
private final MetricConfigManager metricDAO;
@@ -250,8 +249,6 @@ public class DetectionConfigFormatter implements
DTOFormatter<DetectionConfigDTO
Map<String, Object> specs = (Map<String, Object>) entry.getValue();
if (entry.getKey().equals(ALGORITHM_TYPE)) {
extractTimeGranularitiesFromAlgorithmSpecs(specs,
PROP_BUCKET_PERIOD).ifPresent(monitoringGranularities::add);
- } else if (entry.getKey().equals(MIGRATED_ALGORITHM_TYPE)) {
- extractTimeGranularitiesFromAlgorithmSpecs(specs,
PROP_VARIABLES_BUCKET_PERIOD).ifPresent(monitoringGranularities::add);
} else if (specs.containsKey(PROP_MONITORING_GRANULARITY)) {
monitoringGranularities.add(TimeGranularity.fromString(MapUtils.getString(specs,
(PROP_MONITORING_GRANULARITY))));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]