private IPipelineStorage getPipelineStorageApi() { return StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI(); }
private IRdfEndpointStorage getRdfEndpointStorage() { return getNoSqlStorage().getRdfEndpointStorage(); } }
private IUserStorage userStorage() { return getStorageManager().getUserStorageAPI(); }
protected IVisualizationStorage getVisualizationStorage() { return getNoSqlStorage().getVisualizationStorageApi(); }
public PipelineVerificationHandler storeConnection() { String fromId = rdfRootElement.getConnectedTo().get(rdfRootElement.getConnectedTo().size() - 1); NamedStreamPipesEntity sepaElement = TreeUtils.findSEPAElement(fromId, pipeline.getSepas(), pipeline.getStreams()); String sourceId; if (sepaElement instanceof SpDataStream) { sourceId = sepaElement.getElementId(); } else { sourceId = ((InvocableStreamPipesEntity) sepaElement).getBelongsTo(); } Connection connection = new Connection(sourceId, rdfRootElement.getBelongsTo()); StorageDispatcher.INSTANCE.getNoSqlStore().getConnectionStorageApi().addConnection(connection); return this; }
@Override public void run() { List<TaskReport> reports = job.performJobExecution(); reports.forEach(r -> System.out.println(r.toString())); JobReport jobReport = new JobReport(job.getElementId(), new Date(), reports); StorageDispatcher.INSTANCE.getNoSqlStore().getMonitoringDataStorageApi().storeJobReport(jobReport); System.out.println(new Gson().toJson(jobReport)); }
protected INotificationStorage getNotificationStorage() { return getNoSqlStorage().getNotificationStorageApi(); }
private IPipelineCategoryStorage getPipelineCategoryStorage() { return getNoSqlStorage().getPipelineCategoryStorageApi(); } }
public PipelineOperationStatus stopPipeline() { List<InvocableStreamPipesEntity> graphs = TemporaryGraphStorage.graphStorage.get(pipeline.getPipelineId()); List<SpDataSet> dataSets = TemporaryGraphStorage.datasetStorage.get(pipeline.getPipelineId()); PipelineOperationStatus status = new GraphSubmitter(pipeline.getPipelineId(), pipeline.getName(), graphs, dataSets) .detachGraphs(); if (status.isSuccess()) { if (visualize) StorageDispatcher.INSTANCE.getNoSqlStore().getVisualizationStorageApi().deleteVisualization(pipeline .getPipelineId()); if (storeStatus) setPipelineStopped(pipeline); PipelineStatusManager.addPipelineStatus(pipeline.getPipelineId(), new PipelineStatusMessage(pipeline.getPipelineId(), System.currentTimeMillis(), PipelineStatusMessageType.PIPELINE_STOPPED.title(), PipelineStatusMessageType.PIPELINE_STOPPED.description())); if (monitor) SepMonitoringManager.removeObserver(pipeline.getPipelineId()); } return status; }
public PipelineVerificationHandler storeConnection() { String fromId = rdfRootElement.getConnectedTo().get(rdfRootElement.getConnectedTo().size() - 1); NamedStreamPipesEntity sepaElement = TreeUtils.findSEPAElement(fromId, pipeline.getSepas(), pipeline.getStreams()); String sourceId; if (sepaElement instanceof SpDataStream) { sourceId = sepaElement.getElementId(); } else { sourceId = ((InvocableStreamPipesEntity) sepaElement).getBelongsTo(); } Connection connection = new Connection(sourceId, rdfRootElement.getBelongsTo()); StorageDispatcher.INSTANCE.getNoSqlStore().getConnectionStorageApi().addConnection(connection); return this; }
@Override public void run() { List<TaskReport> reports = job.performJobExecution(); reports.forEach(r -> System.out.println(r.toString())); JobReport jobReport = new JobReport(job.getElementId(), new Date(), reports); StorageDispatcher.INSTANCE.getNoSqlStore().getMonitoringDataStorageApi().storeJobReport(jobReport); System.out.println(new Gson().toJson(jobReport)); }
protected void storeNotification(Notification message) { StorageDispatcher.INSTANCE.getNoSqlStore() .getNotificationStorageApi() .addNotification(message); }
private IPipelineStorage getPipelineStorage() { return StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI(); }
private IUserStorage userStorage() { return getStorageManager().getUserStorageAPI(); }
public List<RdfEndpoint> getEndpoints() { List<String> endpoints = ConsulUtil.getActivePEServicesEndPoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> servicerdRdfEndpoints = new LinkedList<>(); for (String endpoint : endpoints) { org.streampipes.model.client.endpoint.RdfEndpoint rdfEndpoint = new org.streampipes.model.client.endpoint.RdfEndpoint(endpoint); servicerdRdfEndpoints.add(rdfEndpoint); } List<org.streampipes.model.client.endpoint.RdfEndpoint> databasedRdfEndpoints = StorageDispatcher.INSTANCE.getNoSqlStore() .getRdfEndpointStorage() .getRdfEndpoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> concatList = Stream.of(databasedRdfEndpoints, servicerdRdfEndpoints) .flatMap(Collection::stream) .collect(Collectors.toList()); return concatList; } }
public PipelineOperationStatus stopPipeline() { List<InvocableStreamPipesEntity> graphs = TemporaryGraphStorage.graphStorage.get(pipeline.getPipelineId()); List<SpDataSet> dataSets = TemporaryGraphStorage.datasetStorage.get(pipeline.getPipelineId()); PipelineOperationStatus status = new GraphSubmitter(pipeline.getPipelineId(), pipeline.getName(), graphs, dataSets) .detachGraphs(); if (status.isSuccess()) { if (visualize) StorageDispatcher.INSTANCE.getNoSqlStore().getVisualizationStorageApi().deleteVisualization(pipeline .getPipelineId()); if (storeStatus) setPipelineStopped(pipeline); PipelineStatusManager.addPipelineStatus(pipeline.getPipelineId(), new PipelineStatusMessage(pipeline.getPipelineId(), System.currentTimeMillis(), PipelineStatusMessageType.PIPELINE_STOPPED.title(), PipelineStatusMessageType.PIPELINE_STOPPED.description())); if (monitor) SepMonitoringManager.removeObserver(pipeline.getPipelineId()); } return status; }
public PipelineElementRecommendationMessage findRecommendedElements() throws NoSuitableSepasAvailableException { String rootNodeElementId; try { rootNodeElementId = getRootNodeElementId(getRootNode()); Optional<SpDataStream> outputStream = getOutputStream(); outputStream.ifPresent(spDataStream -> validate(spDataStream, getAll())); } catch (Exception e) { e.printStackTrace(); return recommendationMessage; } if (recommendationMessage.getPossibleElements().size() == 0) { throw new NoSuitableSepasAvailableException(); } else { recommendationMessage .setRecommendedElements(calculateWeights( filterOldElements(getNoSqlStorage() .getConnectionStorageApi() .getRecommendedElements(rootNodeElementId)))); return recommendationMessage; } }
private IPipelineStorage getPipelineStorageApi() { return StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI(); }
protected IUserStorage getUserStorage() { return getNoSqlStorage().getUserStorageAPI(); }
public List<RdfEndpoint> getEndpoints() { List<String> endpoints = ConsulUtil.getActivePEServicesEndPoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> servicerdRdfEndpoints = new LinkedList<>(); for (String endpoint : endpoints) { org.streampipes.model.client.endpoint.RdfEndpoint rdfEndpoint = new org.streampipes.model.client.endpoint.RdfEndpoint(endpoint); servicerdRdfEndpoints.add(rdfEndpoint); } List<org.streampipes.model.client.endpoint.RdfEndpoint> databasedRdfEndpoints = StorageDispatcher.INSTANCE.getNoSqlStore() .getRdfEndpointStorage() .getRdfEndpoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> concatList = Stream.of(databasedRdfEndpoints, servicerdRdfEndpoints) .flatMap(Collection::stream) .collect(Collectors.toList()); return concatList; } }