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
Commits on Source (6)
Showing with 71 additions and 10 deletions
......@@ -92,12 +92,15 @@ spotbugs:
script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
- docker build --pull -t $IMAGE_NAME ./$JAVA_PROJECT_NAME
- docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest
- docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA
- "[ ! $CI_COMMIT_TAG ] && docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest"
- "[ ! $CI_COMMIT_TAG ] && docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA"
- "[ $CI_COMMIT_TAG ] && docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:CI_COMMIT_TAG"
- echo $DOCKERHUB_PW | docker login -u $DOCKERHUB_ID --password-stdin
- docker push $DOCKERHUB_ORG/$IMAGE_NAME
- docker logout
rules:
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
# - $JAVA_PROJECT_NAME/**/* # hope this can be simplified soon, see #51
- application-kafkastreams-commons/**/*
......@@ -113,6 +116,8 @@ deploy-uc1-kstreams-app:
IMAGE_NAME: "theodolite-uc1-kstreams-app"
JAVA_PROJECT_NAME: "uc1-application"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc1-application/**/*
- application-kafkastreams-commons/**/*
......@@ -128,6 +133,8 @@ deploy-uc2-kstreams-app:
IMAGE_NAME: "theodolite-uc2-kstreams-app"
JAVA_PROJECT_NAME: "uc2-application"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc2-application/**/*
- application-kafkastreams-commons/**/*
......@@ -143,6 +150,8 @@ deploy-uc3-kstreams-app:
IMAGE_NAME: "theodolite-uc3-kstreams-app"
JAVA_PROJECT_NAME: "uc3-application"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc3-application/**/*
- application-kafkastreams-commons/**/*
......@@ -158,6 +167,8 @@ deploy-uc4-kstreams-app:
IMAGE_NAME: "theodolite-uc4-kstreams-app"
JAVA_PROJECT_NAME: "uc4-application"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc4-application/**/*
- application-kafkastreams-commons/**/*
......@@ -173,6 +184,8 @@ deploy-uc1-workload-generator:
IMAGE_NAME: "theodolite-uc1-workload-generator"
JAVA_PROJECT_NAME: "uc1-workload-generator"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc1-workload-generator/**/*
- application-kafkastreams-commons/**/*
......@@ -188,6 +201,8 @@ deploy-uc2-workload-generator:
IMAGE_NAME: "theodolite-uc2-workload-generator"
JAVA_PROJECT_NAME: "uc2-workload-generator"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc2-workload-generator/**/*
- application-kafkastreams-commons/**/*
......@@ -203,6 +218,8 @@ deploy-uc3-workload-generator:
IMAGE_NAME: "theodolite-uc3-workload-generator"
JAVA_PROJECT_NAME: "uc3-workload-generator"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc3-workload-generator/**/*
- application-kafkastreams-commons/**/*
......@@ -218,6 +235,8 @@ deploy-uc4-workload-generator:
IMAGE_NAME: "theodolite-uc4-workload-generator"
JAVA_PROJECT_NAME: "uc4-workload-generator"
rules: # hope this can be simplified soon, see #51
- if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $CI_COMMIT_TAG"
when: always
- changes:
- uc4-workload-generator/**/*
- application-kafkastreams-commons/**/*
......
......@@ -15,7 +15,7 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: uc1-application
image: "soerenhenning/uc1-app:latest"
image: "theodolite/theodolite-uc1-kstreams-app:latest"
ports:
- containerPort: 5555
name: jmx
......
......@@ -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"
......
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;
}
}