Search in sources :

Example 1 with ProfileResult

use of org.apache.metron.common.configuration.profiler.ProfileResult in project metron by apache.

the class ProfileHBaseMapperTest method setup.

@Before
public void setup() {
    rowKeyBuilder = mock(RowKeyBuilder.class);
    mapper = new ProfileHBaseMapper();
    mapper.setRowKeyBuilder(rowKeyBuilder);
    profile = new ProfileConfig("profile", "ip_src_addr", new ProfileResult("2 + 2"));
    measurement = new ProfileMeasurement().withProfileName("profile").withEntity("entity").withPeriod(20000, 15, TimeUnit.MINUTES).withProfileValue(22).withDefinition(profile);
    // the tuple will contain the original message
    tuple = mock(Tuple.class);
    when(tuple.getValueByField(eq("measurement"))).thenReturn(measurement);
}
Also used : ProfileResult(org.apache.metron.common.configuration.profiler.ProfileResult) RowKeyBuilder(org.apache.metron.profiler.hbase.RowKeyBuilder) ProfileMeasurement(org.apache.metron.profiler.ProfileMeasurement) Tuple(org.apache.storm.tuple.Tuple) ProfileConfig(org.apache.metron.common.configuration.profiler.ProfileConfig) Before(org.junit.Before)

Aggregations

ProfileConfig (org.apache.metron.common.configuration.profiler.ProfileConfig)1 ProfileResult (org.apache.metron.common.configuration.profiler.ProfileResult)1 ProfileMeasurement (org.apache.metron.profiler.ProfileMeasurement)1 RowKeyBuilder (org.apache.metron.profiler.hbase.RowKeyBuilder)1 Tuple (org.apache.storm.tuple.Tuple)1 Before (org.junit.Before)1