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