You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/10/07 20:53:56 UTC
[incubator-streampipes] branch STREAMPIPES-438 updated (5d85311 ->
da36142)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch STREAMPIPES-438
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from 5d85311 Remove DomainPropertyProbalilityList
new 843719d Remove old classes
new edccbb3 Remove auto stop of pipelines from adapter
new da36142 Replace ConnectWorkerContainer with lists of AdaperDescription
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../management/WorkerAdministrationManagement.java | 3 -
.../connect/container/master/util/Utils.java | 29 -------
.../connect/container/master/util/WorkerPaths.java | 17 ----
.../adapter/guess/PropertyGuessResults.java | 40 ---------
.../connect/adapter/guess/PropertyGuesses.java | 54 ------------
.../model/connect/adapter/AdapterDescription.java | 4 -
.../model/connect/grounding/FormatDescription.java | 46 -----------
.../connect/grounding/ProtocolDescription.java | 2 -
.../connect/worker/ConnectWorkerContainer.java | 96 ----------------------
.../storage/api/IAdapterTemplateStorage.java | 37 ---------
.../api/IConnectWorkerContainerStorage.java | 35 --------
.../couchdb/impl/AdapterTemplateStorageImpl.java | 71 ----------------
.../impl/ConnectionWorkerContainerStorageImpl.java | 71 ----------------
.../start-adapter-configuration.component.html | 5 --
.../start-adapter-configuration.component.ts | 3 -
.../adapter-started-dialog.component.ts | 3 -
16 files changed, 516 deletions(-)
delete mode 100644 streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/Utils.java
delete mode 100644 streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuessResults.java
delete mode 100644 streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuesses.java
delete mode 100644 streampipes-model/src/main/java/org/apache/streampipes/model/connect/worker/ConnectWorkerContainer.java
delete mode 100644 streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IAdapterTemplateStorage.java
delete mode 100644 streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IConnectWorkerContainerStorage.java
delete mode 100644 streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/AdapterTemplateStorageImpl.java
delete mode 100644 streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ConnectionWorkerContainerStorageImpl.java
[incubator-streampipes] 02/03: Remove auto stop of pipelines from
adapter
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-438
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit edccbb389c81df52ec2b5a70eef47b1d259830bf
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Oct 7 22:42:23 2021 +0200
Remove auto stop of pipelines from adapter
---
.../model/connect/adapter/AdapterDescription.java | 4 --
.../model/connect/grounding/FormatDescription.java | 46 ----------------------
.../connect/grounding/ProtocolDescription.java | 2 -
.../start-adapter-configuration.component.html | 5 ---
.../start-adapter-configuration.component.ts | 3 --
.../adapter-started-dialog.component.ts | 3 --
6 files changed, 63 deletions(-)
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
index 0a171da..635d470 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
@@ -92,9 +92,6 @@ public abstract class AdapterDescription extends NamedStreamPipesEntity {
public AdapterDescription(AdapterDescription other) {
super(other);
-// this.adapterId = other.getAdapterId();
- //this.id = other.getId();
- //this.rev = other.getRev();
this.config = new Cloner().staticProperties(other.getConfig());
this.userName = other.getUserName();
this.rules = other.getRules();
@@ -107,7 +104,6 @@ public abstract class AdapterDescription extends NamedStreamPipesEntity {
if (other.getEventGrounding() != null) this.eventGrounding = new EventGrounding(other.getEventGrounding());
}
- // TODO check if it can be deleted
public String getRev() {
return this.rev;
}
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/FormatDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/FormatDescription.java
index 810f969..cac5f91 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/FormatDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/FormatDescription.java
@@ -26,7 +26,6 @@ import org.apache.streampipes.model.util.Cloner;
import java.util.ArrayList;
import java.util.List;
-
public class FormatDescription extends NamedStreamPipesEntity {
private List<StaticProperty> config;
@@ -51,7 +50,6 @@ public class FormatDescription extends NamedStreamPipesEntity {
this.config = new Cloner().staticProperties(other.getConfig());
}
-
public void addConfig(StaticProperty sp) {
this.config.add(sp);
}
@@ -64,50 +62,6 @@ public class FormatDescription extends NamedStreamPipesEntity {
this.config = config;
}
-
-
-
-
-
-
-
-// public static void main(String... args) {
-// FormatDescription f = new FormatDescription("", "","");
-// FreeTextStaticProperty fts = new FreeTextStaticProperty("internal_name_value", "label_value",
-// "description value");
-// FreeTextStaticProperty fts1 = new FreeTextStaticProperty("internal_name_value1", "label_value1",
-// "description value1");
-// f.addConfig(fts);
-//// f.addConfig(fts1);
-//
-// ProtocolDescription p = new ProtocolDescription("", "","");
-// FreeTextStaticProperty fts2 = new FreeTextStaticProperty("internal_name_value2", "label_value2",
-// "description value2");
-//
-// p.addConfig(fts2);
-//
-// AdapterDescription a = new AdapterDescription();
-// a.setFormatDescription(f);
-// a.setProtocolDescription(p);
-//
-// JsonLdTransformer jsonLdTransformer = new JsonLdTransformer();
-// try {
-// System.out.println(Utils.asString(jsonLdTransformer.toJsonLd(a)));
-// } catch (IllegalAccessException e) {
-// e.printStackTrace();
-// } catch (InvocationTargetException e) {
-// e.printStackTrace();
-// } catch (ClassNotFoundException e) {
-// e.printStackTrace();
-// } catch (InvalidRdfException e) {
-// e.printStackTrace();
-// } catch (RDFHandlerException e) {
-// e.printStackTrace();
-// }
-//
-// }
-
-
@Override
public String toString() {
return "FormatDescription{" +
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java
index 5761dc3..4c8e71e 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java
@@ -29,8 +29,6 @@ import java.util.List;
@TsModel
public class ProtocolDescription extends NamedStreamPipesEntity {
-
- //Remove for new classes
@Deprecated
String sourceType;
diff --git a/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.html b/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.html
index e2fdae2..8992ec8 100644
--- a/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.html
+++ b/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.html
@@ -90,11 +90,6 @@
</mat-option>
</mat-select>
</mat-form-field>
-
- <mat-checkbox *ngIf="isSetAdapter" [(ngModel)]="adapterDescription.stopPipeline"
- [ngModelOptions]="{standalone: true}">Stop pipeline when replay is completed
- </mat-checkbox>
-
</div>
</div>
diff --git a/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.ts b/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.ts
index e8d1a7d..21ed441 100644
--- a/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.ts
+++ b/ui/src/app/connect/components/start-adapter-configuration/start-adapter-configuration.component.ts
@@ -85,8 +85,6 @@ export class StartAdapterConfigurationComponent implements OnInit {
saveInDataLake = false;
dataLakeTimestampField: string;
- isSetAdapter = false;
-
constructor(
private dialogService: DialogService,
@@ -104,7 +102,6 @@ export class StartAdapterConfigurationComponent implements OnInit {
if (this.adapterDescription instanceof GenericAdapterSetDescription ||
this.adapterDescription instanceof SpecificAdapterSetDescription) {
- this.isSetAdapter = true;
}
// Auto selection of timestamp field for datalake
diff --git a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
index 67e931b..9f2c614 100644
--- a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
+++ b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
@@ -89,8 +89,6 @@ export class AdapterStartedDialog implements OnInit {
if (this.saveInDataLake) {
const pipelineId = 'org.apache.streampipes.manager.template.instances.DataLakePipelineTemplate';
- console.log(x.notifications[0].title);
- console.log(this.adapter);
this.pipelineTemplateService.getPipelineTemplateInvocation(x.notifications[0].title, pipelineId)
.subscribe(res => {
@@ -124,7 +122,6 @@ export class AdapterStartedDialog implements OnInit {
}
}
});
-
}
onCloseConfirm() {
[incubator-streampipes] 03/03: Replace ConnectWorkerContainer with
lists of AdaperDescription
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-438
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit da36142103b99957beff713607324f9e7601cf0f
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Oct 7 22:53:18 2021 +0200
Replace ConnectWorkerContainer with lists of AdaperDescription
---
.../management/WorkerAdministrationManagement.java | 3 -
.../connect/worker/ConnectWorkerContainer.java | 96 ----------------------
.../storage/api/IAdapterTemplateStorage.java | 37 ---------
.../api/IConnectWorkerContainerStorage.java | 35 --------
.../couchdb/impl/AdapterTemplateStorageImpl.java | 71 ----------------
.../impl/ConnectionWorkerContainerStorageImpl.java | 71 ----------------
6 files changed, 313 deletions(-)
diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerAdministrationManagement.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerAdministrationManagement.java
index 42f954a..6258f12 100644
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerAdministrationManagement.java
+++ b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/management/WorkerAdministrationManagement.java
@@ -22,7 +22,6 @@ import org.apache.streampipes.connect.container.master.health.AdapterHealthCheck
import org.apache.streampipes.model.connect.adapter.AdapterDescription;
import org.apache.streampipes.storage.api.IAdapterStorage;
import org.apache.streampipes.storage.couchdb.CouchDbStorageManager;
-import org.apache.streampipes.storage.couchdb.impl.ConnectionWorkerContainerStorageImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,7 +31,6 @@ public class WorkerAdministrationManagement {
private static final Logger LOG = LoggerFactory.getLogger(AdapterMasterManagement.class);
- private ConnectionWorkerContainerStorageImpl connectionWorkerContainerStorage;
private AdapterMasterManagement adapterMasterManagement;
private IAdapterStorage adapterDescriptionStorage;
@@ -40,7 +38,6 @@ public class WorkerAdministrationManagement {
private AdapterHealthCheck adapterHealthCheck;
public WorkerAdministrationManagement() {
- this.connectionWorkerContainerStorage = new ConnectionWorkerContainerStorageImpl();
this.adapterMasterManagement = new AdapterMasterManagement();
this.adapterHealthCheck = new AdapterHealthCheck();
this.adapterDescriptionStorage = CouchDbStorageManager.INSTANCE.getAdapterDescriptionStorage();
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/worker/ConnectWorkerContainer.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/worker/ConnectWorkerContainer.java
deleted file mode 100644
index b449c5b..0000000
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/worker/ConnectWorkerContainer.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.model.connect.worker;
-
-import com.google.gson.annotations.SerializedName;
-import org.apache.streampipes.model.base.UnnamedStreamPipesEntity;
-import org.apache.streampipes.model.connect.adapter.AdapterDescription;
-import org.apache.streampipes.model.connect.grounding.ProtocolDescription;
-import org.apache.streampipes.model.util.ElementIdGenerator;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Deprecated
-public class ConnectWorkerContainer extends UnnamedStreamPipesEntity {
-
- private @SerializedName("_rev") String rev;
-
- private String serviceGroup;
-
- private List<ProtocolDescription> protocols;
-
- private List<AdapterDescription> adapters;
-
- public ConnectWorkerContainer() {
- super();
- this.adapters = new ArrayList<>();
- this.protocols = new ArrayList<>();
- }
-
- public ConnectWorkerContainer(String serviceGroup,
- List<ProtocolDescription> protocols,
- List<AdapterDescription> adapters) {
- super();
- this.elementId = ElementIdGenerator.makeElementIdFromAppId(serviceGroup);
- this.serviceGroup = serviceGroup;
- this.protocols = protocols;
- this.adapters = adapters;
- }
-
- public String getServiceGroup() {
- return serviceGroup;
- }
-
- public void setServiceGroup(String serviceGroup) {
- this.serviceGroup = serviceGroup;
- }
-
- public List<ProtocolDescription> getProtocols() {
- return protocols;
- }
-
- public void setProtocols(List<ProtocolDescription> protocols) {
- this.protocols = protocols;
- }
-
- public List<AdapterDescription> getAdapters() {
- return adapters;
- }
-
- public void setAdapters(List<AdapterDescription> adapters) {
- this.adapters = adapters;
- }
-
- public String getId() {
- return this.elementId;
- }
-
- public void setId(String id) {
- this.elementId = id;
- }
-
- public String getRev() {
- return rev;
- }
-
- public void setRev(String rev) {
- this.rev = rev;
- }
-}
diff --git a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IAdapterTemplateStorage.java b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IAdapterTemplateStorage.java
deleted file mode 100644
index b2f7352..0000000
--- a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IAdapterTemplateStorage.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.api;
-
-
-import org.apache.streampipes.model.connect.adapter.AdapterDescription;
-
-import java.util.List;
-
-@Deprecated
-public interface IAdapterTemplateStorage {
- List<AdapterDescription> getAllAdapterTemplates();
-
- void storeAdapterTemplate(AdapterDescription adapter);
-
- void updateAdapterTemplate(AdapterDescription adapter);
-
- AdapterDescription getAdapterTemplate(String adapterId);
-
- void deleteAdapterTemplate(String adapterId);
-}
diff --git a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IConnectWorkerContainerStorage.java b/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IConnectWorkerContainerStorage.java
deleted file mode 100644
index 48e4c9d..0000000
--- a/streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IConnectWorkerContainerStorage.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.api;
-
-import org.apache.streampipes.model.connect.worker.ConnectWorkerContainer;
-
-import java.util.List;
-
-public interface IConnectWorkerContainerStorage {
- List<ConnectWorkerContainer> getAllConnectWorkerContainers();
-
- void storeConnectWorkerContainer(ConnectWorkerContainer connectWorkerContainer);
-
- void updateConnectWorkerContainer(ConnectWorkerContainer connectWorkerContainer);
-
- ConnectWorkerContainer getConnectWorkerContainer(String connectWorkerContainerId);
-
- void deleteConnectWorkerContainer(String connectWorkerContainerId);
-}
diff --git a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/AdapterTemplateStorageImpl.java b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/AdapterTemplateStorageImpl.java
deleted file mode 100644
index b7fed7b..0000000
--- a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/AdapterTemplateStorageImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.couchdb.impl;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.streampipes.model.connect.adapter.AdapterDescription;
-import org.apache.streampipes.storage.api.IAdapterTemplateStorage;
-import org.apache.streampipes.storage.couchdb.dao.AbstractDao;
-import org.apache.streampipes.storage.couchdb.dao.DbCommand;
-import org.apache.streampipes.storage.couchdb.dao.FindCommand;
-import org.apache.streampipes.storage.couchdb.utils.Utils;
-
-import java.util.List;
-import java.util.Optional;
-
-@Deprecated
-public class AdapterTemplateStorageImpl extends AbstractDao<AdapterDescription> implements IAdapterTemplateStorage {
-
- Logger LOG = LoggerFactory.getLogger(AdapterInstanceStorageImpl.class);
-
- private static final String SYSTEM_USER = "system";
-
- public AdapterTemplateStorageImpl() {
- super(Utils::getCouchDbAdapterTemplateClient, AdapterDescription.class);
- }
-
- @Override
- public List<AdapterDescription> getAllAdapterTemplates() {
- return findAll();
- }
-
- @Override
- public void storeAdapterTemplate(AdapterDescription adapter) {
- persist(adapter);
- }
-
- @Override
- public void updateAdapterTemplate(AdapterDescription adapter) {
- couchDbClientSupplier.get().
- update(adapter);
- }
-
- @Override
- public AdapterDescription getAdapterTemplate(String adapterId) {
- DbCommand<Optional<AdapterDescription>, AdapterDescription> cmd = new FindCommand<>(couchDbClientSupplier, adapterId, AdapterDescription.class);
- return cmd.execute().get();
- }
-
- @Override
- public void deleteAdapterTemplate(String adapterId) {
- AdapterDescription adapterDescription = getAdapterTemplate(adapterId);
- couchDbClientSupplier.get().remove(adapterDescription.getElementId(), adapterDescription.getRev());
- }
-}
diff --git a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ConnectionWorkerContainerStorageImpl.java b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ConnectionWorkerContainerStorageImpl.java
deleted file mode 100644
index 97deb74..0000000
--- a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ConnectionWorkerContainerStorageImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.storage.couchdb.impl;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.streampipes.model.connect.worker.ConnectWorkerContainer;
-import org.apache.streampipes.storage.api.IConnectWorkerContainerStorage;
-import org.apache.streampipes.storage.couchdb.dao.AbstractDao;
-import org.apache.streampipes.storage.couchdb.dao.DbCommand;
-import org.apache.streampipes.storage.couchdb.dao.FindCommand;
-import org.apache.streampipes.storage.couchdb.utils.Utils;
-
-import java.util.List;
-import java.util.Optional;
-
-public class ConnectionWorkerContainerStorageImpl extends AbstractDao<ConnectWorkerContainer> implements IConnectWorkerContainerStorage {
-
- Logger LOG = LoggerFactory.getLogger(ConnectionWorkerContainerStorageImpl.class);
-
-
- public ConnectionWorkerContainerStorageImpl() {
- super(Utils::getCouchDbConnectWorkerContainerClient, ConnectWorkerContainer.class);
- }
-
- @Override
- public List<ConnectWorkerContainer> getAllConnectWorkerContainers() {
- return findAll();
- }
-
- @Override
- public void storeConnectWorkerContainer(ConnectWorkerContainer connectWorkerContainer) {
- persist(connectWorkerContainer);
-
- }
-
- @Override
- public void updateConnectWorkerContainer(ConnectWorkerContainer connectWorkerContainer) {
- couchDbClientSupplier.get().
- update(connectWorkerContainer);
- }
-
- @Override
- public ConnectWorkerContainer getConnectWorkerContainer(String connectWorkerContainerId) {
- DbCommand<Optional<ConnectWorkerContainer>, ConnectWorkerContainer> cmd = new FindCommand<>(couchDbClientSupplier, connectWorkerContainerId, ConnectWorkerContainer.class);
- return cmd.execute().get();
- }
-
- @Override
- public void deleteConnectWorkerContainer(String connectWorkerContainerId) {
- ConnectWorkerContainer connectWorkerContainer = getConnectWorkerContainer(connectWorkerContainerId);
- couchDbClientSupplier.get().remove(connectWorkerContainer.getId(), connectWorkerContainer.getRev());
- }
-}
-
[incubator-streampipes] 01/03: Remove old classes
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-438
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 843719d50494caffa8e9e91094adda80ed08725a
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Oct 7 22:29:00 2021 +0200
Remove old classes
---
.../connect/container/master/util/Utils.java | 29 ------------
.../connect/container/master/util/WorkerPaths.java | 17 -------
.../adapter/guess/PropertyGuessResults.java | 40 ----------------
.../connect/adapter/guess/PropertyGuesses.java | 54 ----------------------
4 files changed, 140 deletions(-)
diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/Utils.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/Utils.java
deleted file mode 100644
index 3ba2b94..0000000
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/Utils.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.container.master.util;
-
-public class Utils {
-
- public static String addUserNameToApi(String url, String userName) {
- return url;
- //return url + "/api/v1/" + userName + "/";
- }
-
-
-}
diff --git a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/WorkerPaths.java b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/WorkerPaths.java
index 2b5a624..ffe463c 100644
--- a/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/WorkerPaths.java
+++ b/streampipes-connect-container-master/src/main/java/org/apache/streampipes/connect/container/master/util/WorkerPaths.java
@@ -20,7 +20,6 @@ package org.apache.streampipes.connect.container.master.util;
public class WorkerPaths {
private static final String WorkerMainPath = "/api/v1/worker";
- private static final String Slash = "/";
public static String getStreamInvokePath() {
return WorkerMainPath + "/stream/invoke";
@@ -42,22 +41,6 @@ public class WorkerPaths {
return WorkerMainPath + "/resolvable/" + elementId + "/configurations";
}
- public static String getAdaptersPath() {
- return WorkerMainPath + "/adapters";
- }
-
- public static String getProtocolsPath() {
- return WorkerMainPath + "/protocols";
- }
-
- public static String getAdaptersPath(String appId) {
- return getAdaptersPath() + Slash + appId;
- }
-
- public static String getProtocolsPath(String appId) {
- return getProtocolsPath() + Slash + appId;
- }
-
public static String getGuessSchemaPath() {
return WorkerMainPath + "/guess/schema";
}
diff --git a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuessResults.java b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuessResults.java
deleted file mode 100644
index ff27fab..0000000
--- a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuessResults.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapter.guess;
-
-//TODO Replace this class with DomainPropertyProbabilityList
-public class PropertyGuessResults {
- private PropertyGuesses[] result;
-
- public PropertyGuessResults() {
- }
-
-
- public PropertyGuessResults(PropertyGuesses[] result) {
- this.result = result;
- }
-
- public PropertyGuesses[] getResult() {
- return result;
- }
-
- public void setResult(PropertyGuesses[] result) {
- this.result = result;
- }
-}
diff --git a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuesses.java b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuesses.java
deleted file mode 100644
index 12d706a..0000000
--- a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/guess/PropertyGuesses.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapter.guess;
-
-import com.google.gson.annotations.SerializedName;
-
-public class PropertyGuesses {
-
- @SerializedName("class")
- private String clazz;
-
- private double probability;
-
-
- public PropertyGuesses() {
- }
-
- public PropertyGuesses(String clazz, double probability) {
- this.clazz = clazz;
- this.probability = probability;
- }
-
- public String getClazz() {
- return clazz;
- }
-
- public void setClazz(String clazz) {
- this.clazz = clazz;
- }
-
- public double getProbability() {
- return probability;
- }
-
- public void setProbability(double probability) {
- this.probability = probability;
- }
-}