static Parsed parseWithPipelineId(String pipelineId, Map<String, Object> config, boolean verbose, IngestService ingestService) { if (pipelineId == null) { throw new IllegalArgumentException("param [pipeline] is null"); } Pipeline pipeline = ingestService.getPipeline(pipelineId); if (pipeline == null) { throw new IllegalArgumentException("pipeline [" + pipelineId + "] does not exist"); } List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }
@Override protected void doRun() throws Exception { List<SimulateDocumentResult> responses = new ArrayList<>(); for (IngestDocument ingestDocument : request.getDocuments()) { SimulateDocumentResult response = executeDocument(request.getPipeline(), ingestDocument, request.isVerbose()); if (response != null) { responses.add(response); } } listener.onResponse(new SimulatePipelineResponse(request.getPipeline().getId(), request.isVerbose(), responses)); } });
static Parsed parseWithPipelineId(String pipelineId, Map<String, Object> config, boolean verbose, PipelineStore pipelineStore) { if (pipelineId == null) { throw new IllegalArgumentException("param [pipeline] is null"); } Pipeline pipeline = pipelineStore.get(pipelineId); if (pipeline == null) { throw new IllegalArgumentException("pipeline [" + pipelineId + "] does not exist"); } List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }
static Parsed parse(Map<String, Object> config, boolean verbose, IngestService ingestService) throws Exception { Map<String, Object> pipelineConfig = ConfigurationUtils.readMap(null, null, config, Fields.PIPELINE); Pipeline pipeline = Pipeline.create( SIMULATED_PIPELINE_ID, pipelineConfig, ingestService.getProcessorFactories(), ingestService.getScriptService() ); List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }
static Parsed parseWithPipelineId(String pipelineId, Map<String, Object> config, boolean verbose, PipelineStore pipelineStore) { if (pipelineId == null) { throw new IllegalArgumentException("param [pipeline] is null"); } Pipeline pipeline = pipelineStore.get(pipelineId); if (pipeline == null) { throw new IllegalArgumentException("pipeline [" + pipelineId + "] does not exist"); } List<IngestDocument> ingestDocumentList = parseDocs(config, pipelineStore.isNewIngestDateFormat()); return new Parsed(pipeline, ingestDocumentList, verbose); }
@Override protected void doRun() throws Exception { List<SimulateDocumentResult> responses = new ArrayList<>(); for (IngestDocument ingestDocument : request.getDocuments()) { responses.add(executeDocument(request.getPipeline(), ingestDocument, request.isVerbose())); } listener.onResponse(new SimulatePipelineResponse(request.getPipeline().getId(), request.isVerbose(), responses)); } });
@Override protected void doRun() throws Exception { List<SimulateDocumentResult> responses = new ArrayList<>(); for (IngestDocument ingestDocument : request.getDocuments()) { SimulateDocumentResult response = executeDocument(request.getPipeline(), ingestDocument, request.isVerbose()); if (response != null) { responses.add(response); } } listener.onResponse(new SimulatePipelineResponse(request.getPipeline().getId(), request.isVerbose(), responses)); } });
static Parsed parse(Map<String, Object> config, boolean verbose, PipelineStore pipelineStore) throws Exception { Map<String, Object> pipelineConfig = ConfigurationUtils.readMap(null, null, config, Fields.PIPELINE); Pipeline pipeline = PIPELINE_FACTORY.create(SIMULATED_PIPELINE_ID, pipelineConfig, pipelineStore.getProcessorFactories()); List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }
static Parsed parse(Map<String, Object> config, boolean verbose, PipelineStore pipelineStore) throws Exception { Map<String, Object> pipelineConfig = ConfigurationUtils.readMap(null, null, config, Fields.PIPELINE); Pipeline pipeline = PIPELINE_FACTORY.create(SIMULATED_PIPELINE_ID, pipelineConfig, pipelineStore.getProcessorFactories()); List<IngestDocument> ingestDocumentList = parseDocs(config, pipelineStore.isNewIngestDateFormat()); return new Parsed(pipeline, ingestDocumentList, verbose); }
static Parsed parseWithPipelineId(String pipelineId, Map<String, Object> config, boolean verbose, IngestService ingestService) { if (pipelineId == null) { throw new IllegalArgumentException("param [pipeline] is null"); } Pipeline pipeline = ingestService.getPipeline(pipelineId); if (pipeline == null) { throw new IllegalArgumentException("pipeline [" + pipelineId + "] does not exist"); } List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }
@Override protected void doRun() throws Exception { List<SimulateDocumentResult> responses = new ArrayList<>(); for (IngestDocument ingestDocument : request.getDocuments()) { responses.add(executeDocument(request.getPipeline(), ingestDocument, request.isVerbose())); } listener.onResponse(new SimulatePipelineResponse(request.getPipeline().getId(), request.isVerbose(), responses)); } });
static Parsed parse(Map<String, Object> config, boolean verbose, IngestService ingestService) throws Exception { Map<String, Object> pipelineConfig = ConfigurationUtils.readMap(null, null, config, Fields.PIPELINE); Pipeline pipeline = Pipeline.create( SIMULATED_PIPELINE_ID, pipelineConfig, ingestService.getProcessorFactories(), ingestService.getScriptService() ); List<IngestDocument> ingestDocumentList = parseDocs(config); return new Parsed(pipeline, ingestDocumentList, verbose); }