Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • she/theodolite
1 result
Show changes
Showing
with 106 additions and 18 deletions
......@@ -16,7 +16,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: soerenhenning/uc1-wg:latest
image: theodolite/theodolite-uc1-workload-generator:latest
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: uc2-application
image: "benediktwetzel/uc2-app:latest"
image: "theodolite/theodolite-uc2-kstreams-app:latest"
ports:
- containerPort: 5555
name: jmx
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: benediktwetzel/uc2-wg:latest
image: theodolite/theodolite-uc2-workload-generator:latest
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: uc3-application
image: "soerenhenning/uc3-app:latest"
image: "theodolite/theodolite-uc3-kstreams-app:latest"
ports:
- containerPort: 5555
name: jmx
......
......@@ -16,7 +16,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: soerenhenning/uc3-wg:latest
image: theodolite/theodolite-uc3-workload-generator:latest
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: uc4-application
image: "soerenhenning/uc4-app:latest"
image: "theodolite/theodolite-uc4-kstreams-app:latest"
ports:
- containerPort: 5555
name: jmx
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: soerenhenning/uc4-wg:latest
image: theodolite/theodolite-uc4-workload-generator:latest
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
......
application.name="uc1-application"
application.version="0.0.1"
application.name=theodolite-uc1-application
application.version=0.0.1
kafka.bootstrap.servers=localhost:9092
kafka.input.topic=input
......
......@@ -46,6 +46,8 @@ public class AggregationService {
// Configuration of the stream application
final KafkaStreams kafkaStreams = uc2KafkaStreamsBuilder
.applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME))
.applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION))
.bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS))
.numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS))
.commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS))
......
......@@ -4,6 +4,9 @@ package theodolite.uc2.application;
* Keys to access configuration parameters.
*/
public final class ConfigurationKeys {
public static final String APPLICATION_NAME = "application.name";
public static final String APPLICATION_VERSION = "application.version";
public static final String CONFIGURATION_KAFKA_TOPIC = "configuration.kafka.topic";
......
package theodolite.uc2.streamprocessing;
import java.util.Objects;
import java.util.Set;
import titan.ccp.models.records.ActivePowerRecord;
......@@ -26,6 +27,27 @@ public class JointRecordParents {
return this.record;
}
@Override
public String toString() {
return "{" + this.parents + ", " + this.record + "}";
}
@Override
public int hashCode() {
return Objects.hash(this.parents, this.record);
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof JointRecordParents) {
final JointRecordParents other = (JointRecordParents) obj;
return Objects.equals(this.parents, other.parents)
&& Objects.equals(this.record, other.record);
}
return false;
}
}
package theodolite.uc2.streamprocessing;
import java.util.Objects;
/**
* A key consisting of the identifier of a sensor and an identifier of parent sensor.
*/
......@@ -27,4 +29,22 @@ public class SensorParentKey {
return "{" + this.sensorIdentifier + ", " + this.parentIdentifier + "}";
}
@Override
public int hashCode() {
return Objects.hash(this.sensorIdentifier, this.parentIdentifier);
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof SensorParentKey) {
final SensorParentKey other = (SensorParentKey) obj;
return Objects.equals(this.sensorIdentifier, other.sensorIdentifier)
&& Objects.equals(this.parentIdentifier, other.parentIdentifier);
}
return false;
}
}
application.name=theodolite-uc2-application
application.version=0.0.1
configuration.host=localhost
configuration.port=8082
configuration.kafka.topic=configuration
......
......@@ -5,21 +5,25 @@ package theodolite.uc3.application;
*/
public final class ConfigurationKeys {
public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers";
public static final String APPLICATION_NAME = "application.name";
public static final String KAFKA_OUTPUT_TOPIC = "kafka.output.topic";
public static final String APPLICATION_VERSION = "application.version";
public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic";
public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers";
public static final String NUM_THREADS = "num.threads";
public static final String KAFKA_OUTPUT_TOPIC = "kafka.output.topic";
public static final String COMMIT_INTERVAL_MS = "commit.interval.ms";
public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic";
public static final String CACHE_MAX_BYTES_BUFFERING = "cache.max.bytes.buffering";
public static final String NUM_THREADS = "num.threads";
public static final String KAFKA_WINDOW_DURATION_MINUTES = "kafka.window.duration.minutes";
public static final String COMMIT_INTERVAL_MS = "commit.interval.ms";
private ConfigurationKeys() {
}
public static final String CACHE_MAX_BYTES_BUFFERING = "cache.max.bytes.buffering";
public static final String KAFKA_WINDOW_DURATION_MINUTES = "kafka.window.duration.minutes";
private ConfigurationKeys() {
}
}
......@@ -42,6 +42,8 @@ public class HistoryService {
// Configuration of the stream application
final KafkaStreams kafkaStreams = uc3KafkaStreamsBuilder
.applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME))
.applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION))
.bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS))
.numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS))
.commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS))
......
application.name=theodolite-uc3-application
application.version=0.0.1
kafka.bootstrap.servers=localhost:9092
kafka.input.topic=input
kafka.output.topic=output
......
......@@ -5,6 +5,10 @@ package theodolite.uc4.application;
*/
public final class ConfigurationKeys {
public static final String APPLICATION_NAME = "application.name";
public static final String APPLICATION_VERSION = "application.version";
public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers";
public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic";
......
......@@ -42,6 +42,8 @@ public class HistoryService {
// Configuration of the stream application
final KafkaStreams kafkaStreams = uc4KafkaStreamsBuilder
.applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME))
.applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION))
.bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS))
.numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS))
.commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS))
......
package theodolite.uc4.streamprocessing;
import java.util.Objects;
/**
* Composed key of an hour of the day and a sensor id.
*/
......@@ -26,4 +28,22 @@ public class HourOfDayKey {
return this.sensorId + ";" + this.hourOfDay;
}
@Override
public int hashCode() {
return Objects.hash(this.hourOfDay, this.sensorId);
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof HourOfDayKey) {
final HourOfDayKey other = (HourOfDayKey) obj;
return Objects.equals(this.hourOfDay, other.hourOfDay)
&& Objects.equals(this.sensorId, other.sensorId);
}
return false;
}
}
application.name=theodolite-uc4-application
application.version=0.0.1
kafka.bootstrap.servers=localhost:9092
kafka.input.topic=input
kafka.output.topic=output
......