@Override public RestStatus status() { return isFound() ? RestStatus.OK : RestStatus.NOT_FOUND; }
/** * Check if a pipeline exists * @param pipelineName pipeline name * @return true if the pipeline exists, false otherwise * @throws IOException In case of error */ public boolean isExistingPipeline(String pipelineName) throws IOException { logger.debug("is existing pipeline [{}]", pipelineName); try { return client.ingest().getPipeline(new GetPipelineRequest(pipelineName), RequestOptions.DEFAULT).isFound(); } catch (ElasticsearchStatusException e) { if (e.status().getStatus() == 404) { return false; } throw new IOException(e); } }
/** * Check if a pipeline exists * @param pipelineName pipeline name * @return true if the pipeline exists, false otherwise * @throws IOException In case of error */ public boolean isExistingPipeline(String pipelineName) throws IOException { logger.debug("is existing pipeline [{}]", pipelineName); try { return client.ingest().getPipeline(new GetPipelineRequest(pipelineName), RequestOptions.DEFAULT).isFound(); } catch (ElasticsearchStatusException e) { if (e.status().getStatus() == 404) { return false; } throw new IOException(e); } }
@Override public RestStatus status() { return isFound() ? RestStatus.OK : RestStatus.NOT_FOUND; }
@Override public RestStatus status() { return isFound() ? RestStatus.OK : RestStatus.NOT_FOUND; }
@Override public RestStatus status() { return isFound() ? RestStatus.OK : RestStatus.NOT_FOUND; }