You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2023/01/20 15:34:55 UTC

[streampipes] 05/05: [hotfix] Add some comments and a log message

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 38074381cc270ed8a8cadc936d88c164ffa4b2f2
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Thu Jan 19 08:48:52 2023 +0100

    [hotfix] Add some comments and a log message
---
 .../streampipes/model/api/EndpointSelectable.java  | 33 ++++++++++++++++++++++
 .../execution/task/StorePipelineStatusTask.java    |  6 +++-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/api/EndpointSelectable.java b/streampipes-model/src/main/java/org/apache/streampipes/model/api/EndpointSelectable.java
index f2a0fcedc..b8bc01b2a 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/api/EndpointSelectable.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/api/EndpointSelectable.java
@@ -23,14 +23,47 @@ package org.apache.streampipes.model.api;
  */
 public interface EndpointSelectable {
 
+  /**
+   * Gets the name of this selectable endpoint.
+   *
+   * @return The name of this object.
+   */
   String getName();
 
+  /**
+   * Gets the URL of the currently selected endpoint.
+   *
+   * @return endpoint URL.
+   */
   String getSelectedEndpointUrl();
+
+  /**
+   * Sets the URL of the currently selected endpoint.
+   *
+   * @param selectedEndpointUrl new URL.
+   */
   void setSelectedEndpointUrl(String selectedEndpointUrl);
 
+  /**
+   * Gets the corresponding pipeline ID for the endpoint.
+   *
+   * @return corresponding pipeline ID.
+   */
   String getCorrespondingPipeline();
 
+
+  /**
+   * Sets the ID of the corresponding pipeline.
+   *
+   * @param pipelineId The ID of the pipeline to set as corresponding to the currently selected endpoint.
+   */
   void setCorrespondingPipeline(String pipelineId);
 
+  /**
+   * Gets the path detach that can be called to detatch the endpoint.
+   * When an endpoint is detached it usally is also sopped
+   *
+   * @return detach path.
+   */
   String getDetachPath();
 }
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
index f01f99005..df3c09f95 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
@@ -25,11 +25,15 @@ import org.apache.streampipes.storage.api.IPipelineStorage;
 import org.apache.streampipes.storage.management.StorageDispatcher;
 
 import org.lightcouch.DocumentConflictException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Date;
 
 public class StorePipelineStatusTask implements PipelineExecutionTask {
 
+  private static final Logger LOG = LoggerFactory.getLogger(StorePipelineStatusTask.class);
+
   private final boolean start;
   private final boolean forceStop;
 
@@ -61,7 +65,7 @@ public class StorePipelineStatusTask implements PipelineExecutionTask {
     try {
       getPipelineStorageApi().updatePipeline(pipeline);
     } catch (DocumentConflictException dce) {
-      //dce.printStackTrace();
+      LOG.error("Could not update pipeline {}", pipeline.getPipelineId(), dce);
     }
   }