示例#1
0
 @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);
   }
 }
示例#2
0
 @Override
 public void stop() throws LifecycleException {
   super.stop();
   jestClient.shutdownClient();
 }