HBaseEmitter implements ProfileMeasurementEmitter, Serializable { @Override public void emit(ProfileMeasurement measurement, OutputCollector collector) { collector.emit(getStreamId(), new Values(measurement)); LOG.debug("Emitted measurement; stream={}, profile={}, entity={}, period={}, start={}, end={}", getStreamId(), measurement.getProfileName(), measurement.getEntity(), measurement.getPeriod().getPeriod(), measurement.getPeriod().getStartTimeMillis(), measurement.getPeriod().getEndTimeMillis()); }  @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override void emit(ProfileMeasurement measurement, OutputCollector collector); @Override String getStreamId(); void setStreamId(String streamId);  }
@Test public void testEmit() { ProfileMeasurement measurement = new ProfileMeasurement() .withProfileName("profile") .withEntity("entity") .withPeriod(20000, 15, TimeUnit.MINUTES) .withDefinition(profile) .withProfileValue(22); emitter.emit(measurement, collector); ProfileMeasurement actual = expectMeasurement(emitter, collector); assertEquals(measurement, actual); }