Search code examples
esper

How to disable Esper's avro.EventTypeAvroHandlerFactory warning


Have no clue why I am getting these warnings when I run Esper. All my searches about these warnings WRT Esper have turned up blank.

37   [main] WARN  com.espertech.esper.common.internal.event.avro.EventTypeAvroHandlerFactory  - Avro provider com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl not instantiated, not enabling Avro support: Unable to load class 'com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl', class not found
341  [main] WARN  com.espertech.esper.common.internal.event.avro.EventTypeAvroHandlerFactory  - Avro provider com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl not instantiated, not enabling Avro support: Unable to load class 'com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl', class not found
1207 [main] WARN  com.espertech.esper.common.internal.event.avro.EventTypeAvroHandlerFactory  - Avro provider com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl not instantiated, not enabling Avro support: Unable to load class 'com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl', class not found
1722 [main] WARN  com.espertech.esper.common.internal.event.avro.EventTypeAvroHandlerFactory  - Avro provider com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl not instantiated, not enabling Avro support: Unable to load class 'com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl', class not found
1987 [main] WARN  com.espertech.esper.common.internal.event.avro.EventTypeAvroHandlerFactory  - Avro provider com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl not instantiated, not enabling Avro support: Unable to load class 'com.espertech.esper.common.internal.avro.core.EventTypeAvroHandlerImpl', class not found

Pretty standard Esper setup ...

    Configuration configuration = configuration();
    EPRuntime runtime = EPRuntimeProvider.getDefaultRuntime(configuration);
    EPEventService eventService = EPRuntimeProvider.getDefaultRuntime(configuration).getEventService();

Not using Avro as part of the project.


Solution

  • Debugged where the warnings were coming from, and found that, by default, enable Avro is set to true.

    A quick peek at the documentation echoed what I found in the debugger:

    The enable-avro setting is boolean-typed and is true by default. It controls whether Avro is enabled or disabled. If disabled the compiler and runtime disallow registering Avro event types or using an Avro event representation.

    The following setting removes the warnings.

    configuration.getCommon().getEventMeta().getAvroSettings().setEnableAvro(false);