try {
@SuppressWarnings("unchecked")
Class<? extends Configurable> clazz = (Class<? extends Configurable>) Class
.forName(serializerClazz);
Configurable serializer = clazz.newInstance();
if (serializer instanceof ElasticSearchIndexRequestBuilderFactory) {
indexRequestFactory = (ElasticSearchIndexRequestBuilderFactory) serializer;
} else if (serializer instanceof ElasticSearchEventSerializer){
indexRequestFactory = new EventSerializerIndexRequestBuilderFactory(
(ElasticSearchEventSerializer) serializer);