use of org.apache.druid.java.util.emitter.core.ParametrizedUriEmitter in project druid by druid-io.
the class EmitterModuleTest method testParametrizedUriEmitterConfig.
@Test
public void testParametrizedUriEmitterConfig() {
final Properties props = new Properties();
props.setProperty("druid.emitter", "parametrized");
props.setProperty("druid.emitter.parametrized.recipientBaseUrlPattern", "http://example.com:8888/{feed}");
props.setProperty("druid.emitter.parametrized.httpEmitting.flushMillis", "1");
props.setProperty("druid.emitter.parametrized.httpEmitting.flushCount", "2");
props.setProperty("druid.emitter.parametrized.httpEmitting.basicAuthentication", "a:b");
props.setProperty("druid.emitter.parametrized.httpEmitting.batchingStrategy", "NEWLINES");
props.setProperty("druid.emitter.parametrized.httpEmitting.maxBatchSize", "4");
props.setProperty("druid.emitter.parametrized.httpEmitting.flushTimeOut", "1000");
final Emitter emitter = makeInjectorWithProperties(props).getInstance(Emitter.class);
// Testing that ParametrizedUriEmitter is successfully deserialized from the above config
Assert.assertThat(emitter, CoreMatchers.instanceOf(ParametrizedUriEmitter.class));
}
use of org.apache.druid.java.util.emitter.core.ParametrizedUriEmitter in project druid by druid-io.
the class ParametrizedUriEmitterFactory method makeEmitter.
@Override
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle) {
final Emitter retVal = new ParametrizedUriEmitter(this, httpClient, objectMapper);
lifecycle.addManagedInstance(retVal);
return retVal;
}
Aggregations