use of org.apache.apex.malhar.lib.util.DimensionTimeBucketSumOperator in project apex-malhar by apache.
the class Application method getSyslogDimensionTimeBucketSumOperator.
public DimensionTimeBucketSumOperator getSyslogDimensionTimeBucketSumOperator(String name, DAG dag) {
DimensionTimeBucketSumOperator oper = dag.addOperator(name, DimensionTimeBucketSumOperator.class);
oper.addDimensionKeyName(SYSLOG_KEYS.program.value);
oper.addDimensionKeyName(SYSLOG_KEYS.pid.value);
oper.addValueKeyName(SYSLOG_KEYS.version.value);
Set<String> dimensionKey = new HashSet<String>();
dimensionKey.add(SYSLOG_KEYS.program.value);
try {
oper.addCombination(dimensionKey);
} catch (NoSuchFieldException e) {
throw new RuntimeException("Exception while while adding operator " + name, e);
}
oper.setTimeBucketFlags(AbstractDimensionTimeBucketOperator.TIMEBUCKET_MINUTE);
return oper;
}
Aggregations