Search in sources :

Example 1 with SplitSpec

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

the class ThirdEyeConfig method getSplitFromProperties.

private static SplitSpec getSplitFromProperties(Properties props) {
    SplitSpec split = null;
    String splitThreshold = getAndCheck(props, ThirdEyeConfigProperties.THIRDEYE_SPLIT_THRESHOLD.toString(), null);
    if (splitThreshold != null) {
        String splitOrder = getAndCheck(props, ThirdEyeConfigProperties.THIRDEYE_SPLIT_ORDER.toString(), null);
        List<String> splitOrderList = null;
        if (splitOrder != null) {
            splitOrderList = Arrays.asList(splitOrder.split(FIELD_SEPARATOR));
        }
        split = new SplitSpec(Integer.parseInt(splitThreshold), splitOrderList);
    }
    return split;
}
Also used : SplitSpec(com.linkedin.thirdeye.hadoop.config.SplitSpec)

Example 2 with SplitSpec

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

the class ThirdEyeConfig method fromProperties.

/**
   * Creates a ThirdEyeConfig object from the Properties object
   * @param props
   * @return
   */
public static ThirdEyeConfig fromProperties(Properties props) {
    String collection = getCollectionFromProperties(props);
    List<DimensionSpec> dimensions = getDimensionFromProperties(props);
    List<MetricSpec> metrics = getMetricsFromProperties(props);
    TimeSpec inputTime = getInputTimeFromProperties(props);
    TimeSpec time = getTimeFromProperties(props);
    SplitSpec split = getSplitFromProperties(props);
    TopkWhitelistSpec topKWhitelist = getTopKWhitelistFromProperties(props);
    ThirdEyeConfig thirdeyeConfig = new ThirdEyeConfig(collection, dimensions, metrics, inputTime, time, topKWhitelist, split);
    return thirdeyeConfig;
}
Also used : DimensionSpec(com.linkedin.thirdeye.hadoop.config.DimensionSpec) TopkWhitelistSpec(com.linkedin.thirdeye.hadoop.config.TopkWhitelistSpec) MetricSpec(com.linkedin.thirdeye.hadoop.config.MetricSpec) SplitSpec(com.linkedin.thirdeye.hadoop.config.SplitSpec) TimeSpec(com.linkedin.thirdeye.hadoop.config.TimeSpec)

Aggregations

SplitSpec (com.linkedin.thirdeye.hadoop.config.SplitSpec)2 DimensionSpec (com.linkedin.thirdeye.hadoop.config.DimensionSpec)1 MetricSpec (com.linkedin.thirdeye.hadoop.config.MetricSpec)1 TimeSpec (com.linkedin.thirdeye.hadoop.config.TimeSpec)1 TopkWhitelistSpec (com.linkedin.thirdeye.hadoop.config.TopkWhitelistSpec)1