Search in sources :

Example 6 with TopkWhitelistSpec

use of com.linkedin.thirdeye.hadoop.config.TopkWhitelistSpec in project pinot by linkedin.

the class ThirdEyeConfig method getTopKWhitelistFromProperties.

private static TopkWhitelistSpec getTopKWhitelistFromProperties(Properties props) {
    TopkWhitelistSpec topKWhitelist = null;
    Map<String, Double> threshold = getThresholdFromProperties(props);
    List<TopKDimensionToMetricsSpec> topKDimensionToMetricsSpec = getTopKDimensionToMetricsSpecFromProperties(props);
    Map<String, String> whitelist = getWhitelistFromProperties(props);
    if (threshold != null || topKDimensionToMetricsSpec != null || whitelist != null) {
        topKWhitelist = new TopkWhitelistSpec();
        topKWhitelist.setThreshold(threshold);
        topKWhitelist.setTopKDimensionToMetricsSpec(topKDimensionToMetricsSpec);
        topKWhitelist.setWhitelist(whitelist);
    }
    return topKWhitelist;
}
Also used : TopkWhitelistSpec(com.linkedin.thirdeye.hadoop.config.TopkWhitelistSpec) TopKDimensionToMetricsSpec(com.linkedin.thirdeye.hadoop.config.TopKDimensionToMetricsSpec)

Aggregations

TopkWhitelistSpec (com.linkedin.thirdeye.hadoop.config.TopkWhitelistSpec)6 MetricSpec (com.linkedin.thirdeye.hadoop.config.MetricSpec)4 TopKDimensionToMetricsSpec (com.linkedin.thirdeye.hadoop.config.TopKDimensionToMetricsSpec)4 DimensionSpec (com.linkedin.thirdeye.hadoop.config.DimensionSpec)3 MetricType (com.linkedin.thirdeye.hadoop.config.MetricType)3 HashSet (java.util.HashSet)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Set (java.util.Set)2 SplitSpec (com.linkedin.thirdeye.hadoop.config.SplitSpec)1 TimeSpec (com.linkedin.thirdeye.hadoop.config.TimeSpec)1 Schema (org.apache.avro.Schema)1 Test (org.testng.annotations.Test)1