@Override public void start() throws LifecycleException { super.start(); try { createMappingIfNeeded(jestClient, indexName, ELASTIC_TYPE_NAME); } catch (Exception e) { throw new LifecycleException("Failed to create elastic mapping.", e); } }
@Override public void stop() throws LifecycleException { super.stop(); jestClient.shutdownClient(); }