Search in sources :

Example 6 with DimensionTimeBucketSumOperator

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;
}
Also used : DimensionTimeBucketSumOperator(org.apache.apex.malhar.lib.util.DimensionTimeBucketSumOperator) HashSet(java.util.HashSet)

Aggregations

DimensionTimeBucketSumOperator (org.apache.apex.malhar.lib.util.DimensionTimeBucketSumOperator)6 HashSet (java.util.HashSet)5 SelectOperator (org.apache.apex.malhar.contrib.misc.streamquery.SelectOperator)1 ConsoleOutputOperator (org.apache.apex.malhar.lib.io.ConsoleOutputOperator)1 DimensionObject (org.apache.apex.malhar.lib.logs.DimensionObject)1 MultiWindowDimensionAggregation (org.apache.apex.malhar.lib.logs.MultiWindowDimensionAggregation)1 Counter (org.apache.apex.malhar.lib.stream.Counter)1 JsonByteArrayOperator (org.apache.apex.malhar.lib.stream.JsonByteArrayOperator)1