You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by go...@apache.org on 2021/08/11 11:15:41 UTC
[incubator-streampipes] branch edge-extensions updated: Fixed
problems in Offloading
This is an automated email from the ASF dual-hosted git repository.
gomm pushed a commit to branch edge-extensions
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/edge-extensions by this push:
new 5ab49a2 Fixed problems in Offloading
5ab49a2 is described below
commit 5ab49a265e315d8a9641b37979069fbfc441e91d
Author: daniel-gomm <da...@outlook.de>
AuthorDate: Wed Aug 11 13:15:17 2021 +0200
Fixed problems in Offloading
---
.../strategies/OffloadingStrategyFactory.java | 2 +-
streampipes-performance-tests/pom.xml | 22 ++++++++++++++++++++++
.../streampipes/performance/TestFactory.java | 2 +-
.../performance/performancetest/GenericTest.java | 4 ++--
.../migration/MigrationPipelineGenerator.java | 4 ++++
5 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/streampipes-node-controller/src/main/java/org/apache/streampipes/node/controller/management/offloading/strategies/OffloadingStrategyFactory.java b/streampipes-node-controller/src/main/java/org/apache/streampipes/node/controller/management/offloading/strategies/OffloadingStrategyFactory.java
index 97f7244..9ca95a9 100644
--- a/streampipes-node-controller/src/main/java/org/apache/streampipes/node/controller/management/offloading/strategies/OffloadingStrategyFactory.java
+++ b/streampipes-node-controller/src/main/java/org/apache/streampipes/node/controller/management/offloading/strategies/OffloadingStrategyFactory.java
@@ -47,7 +47,7 @@ public class OffloadingStrategyFactory {
return Collections.singletonList(new OffloadingStrategy<Float>(
new ThresholdViolationOffloadingPolicy<>(5,
Comparator.GREATER, 0.5f, 1),
- new CPULoadResourceProperty(), new PrioritySelectionStrategy()));
+ new CPULoadResourceProperty(), new RandomSelectionStrategy()));
default:
return getDefaultStrategy();
}
diff --git a/streampipes-performance-tests/pom.xml b/streampipes-performance-tests/pom.xml
index e8c5acd..a86a437 100644
--- a/streampipes-performance-tests/pom.xml
+++ b/streampipes-performance-tests/pom.xml
@@ -57,4 +57,26 @@
<!-- External dependencies -->
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.apache.streampipes.performance.EdgeExtensionsGenericPerformanceTest
+ </mainClass>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <finalName>generic-test</finalName>
+ </build>
+
</project>
\ No newline at end of file
diff --git a/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/TestFactory.java b/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/TestFactory.java
index 0482870..9a8bff1 100644
--- a/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/TestFactory.java
+++ b/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/TestFactory.java
@@ -49,7 +49,7 @@ public class TestFactory {
public static Test getDeploymentTest(){
return new GenericTest(getPipelineName(), true, false,
- false, 0, 10000);
+ false, 0, 15000);
}
public static Test getLatencyTest(){
diff --git a/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/performancetest/GenericTest.java b/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/performancetest/GenericTest.java
index 1d61957..07aa978 100644
--- a/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/performancetest/GenericTest.java
+++ b/streampipes-performance-tests/src/main/java/org/apache/streampipes/performance/performancetest/GenericTest.java
@@ -123,7 +123,6 @@ public class GenericTest implements Test{
PipelineOperationStatus message = client.pipelines().reconfigure(pipeline);
System.out.println(message.getTitle());
if (!message.isSuccess()) {
- assert line != null;
line[line.length -1] = false;
}
}
@@ -151,9 +150,10 @@ public class GenericTest implements Test{
line[line.length -1] = false;
}
}
+ assert line != null;
evalLogger.logMQTT(testType, line);
try {
- Thread.sleep(5000);
+ Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/migration/MigrationPipelineGenerator.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/migration/MigrationPipelineGenerator.java
index ad5614a..586b89d 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/migration/MigrationPipelineGenerator.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/migration/MigrationPipelineGenerator.java
@@ -96,6 +96,10 @@ public class MigrationPipelineGenerator {
private boolean nodeTagsContainElementTag(List<String> pipelineNodeTags,
NodeInfoDescription node){
+ if (pipelineNodeTags == null || pipelineNodeTags.isEmpty())
+ return true;
+ if (node.getStaticNodeMetadata().getLocationTags().isEmpty())
+ return false;
return node.getStaticNodeMetadata().getLocationTags().stream().anyMatch(pipelineNodeTags::contains);
}