protected static Client getClient(ElasticsearchConfig config) {
    String name = config.getClientFactoryClassName();
    try {
      Constructor c = Class.forName(name).getConstructor(ElasticsearchConfig.class);

      return ((ClientFactory) c.newInstance(config)).getClient();
    } catch (InvocationTargetException | NoSuchMethodException | InstantiationException
        | IllegalAccessException | ClassNotFoundException e) {
      throw new RuntimeException(String.format("Could not instantiate class %s", name));
    }
  }
A {@link SystemFactory} for Elasticsearch.

<p>This only supports the {@link SystemProducer} so all other methods return an
{@link UnsupportedOperationException}
samza-elasticsearch/src/main/java/org/apache/samza/system/elasticsearch/ElasticsearchSystemFactory.java