From 7130935dbc0ed7690985511bcf381196177bf2ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de>
Date: Tue, 29 Nov 2022 13:53:28 +0100
Subject: [PATCH] Fix bug of Jet job name not set
---
.../benchmarks/commons/hazelcastjet/HazelcastJetService.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/theodolite-benchmarks/hazelcastjet-commons/src/main/java/rocks/theodolite/benchmarks/commons/hazelcastjet/HazelcastJetService.java b/theodolite-benchmarks/hazelcastjet-commons/src/main/java/rocks/theodolite/benchmarks/commons/hazelcastjet/HazelcastJetService.java
index 34378c427..ccbc075cf 100644
--- a/theodolite-benchmarks/hazelcastjet-commons/src/main/java/rocks/theodolite/benchmarks/commons/hazelcastjet/HazelcastJetService.java
+++ b/theodolite-benchmarks/hazelcastjet-commons/src/main/java/rocks/theodolite/benchmarks/commons/hazelcastjet/HazelcastJetService.java
@@ -3,6 +3,7 @@ package rocks.theodolite.benchmarks.commons.hazelcastjet;
import com.hazelcast.jet.JetInstance;
import com.hazelcast.jet.config.JobConfig;
import com.hazelcast.jet.pipeline.Pipeline;
+import java.util.Objects;
import org.apache.commons.configuration2.Configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,10 +58,11 @@ public abstract class HazelcastJetService {
* instance.
*/
public void run() {
+ Objects.requireNonNull(this.jobName, "'jobName' must be set.");
try {
final Pipeline pipeline = this.pipelineFactory.buildPipeline();
this.registerSerializer();
- this.jobConfig.setName(this.config.getString("name"));
+ this.jobConfig.setName(this.jobName);
this.jetInstance.newJobIfAbsent(pipeline, this.jobConfig).join();
} catch (final Exception e) { // NOPMD
LOGGER.error("ABORT MISSION!:", e);
--
GitLab