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;
}
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;
}
Aggregations