diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c97acd1628e7816e70d7791d5702f4dcf4680c42..7d14e478aed45186eb71aa78ca65d8b54ade5856 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,16 +37,19 @@ default: - > if [ $IMAGE_TAG ]; then KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$IMAGE_TAG" + export PUBLISHED_IMAGE_TAG=$IMAGE_TAG elif [ $CI_COMMIT_TAG ]; then KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$CI_COMMIT_TAG" + export PUBLISHED_IMAGE_TAG=$CI_COMMIT_TAG else DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest" KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA" + export PUBLISHED_IMAGE_TAG=$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA fi - "[ $DOCKERFILE ] && KANIKO_DOCKERFILE=\"--dockerfile $DOCKERFILE\"" - /kaniko/executor --context `pwd`/$CONTEXT $KANIKO_DOCKERFILE $KANIKO_D - - echo "PUBLISHED_IMAGE_TAG=${CI_COMMIT_TAG-$CI_COMMIT_SHORT_SHA}" >> build.env + - echo "PUBLISHED_IMAGE_TAG=$PUBLISHED_IMAGE_TAG" >> $CI_PROJECT_DIR/build.env artifacts: reports: dotenv: build.env diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 34ed67d70b1212b14bbf47a2062cf1138817df63..2159f9d34e79005f1ae5292b5f828074b38f096e 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -227,7 +227,7 @@ GEM jekyll-seo-tag (~> 2.1) minitest (5.14.4) multipart-post (2.1.1) - nokogiri (1.13.0-x86_64-linux) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) nokogumbo (2.0.5) nokogiri (~> 1.8, >= 1.8.4) diff --git a/docs/running-benchmarks.md b/docs/running-benchmarks.md index 0a76316c0515233f9445b363f941d60ab7aa0e06..5051cb5b685deb17212c1489c585e75262bf9da5 100644 --- a/docs/running-benchmarks.md +++ b/docs/running-benchmarks.md @@ -130,7 +130,7 @@ If [persisting results](installation#persisting-results) is enabled in Theodolit For installations without persistence, but also as an alternative for installations with persistence, we provide a second option to access results: Theodolite comes with a *results access sidecar*. It allows to copy all benchmark results from the Theodolite pod to your current working directory on your host machine with the following command: ```sh -kubectl cp $(kubectl get pod -l app=theodolite -o jsonpath="{.items[0].metadata.name}"):/results . -c results-access +kubectl cp $(kubectl get pod -l app=theodolite -o jsonpath="{.items[0].metadata.name}"):results . -c results-access ``` ## Analyzing Benchmark Results diff --git a/docs/theodolite-benchmarks/load-generator.md b/docs/theodolite-benchmarks/load-generator.md index e92238e988436ded5444c4ce669dcc84e4e1a2b3..5ae10d16a50aaa16a76975d8127ef379508b1a37 100644 --- a/docs/theodolite-benchmarks/load-generator.md +++ b/docs/theodolite-benchmarks/load-generator.md @@ -55,6 +55,7 @@ The prebuilt container images can be configured with the following environment v | `KAFKA_LINGER_MS` | Value for the Kafka producer configuration: [`linger.ms`](https://kafka.apache.org/documentation/#producerconfigs_linger.ms). Only used if Kafka is set as `TARGET`. | see Kafka producer config: [`linger.ms`](https://kafka.apache.org/documentation/#producerconfigs_linger.ms) | | `KAFKA_BUFFER_MEMORY` | Value for the Kafka producer configuration: [`buffer.memory`](https://kafka.apache.org/documentation/#producerconfigs_buffer.memory) Only used if Kafka is set as `TARGET`. | see Kafka producer config: [`buffer.memory`](https://kafka.apache.org/documentation/#producerconfigs_buffer.memory) | | `HTTP_URL` | The URL the load generator should post messages to. Only used if HTTP is set as `TARGET`. | | +| `HTTP_ASYNC` | Whether the load generator should send HTTP messages asynchronously. Only used if HTTP is set as `TARGET`. | `false` | | `PUBSUB_INPUT_TOPIC` | The Google Cloud Pub/Sub topic to write messages to. Only used if Pub/Sub is set as `TARGET`. | input | | `PUBSUB_PROJECT` | The Google Cloud this Pub/Sub topic is associated with. Only used if Pub/Sub is set as `TARGET`. | | | `PUBSUB_EMULATOR_HOST` | A Pub/Sub emulator host. Only used if Pub/Sub is set as `TARGET`. | | @@ -62,8 +63,9 @@ The prebuilt container images can be configured with the following environment v | `PERIOD_MS` | The time in milliseconds between generating two messages for the same sensor. With our Theodolite benchmarks, we apply an [open workload model](https://www.usenix.org/legacy/event/nsdi06/tech/full_papers/schroeder/schroeder.pdf) in which new messages are generated at a fixed rate, without considering the think time of the target server nor the time required for generating a message. | 1000 | | `VALUE` | The constant `valueInW` of an `ActivePowerRecord`. | 10 | | `THREADS` | Number of worker threads used to generate the load. | 4 | +| `DISABLE_DNS_CACHING` | Set to `true` to disable DNS caching by the underlying JVM. You might want to do so when generating load via HTTP that should be sent to different target instances. | `false` | -Please note that there are some additional configuration options for benchmark [UC4's load generator](https://github.com/cau-se/theodolite/blob/master/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/LoadGenerator.java). +Please note that there are some additional configuration options for benchmark [UC4's load generator](hhttps://github.com/cau-se/theodolite/blob/master/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/LoadGenerator.java). ## Creating a custom load generator diff --git a/execution/infrastructure/zookeeper-client.yaml b/execution/infrastructure/zookeeper-client.yaml index 9d6d00275c46a888ed4e8ff08533ca245c4a684c..85739bba751be62773f511aa95030e6d71a4a869 100644 --- a/execution/infrastructure/zookeeper-client.yaml +++ b/execution/infrastructure/zookeeper-client.yaml @@ -2,10 +2,12 @@ apiVersion: v1 kind: Pod metadata: name: zookeeper-client + labels: + app: zookeeper-client spec: containers: - name: zookeeper-client - image: confluentinc/cp-zookeeper:5.4.0 + image: zookeeper:3.7.0 command: - sh - -c diff --git a/helm/templates/strimzi/kafka-cluster.yaml b/helm/templates/kafka/kafka-cluster.yaml similarity index 88% rename from helm/templates/strimzi/kafka-cluster.yaml rename to helm/templates/kafka/kafka-cluster.yaml index 0d7eccfd279c62f7d996a8e3e41a55a5ebdd4e96..29cf038f12aa6ee38b21697b8d79b5aea378c7d8 100644 --- a/helm/templates/strimzi/kafka-cluster.yaml +++ b/helm/templates/kafka/kafka-cluster.yaml @@ -30,8 +30,6 @@ spec: configMapKeyRef: name: {{ template "theodolite.fullname" . }}-kafka-metrics key: kafka-metrics-config.yml - - kafkaExporter: {} zookeeper: {{- with .Values.strimzi.zookeeper.replicas }} @@ -39,5 +37,14 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} storage: - type: ephemeral + type: ephemeral + + kafkaExporter: {} + + {{- if .Values.strimzi.topicOperator.enabled }} + entityOperator: + topicOperator: {} + {{- end }} + + {{- end }} \ No newline at end of file diff --git a/helm/templates/strimzi/kafka-exporter-podmonitor.yaml b/helm/templates/kafka/kafka-exporter-podmonitor.yaml similarity index 100% rename from helm/templates/strimzi/kafka-exporter-podmonitor.yaml rename to helm/templates/kafka/kafka-exporter-podmonitor.yaml diff --git a/helm/templates/strimzi/kafka-metrics-configmap.yaml b/helm/templates/kafka/kafka-metrics-configmap.yaml similarity index 100% rename from helm/templates/strimzi/kafka-metrics-configmap.yaml rename to helm/templates/kafka/kafka-metrics-configmap.yaml diff --git a/helm/templates/strimzi/kafka-podmonitor.yaml b/helm/templates/kafka/kafka-podmonitor.yaml similarity index 100% rename from helm/templates/strimzi/kafka-podmonitor.yaml rename to helm/templates/kafka/kafka-podmonitor.yaml diff --git a/helm/templates/kafka/zookeeper-client.yaml b/helm/templates/kafka/zookeeper-client.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2154ec116b71bbb33808d3c32d42170a8d9589da --- /dev/null +++ b/helm/templates/kafka/zookeeper-client.yaml @@ -0,0 +1,23 @@ +{{- if .Values.strimzi.zookeeper.zooEntrance.zookeeperClient.enabled -}} +apiVersion: v1 +kind: Pod +metadata: + name: {{ template "theodolite.fullname" . }}-kafka-zookeeper-client + labels: + app: zookeeper-client +spec: + containers: + - name: zookeeper-client + image: zookeeper:3.7.0 + command: + - sh + - -c + - "exec tail -f /dev/null" + env: + - name: ZOOKEEPER_SERVER + value: {{ template "theodolite.fullname" . }}-kafka-zoo-entrance:2181 + {{- with .Values.strimzi.zookeeper.zooEntrance.zookeeperClient.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/helm/templates/kafka/zookeeper-entrance-deployment.yaml b/helm/templates/kafka/zookeeper-entrance-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a0c2841760aa641b1f1105863465a08069d164bd --- /dev/null +++ b/helm/templates/kafka/zookeeper-entrance-deployment.yaml @@ -0,0 +1,71 @@ +{{- if .Values.strimzi.zookeeper.zooEntrance.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "theodolite.fullname" . }}-kafka-zoo-entrance + labels: + app: zoo-entrance +spec: + replicas: 1 + selector: + matchLabels: + app: zoo-entrance + strategy: + type: Recreate + template: + metadata: + labels: + app: zoo-entrance + spec: + containers: + - name: zoo-entrance + image: 'ghcr.io/scholzj/zoo-entrance:latest' + command: + - /opt/stunnel/stunnel_run.sh + ports: + - containerPort: 2181 + name: zoo + protocol: TCP + env: + - name: LOG_LEVEL + value: notice + - name: STRIMZI_ZOOKEEPER_CONNECT + value: {{ template "theodolite.fullname" . }}-kafka-zookeeper-client:2181 + imagePullPolicy: Always + livenessProbe: + exec: + command: + - /opt/stunnel/stunnel_healthcheck.sh + - '2181' + failureThreshold: 3 + initialDelaySeconds: 15 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + exec: + command: + - /opt/stunnel/stunnel_healthcheck.sh + - '2181' + failureThreshold: 3 + initialDelaySeconds: 15 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + volumeMounts: + - mountPath: /etc/cluster-operator-certs/ + name: cluster-operator-certs + - mountPath: /etc/cluster-ca-certs/ + name: cluster-ca-certs + restartPolicy: Always + terminationGracePeriodSeconds: 30 + volumes: + - name: cluster-operator-certs + secret: + defaultMode: 288 + secretName: {{ template "theodolite.fullname" . }}-kafka-cluster-operator-certs + - name: cluster-ca-certs + secret: + defaultMode: 288 + secretName: {{ template "theodolite.fullname" . }}-kafka-cluster-ca-cert +{{- end }} diff --git a/helm/templates/kafka/zookeeper-entrance-network.yaml b/helm/templates/kafka/zookeeper-entrance-network.yaml new file mode 100644 index 0000000000000000000000000000000000000000..604095c1ab3f5e207666383e23dfb8f006b196ae --- /dev/null +++ b/helm/templates/kafka/zookeeper-entrance-network.yaml @@ -0,0 +1,22 @@ +{{- if .Values.strimzi.zookeeper.zooEntrance.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app: zoo-entrance + name: {{ template "theodolite.fullname" . }}-kafka-zoo-entrance +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: zoo-entrance + ports: + - port: 2181 + protocol: TCP + podSelector: + matchLabels: + strimzi.io/name: {{ template "theodolite.fullname" . }}-kafka-zookeeper + policyTypes: + - Ingress +{{- end }} diff --git a/helm/templates/kafka/zookeeper-entrance-service.yaml b/helm/templates/kafka/zookeeper-entrance-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbb466c3d9ad4e7ff9cb012aaaa95ad9a5380a6e --- /dev/null +++ b/helm/templates/kafka/zookeeper-entrance-service.yaml @@ -0,0 +1,17 @@ +{{- if .Values.strimzi.zookeeper.zooEntrance.enabled -}} +apiVersion: v1 +kind: Service +metadata: + labels: + app: zoo-entrance + name: {{ template "theodolite.fullname" . }}-kafka-zoo-entrance +spec: + ports: + - name: zoo + port: 2181 + protocol: TCP + targetPort: 2181 + selector: + app: zoo-entrance + type: ClusterIP +{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 797098b1a2316389134827cfd6be37c0aaf3c4e6..0f1d4790b6d03d42f6ccc65a5156eb70999867e6 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -173,9 +173,15 @@ strimzi: jvmOptions: "-Xmx": "512M" "-Xms": "512M" - zookeeper: replicas: 3 + zooEntrance: + enabled: true + zookeeperClient: + enabled: true + nodeSelector: {} + topicOperator: + enabled: false ### @@ -295,24 +301,40 @@ operator: uc1LoadGenerator: true uc1Kstreams: true uc1Flink: true + uc1BeamFlink: true + uc1BeamSamza: true uc2LoadGenerator: true uc2Kstreams: true uc2Flink: true + uc2BeamFlink: true + uc2BeamSamza: true uc3LoadGenerator: true uc3Kstreams: true uc3Flink: true + uc3BeamFlink: true + uc3BeamSamza: true uc4LoadGenerator: true uc4Kstreams: true uc4Flink: true + uc4BeamFlink: true + uc4BeamSamza: true benchmarks: uc1Kstreams: true uc1Flink: true + uc1BeamFlink: true + uc1BeamSamza: true uc2Kstreams: true uc2Flink: true + uc2BeamFlink: true + uc2BeamSamza: true uc3Kstreams: true uc3Flink: true + uc3BeamFlink: true + uc3BeamSamza: true uc4Kstreams: true uc4Flink: true + uc4BeamFlink: true + uc4BeamSamza: true serviceAccount: create: true diff --git a/theodolite-benchmarks/beam-commons/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/beam-commons/.settings/org.eclipse.jdt.ui.prefs index 60b9977149c7b281cb2ac91ee282f73d4351e348..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/beam-commons/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/beam-commons/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false \ No newline at end of file +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/beam-commons/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/AbstractPipelineFactory.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/AbstractPipelineFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..4976f46e231c472599f85a72f698e26a09cbc860 --- /dev/null +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/AbstractPipelineFactory.java @@ -0,0 +1,71 @@ +package rocks.theodolite.benchmarks.commons.beam; + +import io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig; +import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig; +import java.util.HashMap; +import java.util.Map; +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.coders.CoderRegistry; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.commons.configuration2.Configuration; +import org.apache.kafka.clients.consumer.ConsumerConfig; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaActivePowerTimestampReader; + +/** + * Abstract factory class for creating Beam pipelines from a {@link Configuration} and + * {@link PipelineOptions}. Implementations may expand the {@link PipelineOptions}, construct a + * {@link Pipeline} and register coders. + */ +public abstract class AbstractPipelineFactory { + + protected final Configuration config; + + public AbstractPipelineFactory(final Configuration configuration) { + this.config = configuration; + } + + /** + * Create a Pipeline with the configured {@link PipelineOptions}. + */ + public final Pipeline create(final PipelineOptions options) { + this.expandOptions(options); + final Pipeline pipeline = Pipeline.create(options); + this.registerCoders(pipeline.getCoderRegistry()); + this.constructPipeline(pipeline); + return pipeline; + } + + protected abstract void expandOptions(final PipelineOptions options); + + protected abstract void constructPipeline(Pipeline pipeline); + + protected abstract void registerCoders(CoderRegistry registry); + + protected KafkaActivePowerTimestampReader buildKafkaReader() { + final String inputTopic = this.config.getString(ConfigurationKeys.KAFKA_INPUT_TOPIC); + final String bootstrapServer = this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS); + + final Map<String, Object> consumerConfig = new HashMap<>(); + consumerConfig.put( + ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, + this.config.getString(ConfigurationKeys.ENABLE_AUTO_COMMIT_CONFIG)); + consumerConfig.put( + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, + this.config.getString(ConfigurationKeys.AUTO_OFFSET_RESET_CONFIG)); + consumerConfig.put( + AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, + this.config.getString(ConfigurationKeys.SCHEMA_REGISTRY_URL)); + consumerConfig.put( + KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG, + this.config.getString(ConfigurationKeys.SPECIFIC_AVRO_READER)); + consumerConfig.put( + ConsumerConfig.GROUP_ID_CONFIG, + this.config.getString(ConfigurationKeys.APPLICATION_NAME)); + + return new KafkaActivePowerTimestampReader( + bootstrapServer, + inputTopic, + consumerConfig); + } + +} diff --git a/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/BeamService.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/BeamService.java new file mode 100644 index 0000000000000000000000000000000000000000..dd410f8d52e269a863b5d6dab62196c0d9690c98 --- /dev/null +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/BeamService.java @@ -0,0 +1,56 @@ +package rocks.theodolite.benchmarks.commons.beam; + +import java.util.function.Function; +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.PipelineRunner; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.beam.sdk.options.PipelineOptionsFactory; +import org.apache.commons.configuration2.Configuration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import titan.ccp.common.configuration.ServiceConfigurations; + +/** + * A general Apache Beam-based microservice. It is configured by Beam pipeline, a Beam runner and + * additional configuration. + */ +public class BeamService { + + private static final Logger LOGGER = LoggerFactory.getLogger(BeamService.class); + + private final Configuration config = ServiceConfigurations.createWithDefaults(); + private final String applicationName = this.config.getString(ConfigurationKeys.APPLICATION_NAME); + + private final AbstractPipelineFactory pipelineFactory; + private final PipelineOptions pipelineOptions; + + /** + * Create a new {@link BeamService}. + * + * @param pipelineFactoryFactory {@link Function} for creating an {@link AbstractPipelineFactory} + * based on a {@link Configuration}. + * @param runner The Beam {@link PipelineRunner} to run this pipeline. + * @param args Arguments which are treated as {@link PipelineOptions}. + */ + public BeamService( + final Function<Configuration, AbstractPipelineFactory> pipelineFactoryFactory, + final Class<? extends PipelineRunner<?>> runner, + final String... args) { + this.pipelineFactory = pipelineFactoryFactory.apply(this.config); + this.pipelineOptions = PipelineOptionsFactory.fromArgs(args).create(); + this.pipelineOptions.setJobName(this.applicationName); + this.pipelineOptions.setRunner(runner); + } + + /** + * Start this microservice, by running the underlying Beam pipeline. + */ + public void run() { + LOGGER.info("Construct Beam pipeline with pipeline options: {}", + this.pipelineOptions.toString()); + final Pipeline pipeline = this.pipelineFactory.create(this.pipelineOptions); + LOGGER.info("Starting BeamService {}.", this.applicationName); + pipeline.run().waitUntilFinish(); + } + +} diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/ConfigurationKeys.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/ConfigurationKeys.java similarity index 96% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/ConfigurationKeys.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/ConfigurationKeys.java index 1e4dc593c627282f5c6735a4d91e963d83af6865..487b8de00c35bbe28961f29de7ba0bb9d57e98ec 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/ConfigurationKeys.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam; +package rocks.theodolite.benchmarks.commons.beam; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/ActivePowerRecordDeserializer.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/ActivePowerRecordDeserializer.java similarity index 87% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/ActivePowerRecordDeserializer.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/ActivePowerRecordDeserializer.java index c53dde3d5f4b7d18822c916a637c356b898fe2cd..0c8d3a4a847cf9422c4e364a31024fb3d0c3f87a 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/ActivePowerRecordDeserializer.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/ActivePowerRecordDeserializer.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam.kafka; +package rocks.theodolite.benchmarks.commons.beam.kafka; import io.confluent.kafka.streams.serdes.avro.SpecificAvroDeserializer; import org.apache.kafka.common.serialization.Deserializer; diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/EventTimePolicy.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/EventTimePolicy.java similarity index 94% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/EventTimePolicy.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/EventTimePolicy.java index e568968670b3ea51388f3e2a19da8f64bd7c5391..62e56341518839b96ad059e1c496ea1babb4674d 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/EventTimePolicy.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/EventTimePolicy.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam.kafka; +package rocks.theodolite.benchmarks.commons.beam.kafka; import java.util.Optional; import org.apache.beam.sdk.io.kafka.KafkaRecord; diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaActivePowerTimestampReader.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaActivePowerTimestampReader.java similarity index 97% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaActivePowerTimestampReader.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaActivePowerTimestampReader.java index 7a48bd71d497f65351888425d092decf5adb05f3..e22d5c8eedcd545364511a1461208f30bcb0a75c 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaActivePowerTimestampReader.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaActivePowerTimestampReader.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam.kafka; +package rocks.theodolite.benchmarks.commons.beam.kafka; import java.util.Map; import org.apache.beam.sdk.coders.AvroCoder; diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaGenericReader.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaGenericReader.java similarity index 96% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaGenericReader.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaGenericReader.java index e513c3a0e3dffcb9881f389af5ee9f05c52a2b63..000ddcdccd90cf3bc4f0cdaabe004ce74bef5dec 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaGenericReader.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaGenericReader.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam.kafka; +package rocks.theodolite.benchmarks.commons.beam.kafka; import java.util.Map; import org.apache.beam.sdk.io.kafka.KafkaIO; diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaWriterTransformation.java b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaWriterTransformation.java similarity index 97% rename from theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaWriterTransformation.java rename to theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaWriterTransformation.java index 6d33f6f01493c10a1eb6aca56dd309ae58ce4b8d..e9131b513001bf8756495a6aecfe72456959f0c6 100644 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/kafka/KafkaWriterTransformation.java +++ b/theodolite-benchmarks/beam-commons/src/main/java/rocks/theodolite/benchmarks/commons/beam/kafka/KafkaWriterTransformation.java @@ -1,4 +1,4 @@ -package theodolite.commons.beam.kafka; +package rocks.theodolite.benchmarks.commons.beam.kafka; import java.util.Map; import org.apache.beam.sdk.io.kafka.KafkaIO; diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractBeamService.java b/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractBeamService.java deleted file mode 100644 index 3e94fb4c878401183f45ff384e39dd6bc0291a27..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractBeamService.java +++ /dev/null @@ -1,43 +0,0 @@ -package theodolite.commons.beam; - -import org.apache.beam.sdk.options.PipelineOptions; -import org.apache.beam.sdk.options.PipelineOptionsFactory; -import org.apache.commons.configuration2.Configuration; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import titan.ccp.common.configuration.ServiceConfigurations; - -/** - * Abstraction of a Beam microservice. Encapsulates the corresponding {@link PipelineOptions} and - * the beam Runner. - */ -public class AbstractBeamService { - - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractBeamService.class); - - // Beam Pipeline - protected PipelineOptions options; - - // Application Configurations - private final Configuration config = ServiceConfigurations.createWithDefaults(); - private final String applicationName = this.config.getString(ConfigurationKeys.APPLICATION_NAME); - - /** - * Creates AbstractBeamService with options. - */ - public AbstractBeamService(final String[] args) { // NOPMD - super(); - LOGGER.info("Pipeline options:"); - for (final String s : args) { - LOGGER.info("{}", s); - } - this.options = PipelineOptionsFactory.fromArgs(args).create(); - this.options.setJobName(this.applicationName); - LOGGER.info("Starting BeamService with PipelineOptions: {}", this.options.toString()); - } - - public Configuration getConfig() { - return this.config; - } - -} diff --git a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractPipeline.java b/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractPipeline.java deleted file mode 100644 index 3f04bf4373aab0394ff4574b4020065ac356724b..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/beam-commons/src/main/java/theodolite/commons/beam/AbstractPipeline.java +++ /dev/null @@ -1,71 +0,0 @@ -package theodolite.commons.beam; - -import java.util.HashMap; -import java.util.Map; -import org.apache.beam.sdk.Pipeline; -import org.apache.beam.sdk.options.PipelineOptions; -import org.apache.commons.configuration2.Configuration; -import org.apache.kafka.clients.consumer.ConsumerConfig; - -/** - * Abstraction of a Beam {@link Pipeline}. - */ -public class AbstractPipeline extends Pipeline { - - private static final String KAFKA_CONFIG_SPECIFIC_AVRO_READER = "specific.avro.reader"; // NOPMD - private static final String KAFKA_CONFIG_SCHEMA_REGISTRY_URL = "schema.registry.url"; // NOPMD - - protected final String inputTopic; - protected final String bootstrapServer; - // Application Configurations - private final Configuration config; - - protected AbstractPipeline(final PipelineOptions options, final Configuration config) { - super(options); - this.config = config; - - this.inputTopic = config.getString(ConfigurationKeys.KAFKA_INPUT_TOPIC); - this.bootstrapServer = config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS); - } - - /** - * Builds a simple configuration for a Kafka consumer transformation. - * - * @return the build configuration. - */ - public Map<String, Object> buildConsumerConfig() { - final Map<String, Object> consumerConfig = new HashMap<>(); - consumerConfig.put( - ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, - this.config.getString(ConfigurationKeys.ENABLE_AUTO_COMMIT_CONFIG)); - consumerConfig.put( - ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, - this.config.getString(ConfigurationKeys.AUTO_OFFSET_RESET_CONFIG)); - consumerConfig.put( - KAFKA_CONFIG_SCHEMA_REGISTRY_URL, - this.config.getString(ConfigurationKeys.SCHEMA_REGISTRY_URL)); - consumerConfig.put( - KAFKA_CONFIG_SPECIFIC_AVRO_READER, - this.config.getString(ConfigurationKeys.SPECIFIC_AVRO_READER)); - consumerConfig.put( - ConsumerConfig.GROUP_ID_CONFIG, - this.config.getString(ConfigurationKeys.APPLICATION_NAME)); - return consumerConfig; - } - - /** - * Builds a simple configuration for a Kafka producer transformation. - * - * @return the build configuration. - */ - public Map<String, Object> buildProducerConfig() { - final Map<String, Object> config = new HashMap<>(); - config.put( - KAFKA_CONFIG_SCHEMA_REGISTRY_URL, - this.config.getString(ConfigurationKeys.SCHEMA_REGISTRY_URL)); - config.put( - KAFKA_CONFIG_SPECIFIC_AVRO_READER, - this.config.getString(ConfigurationKeys.SPECIFIC_AVRO_READER)); - return config; - } -} diff --git a/theodolite-benchmarks/definitions/install-configmaps.sh b/theodolite-benchmarks/definitions/install-configmaps.sh index 841a293bbb77c4960a2532a13a009a42227223d3..03d87bf971e98693be7936368421c91a83fd16bb 100755 --- a/theodolite-benchmarks/definitions/install-configmaps.sh +++ b/theodolite-benchmarks/definitions/install-configmaps.sh @@ -10,6 +10,18 @@ kubectl create configmap benchmark-resources-uc2-kstreams --from-file uc2-kstrea kubectl create configmap benchmark-resources-uc3-kstreams --from-file uc3-kstreams/resources kubectl create configmap benchmark-resources-uc4-kstreams --from-file uc4-kstreams/resources +# Beam Flink +kubectl create configmap benchmark-resources-uc1-beam-flink --from-file uc1-beam-flink/resources +kubectl create configmap benchmark-resources-uc2-beam-flink --from-file uc2-beam-flink/resources +kubectl create configmap benchmark-resources-uc3-beam-flink --from-file uc3-beam-flink/resources +kubectl create configmap benchmark-resources-uc4-beam-flink --from-file uc4-beam-flink/resources + +# Beam Samza +kubectl create configmap benchmark-resources-uc1-beam-samza --from-file uc1-beam-samza/resources +kubectl create configmap benchmark-resources-uc2-beam-samza --from-file uc2-beam-samza/resources +kubectl create configmap benchmark-resources-uc3-beam-samza --from-file uc3-beam-samza/resources +kubectl create configmap benchmark-resources-uc4-beam-samza --from-file uc4-beam-samza/resources + # Load Generator kubectl create configmap benchmark-resources-uc1-load-generator --from-file uc1-load-generator/resources kubectl create configmap benchmark-resources-uc2-load-generator --from-file uc2-load-generator/resources diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/flink-configuration-configmap.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/flink-configuration-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..36178e2bebdac96b8648bd6c299009aa49d3fff6 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/flink-configuration-configmap.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: flink-config + labels: + app: flink +data: + flink-conf.yaml: |+ + jobmanager.rpc.address: flink-jobmanager + taskmanager.numberOfTaskSlots: 1 #TODO + #blob.server.port: 6124 + #jobmanager.rpc.port: 6123 + #taskmanager.rpc.port: 6122 + #queryable-state.proxy.ports: 6125 + #jobmanager.memory.process.size: 4Gb + #taskmanager.memory.process.size: 4Gb + #parallelism.default: 1 #TODO + metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter + metrics.reporter.prom.interval: 10 SECONDS + taskmanager.network.detailed-metrics: true + # -> gives metrics about inbound/outbound network queue lengths + log4j-console.properties: |+ + # This affects logging for both user code and Flink + rootLogger.level = INFO + rootLogger.appenderRef.console.ref = ConsoleAppender + rootLogger.appenderRef.rolling.ref = RollingFileAppender + + # Uncomment this if you want to _only_ change Flink's logging + #logger.flink.name = org.apache.flink + #logger.flink.level = INFO + + # The following lines keep the log level of common libraries/connectors on + # log level INFO. The root logger does not override this. You have to manually + # change the log levels here. + logger.akka.name = akka + logger.akka.level = INFO + logger.kafka.name= org.apache.kafka + logger.kafka.level = INFO + logger.hadoop.name = org.apache.hadoop + logger.hadoop.level = INFO + logger.zookeeper.name = org.apache.zookeeper + logger.zookeeper.level = INFO + + # Log all infos to the console + appender.console.name = ConsoleAppender + appender.console.type = CONSOLE + appender.console.layout.type = PatternLayout + appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + + # Log all infos in the given rolling file + appender.rolling.name = RollingFileAppender + appender.rolling.type = RollingFile + appender.rolling.append = false + appender.rolling.fileName = ${sys:log.file} + appender.rolling.filePattern = ${sys:log.file}.%i + appender.rolling.layout.type = PatternLayout + appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + appender.rolling.policies.type = Policies + appender.rolling.policies.size.type = SizeBasedTriggeringPolicy + appender.rolling.policies.size.size=100MB + appender.rolling.strategy.type = DefaultRolloverStrategy + appender.rolling.strategy.max = 10 + + # Suppress the irrelevant (wrong) warnings from the Netty channel handler + logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline + logger.netty.level = OFF \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c1fb35cbfb67efa5b4e41787c342374e835a1f3e --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-deployment.yaml @@ -0,0 +1,97 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-jobmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: jobmanager + template: + metadata: + labels: + app: flink + component: jobmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: jobmanager + image: ghcr.io/cau-se/theodolite-uc1-beam-flink:latest + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc1.beam.flink.Uc1BeamFlink", + "--parallelism=$(PARALLELISM)", + "--disableMetrics=true", + "--fasterCopy"] + # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: PARALLELISM + value: "1" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + - name: FLINK_PROPERTIES + value: |+ + blob.server.port: 6124 + jobmanager.rpc.port: 6123 + taskmanager.rpc.port: 6122 + queryable-state.proxy.ports: 6125 + jobmanager.memory.process.size: 4Gb + taskmanager.memory.process.size: 4Gb + parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6123 + name: rpc + - containerPort: 6124 + name: blob-server + - containerPort: 8081 + name: webui + - containerPort: 9249 + name: metrics + livenessProbe: + tcpSocket: + port: 6123 + initialDelaySeconds: 30 + periodSeconds: 60 + # volumeMounts: + # - name: flink-config-volume-rw + # mountPath: /opt/flink/conf +# - name: job-artifacts-volume +# mountPath: /opt/flink/usrlib + securityContext: + runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary + # initContainers: + # - name: init-jobmanager + # image: busybox:1.28 + # command: ['cp', '-a', '/flink-config/.', '/flink-config-rw/'] + # volumeMounts: + # - name: flink-config-volume + # mountPath: /flink-config/ + # - name: flink-config-volume-rw + # mountPath: /flink-config-rw/ + # volumes: + # - name: flink-config-volume + # configMap: + # name: flink-config + # items: + # - key: flink-conf.yaml + # path: flink-conf.yaml + # - key: log4j-console.properties + # path: log4j-console.properties + # - name: flink-config-volume-rw + # emptyDir: {} +# - name: job-artifacts-volume +# hostPath: +# path: /host/path/to/job/artifacts diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-rest-service.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-rest-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3d74aaf7f625c6922e2e1b4f20c19e50a39b68ac --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-rest-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager-rest +spec: + type: NodePort + ports: + - name: rest + port: 8081 + targetPort: 8081 + nodePort: 30081 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-service.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2ff5d9898eb1ebf5db9a827472a47514ab1473c --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/jobmanager-service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: rpc + port: 6123 + - name: blob-server + port: 6124 + - name: webui + port: 8081 + - name: metrics + port: 9249 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/helm/templates/kafka/service-monitor.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/service-monitor.yaml similarity index 51% rename from helm/templates/kafka/service-monitor.yaml rename to theodolite-benchmarks/definitions/uc1-beam-flink/resources/service-monitor.yaml index 68fd5f7599d36187fa7c4dee2fab211eb263c67d..02f78823c627e27ddfe1db5eac3f6a7f7a7f1bf8 100644 --- a/helm/templates/kafka/service-monitor.yaml +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/service-monitor.yaml @@ -1,16 +1,14 @@ -{{- if .Values.kafkaClient.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: - app: cp-kafka + app: flink appScope: titan-ccp - name: {{ template "theodolite.fullname" . }}-cp-kafka + name: flink spec: selector: matchLabels: - app: cp-kafka + app: flink endpoints: - port: metrics - interval: 7s -{{- end}} + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7d70908589cfa2124af64cf3c671ed62c00b1be6 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-deployment.yaml @@ -0,0 +1,88 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-taskmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: taskmanager + template: + metadata: + labels: + app: flink + component: taskmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: taskmanager + image: ghcr.io/cau-se/theodolite-uc1-beam-flink:latest + args: ["taskmanager"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + # - name: PARALLELISM + # value: "1" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + # - name: TASK_MANAGER_NUMBER_OF_TASK_SLOTS + # value: "1" #TODO + # - name: FLINK_PROPERTIES + # value: |+ + # blob.server.port: 6124 + # jobmanager.rpc.port: 6123 + # taskmanager.rpc.port: 6122 + # queryable-state.proxy.ports: 6125 + # jobmanager.memory.process.size: 4Gb + # taskmanager.memory.process.size: 4Gb + # #parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6122 + name: rpc + - containerPort: 6125 + name: query-state + - containerPort: 9249 + name: metrics + # livenessProbe: + # tcpSocket: + # port: 6122 + # initialDelaySeconds: 30 + # periodSeconds: 60 + # volumeMounts: + # - name: flink-config-volume-rw + # mountPath: /opt/flink/conf/ + securityContext: + runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary + # initContainers: + # - name: init-taskmanager + # image: busybox:1.28 + # command: ['cp', '-a', '/flink-config/.', '/flink-config-rw/'] + # volumeMounts: + # - name: flink-config-volume + # mountPath: /flink-config/ + # - name: flink-config-volume-rw + # mountPath: /flink-config-rw/ + # volumes: + # - name: flink-config-volume + # configMap: + # name: flink-config + # items: + # - key: flink-conf.yaml + # path: flink-conf.yaml + # - key: log4j-console.properties + # path: log4j-console.properties + # - name: flink-config-volume-rw + # emptyDir: {} diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-service.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2e27f64af1cfd1a26da142b8a50bb41c8ba5fcb --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/resources/taskmanager-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-taskmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: metrics + port: 9249 + selector: + app: flink + component: taskmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-beam-flink/uc1-beam-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-beam-flink/uc1-beam-flink-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2e110abfc13e1537792da381de2260fb3adbd606 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-flink/uc1-beam-flink-benchmark-operator.yaml @@ -0,0 +1,57 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc1-beam-flink +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc1-beam-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-load-generator" + files: + - "uc1-load-generator-deployment.yaml" + - "uc1-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "taskmanager-deployment.yaml" + - type: "EnvVarPatcher" + resource: "jobmanager-deployment.yaml" + properties: + container: "jobmanager" + variableName: "PARALLELISM" + - type: "EnvVarPatcher" # required? + resource: "taskmanager-deployment.yaml" + properties: + container: "taskmanager" + variableName: "PARALLELISM" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc1-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc1-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-beam-samza/resources/beam-samza-service.yaml b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/beam-samza-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6317caf9fe624e42449b8f630d040a068709cda3 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/beam-samza-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: titan-ccp-aggregation + labels: + app: titan-ccp-aggregation +spec: + #type: NodePort + selector: + app: titan-ccp-aggregation + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + - name: metrics + port: 5556 diff --git a/theodolite-benchmarks/definitions/uc1-beam-samza/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7e758cacb5086305efa26292ddef2afc958096 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: titan-ccp-aggregation + appScope: titan-ccp + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc1-beam-samza/resources/uc1-beam-samza-deployment.yaml b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/uc1-beam-samza-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..607767382b4b2fce406fe3820c0f8c6ed1cef777 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-samza/resources/uc1-beam-samza-deployment.yaml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + replicas: 1 + template: + metadata: + labels: + app: titan-ccp-aggregation + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: uc1-beam-samza + image: ghcr.io/cau-se/theodolite-uc1-beam-samza:latest + env: + - name: SAMZA_JOB_COORDINATOR_ZK_CONNECT + value: "theodolite-kafka-zoo-entrance:2181" + - name: SAMZA_SYSTEMS_KAFKA_PRODUCER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SAMZA_SYSTEMS_KAFKA_CONSUMER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: MAX_SOURCE_PARALLELISM + value: "1024" + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + # - name: JAVA_OPTS + # value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555" + - name: COMMIT_INTERVAL_MS # Set as default for the applications + value: "100" + resources: + limits: + memory: 4Gi + cpu: 1000m + # - name: prometheus-jmx-exporter + # image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143" + # command: + # - java + # - -XX:+UnlockExperimentalVMOptions + # - -XX:+UseCGroupMemoryLimitForHeap + # - -XX:MaxRAMFraction=1 + # - -XshowSettings:vm + # - -jar + # - jmx_prometheus_httpserver.jar + # - "5556" + # - /etc/jmx-aggregation/jmx-kafka-prometheus.yml + # ports: + # - containerPort: 5556 + # volumeMounts: + # - name: jmx-config + # mountPath: /etc/jmx-aggregation + # volumes: + # - name: jmx-config + # configMap: + # name: uc1-jmx-configmap \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-beam-samza/uc1-beam-samza-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-beam-samza/uc1-beam-samza-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..46030c67b135c97fcefe99482bd511f0c8138a0e --- /dev/null +++ b/theodolite-benchmarks/definitions/uc1-beam-samza/uc1-beam-samza-benchmark-operator.yaml @@ -0,0 +1,56 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc1-beam-samza +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc1-beam-samza" + files: + - "uc1-beam-samza-deployment.yaml" + - "beam-samza-service.yaml" + - "service-monitor.yaml" + afterActions: + - selector: # delete zookeeper nodes to reset zookeeper + pod: + matchLabels: + app: "zookeeper-client" + container: "zookeeper-client" + exec: + command: ["bash", "-c", "bin/zkCli.sh -server $ZOOKEEPER_SERVER deleteall /app-theodolite-uc1-application-1"] + timeoutSeconds: 60 + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-load-generator" + files: + - "uc1-load-generator-deployment.yaml" + - "uc1-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "uc1-beam-samza-deployment.yaml" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc1-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc1-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: ".*samza.*" + removeOnly: true + - name: ".*uc1-application.*" + removeOnly: true \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc1-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc1-flink/resources/jobmanager-deployment.yaml index f81b851aa935408112e2a2fadbb72046720068c6..8e0114f17ae085057382eee597ad275c6fc0329d 100644 --- a/theodolite-benchmarks/definitions/uc1-flink/resources/jobmanager-deployment.yaml +++ b/theodolite-benchmarks/definitions/uc1-flink/resources/jobmanager-deployment.yaml @@ -46,7 +46,7 @@ spec: limits: memory: 4Gi cpu: 1000m - args: ["standalone-job", "--job-classname", "theodolite.uc1.application.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc1.flink.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] #command: ['sleep', '60m'] ports: - containerPort: 6123 diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/flink-configuration-configmap.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/flink-configuration-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..36178e2bebdac96b8648bd6c299009aa49d3fff6 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/flink-configuration-configmap.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: flink-config + labels: + app: flink +data: + flink-conf.yaml: |+ + jobmanager.rpc.address: flink-jobmanager + taskmanager.numberOfTaskSlots: 1 #TODO + #blob.server.port: 6124 + #jobmanager.rpc.port: 6123 + #taskmanager.rpc.port: 6122 + #queryable-state.proxy.ports: 6125 + #jobmanager.memory.process.size: 4Gb + #taskmanager.memory.process.size: 4Gb + #parallelism.default: 1 #TODO + metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter + metrics.reporter.prom.interval: 10 SECONDS + taskmanager.network.detailed-metrics: true + # -> gives metrics about inbound/outbound network queue lengths + log4j-console.properties: |+ + # This affects logging for both user code and Flink + rootLogger.level = INFO + rootLogger.appenderRef.console.ref = ConsoleAppender + rootLogger.appenderRef.rolling.ref = RollingFileAppender + + # Uncomment this if you want to _only_ change Flink's logging + #logger.flink.name = org.apache.flink + #logger.flink.level = INFO + + # The following lines keep the log level of common libraries/connectors on + # log level INFO. The root logger does not override this. You have to manually + # change the log levels here. + logger.akka.name = akka + logger.akka.level = INFO + logger.kafka.name= org.apache.kafka + logger.kafka.level = INFO + logger.hadoop.name = org.apache.hadoop + logger.hadoop.level = INFO + logger.zookeeper.name = org.apache.zookeeper + logger.zookeeper.level = INFO + + # Log all infos to the console + appender.console.name = ConsoleAppender + appender.console.type = CONSOLE + appender.console.layout.type = PatternLayout + appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + + # Log all infos in the given rolling file + appender.rolling.name = RollingFileAppender + appender.rolling.type = RollingFile + appender.rolling.append = false + appender.rolling.fileName = ${sys:log.file} + appender.rolling.filePattern = ${sys:log.file}.%i + appender.rolling.layout.type = PatternLayout + appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + appender.rolling.policies.type = Policies + appender.rolling.policies.size.type = SizeBasedTriggeringPolicy + appender.rolling.policies.size.size=100MB + appender.rolling.strategy.type = DefaultRolloverStrategy + appender.rolling.strategy.max = 10 + + # Suppress the irrelevant (wrong) warnings from the Netty channel handler + logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline + logger.netty.level = OFF \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..79d69aa0cfe77d80e70ff9f1d146790bce0c4577 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-deployment.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-jobmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: jobmanager + template: + metadata: + labels: + app: flink + component: jobmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: jobmanager + image: ghcr.io/cau-se/theodolite-uc2-beam-flink:latest + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc2.beam.flink.Uc2BeamFlink", + "--parallelism=$(PARALLELISM)", + "--disableMetrics=true", + "--fasterCopy"] + # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: PARALLELISM + value: "1" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + - name: FLINK_PROPERTIES + value: |+ + blob.server.port: 6124 + jobmanager.rpc.port: 6123 + taskmanager.rpc.port: 6122 + queryable-state.proxy.ports: 6125 + jobmanager.memory.process.size: 4Gb + taskmanager.memory.process.size: 4Gb + parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6123 + name: rpc + - containerPort: 6124 + name: blob-server + - containerPort: 8081 + name: webui + - containerPort: 9249 + name: metrics + livenessProbe: + tcpSocket: + port: 6123 + initialDelaySeconds: 30 + periodSeconds: 60 + securityContext: + runAsUser: 9999 diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-rest-service.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-rest-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3d74aaf7f625c6922e2e1b4f20c19e50a39b68ac --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-rest-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager-rest +spec: + type: NodePort + ports: + - name: rest + port: 8081 + targetPort: 8081 + nodePort: 30081 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-service.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2ff5d9898eb1ebf5db9a827472a47514ab1473c --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/jobmanager-service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: rpc + port: 6123 + - name: blob-server + port: 6124 + - name: webui + port: 8081 + - name: metrics + port: 9249 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02f78823c627e27ddfe1db5eac3f6a7f7a7f1bf8 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: flink + appScope: titan-ccp + name: flink +spec: + selector: + matchLabels: + app: flink + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86e17e96e83f991bd0b6c7bd4576d100c9222cb1 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-taskmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: taskmanager + template: + metadata: + labels: + app: flink + component: taskmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: taskmanager + image: ghcr.io/cau-se/theodolite-uc2-beam-flink:latest + args: ["taskmanager"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + # - name: TASK_MANAGER_NUMBER_OF_TASK_SLOTS + # value: "1" #TODO + # - name: FLINK_PROPERTIES + # value: |+ + # blob.server.port: 6124 + # jobmanager.rpc.port: 6123 + # taskmanager.rpc.port: 6122 + # queryable-state.proxy.ports: 6125 + # jobmanager.memory.process.size: 4Gb + # taskmanager.memory.process.size: 4Gb + # #parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6122 + name: rpc + - containerPort: 6125 + name: query-state + - containerPort: 9249 + name: metrics + # livenessProbe: + # tcpSocket: + # port: 6122 + # initialDelaySeconds: 30 + # periodSeconds: 60 + securityContext: + runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary + diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-service.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2e27f64af1cfd1a26da142b8a50bb41c8ba5fcb --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/resources/taskmanager-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-taskmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: metrics + port: 9249 + selector: + app: flink + component: taskmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-flink/uc2-beam-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-beam-flink/uc2-beam-flink-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ffe613b401301e00cb1d368ec44609210d299df1 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-flink/uc2-beam-flink-benchmark-operator.yaml @@ -0,0 +1,62 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc2-beam-flink +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc2-beam-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc2-load-generator" + files: + - "uc2-load-generator-deployment.yaml" + - "uc2-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "taskmanager-deployment.yaml" + - type: "EnvVarPatcher" + resource: "jobmanager-deployment.yaml" + properties: + container: "jobmanager" + variableName: "PARALLELISM" + - type: "EnvVarPatcher" # required? + resource: "taskmanager-deployment.yaml" + properties: + container: "taskmanager" + variableName: "PARALLELISM" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc2-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc2-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: "theodolite-.*" + removeOnly: True \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-samza/resources/beam-samza-service.yaml b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/beam-samza-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6317caf9fe624e42449b8f630d040a068709cda3 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/beam-samza-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: titan-ccp-aggregation + labels: + app: titan-ccp-aggregation +spec: + #type: NodePort + selector: + app: titan-ccp-aggregation + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + - name: metrics + port: 5556 diff --git a/theodolite-benchmarks/definitions/uc2-beam-samza/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7e758cacb5086305efa26292ddef2afc958096 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: titan-ccp-aggregation + appScope: titan-ccp + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc2-beam-samza/resources/uc2-beam-samza-deployment.yaml b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/uc2-beam-samza-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bcb7d82ed463a194fb0851287487a6d52cfd0198 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-samza/resources/uc2-beam-samza-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + replicas: 1 + template: + metadata: + labels: + app: titan-ccp-aggregation + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: uc2-beam-samza + image: ghcr.io/cau-se/theodolite-uc2-beam-samza:latest + env: + - name: SAMZA_JOB_COORDINATOR_ZK_CONNECT + value: "theodolite-kafka-zoo-entrance:2181" + - name: SAMZA_SYSTEMS_KAFKA_PRODUCER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SAMZA_SYSTEMS_KAFKA_CONSUMER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: MAX_SOURCE_PARALLELISM + value: "1024" + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS # Set as default for the applications + value: "100" + resources: + limits: + memory: 4Gi + cpu: 1000m \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-beam-samza/uc2-beam-samza-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-beam-samza/uc2-beam-samza-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..46b61aaeaead664d6ed723278384c1bdf8b99ed1 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc2-beam-samza/uc2-beam-samza-benchmark-operator.yaml @@ -0,0 +1,59 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc2-beam-samza +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc2-beam-samza" + files: + - "uc2-beam-samza-deployment.yaml" + - "beam-samza-service.yaml" + - "service-monitor.yaml" + afterActions: + - selector: # delete zookeeper nodes to reset zookeeper + pod: + matchLabels: + app: "zookeeper-client" + container: "zookeeper-client" + exec: + command: ["bash", "-c", "bin/zkCli.sh -server $ZOOKEEPER_SERVER deleteall /app-theodolite-uc2-application-1"] + timeoutSeconds: 60 + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc2-load-generator" + files: + - "uc2-load-generator-deployment.yaml" + - "uc2-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "uc2-beam-samza-deployment.yaml" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc2-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc2-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: ".*samza.*" + removeOnly: true + - name: ".*uc2-application.*" + removeOnly: true \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc2-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc2-flink/resources/jobmanager-deployment.yaml index ab8816fbf82dde2d71705f5d6977d045fe20f4f5..f2fc1ee6a3fa01d367c52505c49bda1e58ddc134 100644 --- a/theodolite-benchmarks/definitions/uc2-flink/resources/jobmanager-deployment.yaml +++ b/theodolite-benchmarks/definitions/uc2-flink/resources/jobmanager-deployment.yaml @@ -46,7 +46,7 @@ spec: limits: memory: 4Gi cpu: 1000m - args: ["standalone-job", "--job-classname", "theodolite.uc2.application.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc2.flink.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] #command: ['sleep', '60m'] ports: - containerPort: 6123 diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/flink-configuration-configmap.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/flink-configuration-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..36178e2bebdac96b8648bd6c299009aa49d3fff6 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/flink-configuration-configmap.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: flink-config + labels: + app: flink +data: + flink-conf.yaml: |+ + jobmanager.rpc.address: flink-jobmanager + taskmanager.numberOfTaskSlots: 1 #TODO + #blob.server.port: 6124 + #jobmanager.rpc.port: 6123 + #taskmanager.rpc.port: 6122 + #queryable-state.proxy.ports: 6125 + #jobmanager.memory.process.size: 4Gb + #taskmanager.memory.process.size: 4Gb + #parallelism.default: 1 #TODO + metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter + metrics.reporter.prom.interval: 10 SECONDS + taskmanager.network.detailed-metrics: true + # -> gives metrics about inbound/outbound network queue lengths + log4j-console.properties: |+ + # This affects logging for both user code and Flink + rootLogger.level = INFO + rootLogger.appenderRef.console.ref = ConsoleAppender + rootLogger.appenderRef.rolling.ref = RollingFileAppender + + # Uncomment this if you want to _only_ change Flink's logging + #logger.flink.name = org.apache.flink + #logger.flink.level = INFO + + # The following lines keep the log level of common libraries/connectors on + # log level INFO. The root logger does not override this. You have to manually + # change the log levels here. + logger.akka.name = akka + logger.akka.level = INFO + logger.kafka.name= org.apache.kafka + logger.kafka.level = INFO + logger.hadoop.name = org.apache.hadoop + logger.hadoop.level = INFO + logger.zookeeper.name = org.apache.zookeeper + logger.zookeeper.level = INFO + + # Log all infos to the console + appender.console.name = ConsoleAppender + appender.console.type = CONSOLE + appender.console.layout.type = PatternLayout + appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + + # Log all infos in the given rolling file + appender.rolling.name = RollingFileAppender + appender.rolling.type = RollingFile + appender.rolling.append = false + appender.rolling.fileName = ${sys:log.file} + appender.rolling.filePattern = ${sys:log.file}.%i + appender.rolling.layout.type = PatternLayout + appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + appender.rolling.policies.type = Policies + appender.rolling.policies.size.type = SizeBasedTriggeringPolicy + appender.rolling.policies.size.size=100MB + appender.rolling.strategy.type = DefaultRolloverStrategy + appender.rolling.strategy.max = 10 + + # Suppress the irrelevant (wrong) warnings from the Netty channel handler + logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline + logger.netty.level = OFF \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c44f32f0846de4b32afeba2344abcd6f805c38b2 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-deployment.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-jobmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: jobmanager + template: + metadata: + labels: + app: flink + component: jobmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: jobmanager + image: ghcr.io/cau-se/theodolite-uc3-beam-flink:latest + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc3.beam.flink.Uc3BeamFlink", + "--parallelism=$(PARALLELISM)", + "--disableMetrics=true", + "--fasterCopy"] + # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: PARALLELISM + value: "1" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + - name: FLINK_PROPERTIES + value: |+ + blob.server.port: 6124 + jobmanager.rpc.port: 6123 + taskmanager.rpc.port: 6122 + queryable-state.proxy.ports: 6125 + jobmanager.memory.process.size: 4Gb + taskmanager.memory.process.size: 4Gb + parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6123 + name: rpc + - containerPort: 6124 + name: blob-server + - containerPort: 8081 + name: webui + - containerPort: 9249 + name: metrics + livenessProbe: + tcpSocket: + port: 6123 + initialDelaySeconds: 30 + periodSeconds: 60 + securityContext: + runAsUser: 9999 diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-rest-service.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-rest-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3d74aaf7f625c6922e2e1b4f20c19e50a39b68ac --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-rest-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager-rest +spec: + type: NodePort + ports: + - name: rest + port: 8081 + targetPort: 8081 + nodePort: 30081 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-service.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2ff5d9898eb1ebf5db9a827472a47514ab1473c --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/jobmanager-service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: rpc + port: 6123 + - name: blob-server + port: 6124 + - name: webui + port: 8081 + - name: metrics + port: 9249 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02f78823c627e27ddfe1db5eac3f6a7f7a7f1bf8 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: flink + appScope: titan-ccp + name: flink +spec: + selector: + matchLabels: + app: flink + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a0a840fad96fa21212bb25c78a597ea5cb41558c --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-taskmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: taskmanager + template: + metadata: + labels: + app: flink + component: taskmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: taskmanager + image: ghcr.io/cau-se/theodolite-uc3-beam-flink:latest + args: ["taskmanager"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + # - name: TASK_MANAGER_NUMBER_OF_TASK_SLOTS + # value: "1" #TODO + # - name: FLINK_PROPERTIES + # value: |+ + # blob.server.port: 6124 + # jobmanager.rpc.port: 6123 + # taskmanager.rpc.port: 6122 + # queryable-state.proxy.ports: 6125 + # jobmanager.memory.process.size: 4Gb + # taskmanager.memory.process.size: 4Gb + # #parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6122 + name: rpc + - containerPort: 6125 + name: query-state + - containerPort: 9249 + name: metrics + # livenessProbe: + # tcpSocket: + # port: 6122 + # initialDelaySeconds: 30 + # periodSeconds: 60 + securityContext: + runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary + diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-service.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2e27f64af1cfd1a26da142b8a50bb41c8ba5fcb --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/resources/taskmanager-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-taskmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: metrics + port: 9249 + selector: + app: flink + component: taskmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-flink/uc3-beam-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-beam-flink/uc3-beam-flink-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4449252c0de5aa81c3069b65c19325256bab57e9 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-flink/uc3-beam-flink-benchmark-operator.yaml @@ -0,0 +1,62 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc3-beam-flink +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc3-beam-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc3-load-generator" + files: + - "uc3-load-generator-deployment.yaml" + - "uc3-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "taskmanager-deployment.yaml" + - type: "EnvVarPatcher" + resource: "jobmanager-deployment.yaml" + properties: + container: "jobmanager" + variableName: "PARALLELISM" + - type: "EnvVarPatcher" # required? + resource: "taskmanager-deployment.yaml" + properties: + container: "taskmanager" + variableName: "PARALLELISM" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc3-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc3-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: "theodolite-.*" + removeOnly: True \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-samza/resources/beam-samza-service.yaml b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/beam-samza-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6317caf9fe624e42449b8f630d040a068709cda3 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/beam-samza-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: titan-ccp-aggregation + labels: + app: titan-ccp-aggregation +spec: + #type: NodePort + selector: + app: titan-ccp-aggregation + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + - name: metrics + port: 5556 diff --git a/theodolite-benchmarks/definitions/uc3-beam-samza/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7e758cacb5086305efa26292ddef2afc958096 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: titan-ccp-aggregation + appScope: titan-ccp + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc3-beam-samza/resources/uc3-beam-samza-deployment.yaml b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/uc3-beam-samza-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..aff9da6a0f7ee490a94a6f9954c2b3cc8a2b5ed5 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-samza/resources/uc3-beam-samza-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + replicas: 1 + template: + metadata: + labels: + app: titan-ccp-aggregation + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: uc3-beam-samza + image: ghcr.io/cau-se/theodolite-uc3-beam-samza:latest + env: + - name: SAMZA_JOB_COORDINATOR_ZK_CONNECT + value: "theodolite-kafka-zoo-entrance:2181" + - name: SAMZA_SYSTEMS_KAFKA_PRODUCER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SAMZA_SYSTEMS_KAFKA_CONSUMER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: MAX_SOURCE_PARALLELISM + value: "1024" + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS # Set as default for the applications + value: "100" + resources: + limits: + memory: 4Gi + cpu: 1000m \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-beam-samza/uc3-beam-samza-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-beam-samza/uc3-beam-samza-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..36d812d4ca1fd226c7edcd96472b5aefff26bfda --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-beam-samza/uc3-beam-samza-benchmark-operator.yaml @@ -0,0 +1,59 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc3-beam-samza +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc3-beam-samza" + files: + - "uc3-beam-samza-deployment.yaml" + - "beam-samza-service.yaml" + - "service-monitor.yaml" + afterActions: + - selector: # delete zookeeper nodes to reset zookeeper + pod: + matchLabels: + app: "zookeeper-client" + container: "zookeeper-client" + exec: + command: ["bash", "-c", "bin/zkCli.sh -server $ZOOKEEPER_SERVER deleteall /app-theodolite-uc3-application-1"] + timeoutSeconds: 60 + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc3-load-generator" + files: + - "uc3-load-generator-deployment.yaml" + - "uc3-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "uc3-beam-samza-deployment.yaml" + loadTypes: + - typeName: "NumSensors" + patchers: + - type: "EnvVarPatcher" + resource: "uc3-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_SENSORS" + - type: NumSensorsLoadGeneratorReplicaPatcher + resource: "uc3-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: ".*samza.*" + removeOnly: true + - name: ".*uc3-application.*" + removeOnly: true \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc3-flink/resources/jobmanager-deployment.yaml index 2b3f33e3748dab0fd62747ff1f0caeb768dcd4e2..620e9d89fb7aba54de9c3a7874dd804050c36191 100644 --- a/theodolite-benchmarks/definitions/uc3-flink/resources/jobmanager-deployment.yaml +++ b/theodolite-benchmarks/definitions/uc3-flink/resources/jobmanager-deployment.yaml @@ -46,7 +46,7 @@ spec: limits: memory: 4Gi cpu: 1000m - args: ["standalone-job", "--job-classname", "theodolite.uc3.application.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc3.flinks.uc3.flink.HistoryServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] #command: ['sleep', '60m'] ports: - containerPort: 6123 diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/flink-configuration-configmap.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/flink-configuration-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..36178e2bebdac96b8648bd6c299009aa49d3fff6 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/flink-configuration-configmap.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: flink-config + labels: + app: flink +data: + flink-conf.yaml: |+ + jobmanager.rpc.address: flink-jobmanager + taskmanager.numberOfTaskSlots: 1 #TODO + #blob.server.port: 6124 + #jobmanager.rpc.port: 6123 + #taskmanager.rpc.port: 6122 + #queryable-state.proxy.ports: 6125 + #jobmanager.memory.process.size: 4Gb + #taskmanager.memory.process.size: 4Gb + #parallelism.default: 1 #TODO + metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter + metrics.reporter.prom.interval: 10 SECONDS + taskmanager.network.detailed-metrics: true + # -> gives metrics about inbound/outbound network queue lengths + log4j-console.properties: |+ + # This affects logging for both user code and Flink + rootLogger.level = INFO + rootLogger.appenderRef.console.ref = ConsoleAppender + rootLogger.appenderRef.rolling.ref = RollingFileAppender + + # Uncomment this if you want to _only_ change Flink's logging + #logger.flink.name = org.apache.flink + #logger.flink.level = INFO + + # The following lines keep the log level of common libraries/connectors on + # log level INFO. The root logger does not override this. You have to manually + # change the log levels here. + logger.akka.name = akka + logger.akka.level = INFO + logger.kafka.name= org.apache.kafka + logger.kafka.level = INFO + logger.hadoop.name = org.apache.hadoop + logger.hadoop.level = INFO + logger.zookeeper.name = org.apache.zookeeper + logger.zookeeper.level = INFO + + # Log all infos to the console + appender.console.name = ConsoleAppender + appender.console.type = CONSOLE + appender.console.layout.type = PatternLayout + appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + + # Log all infos in the given rolling file + appender.rolling.name = RollingFileAppender + appender.rolling.type = RollingFile + appender.rolling.append = false + appender.rolling.fileName = ${sys:log.file} + appender.rolling.filePattern = ${sys:log.file}.%i + appender.rolling.layout.type = PatternLayout + appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n + appender.rolling.policies.type = Policies + appender.rolling.policies.size.type = SizeBasedTriggeringPolicy + appender.rolling.policies.size.size=100MB + appender.rolling.strategy.type = DefaultRolloverStrategy + appender.rolling.strategy.max = 10 + + # Suppress the irrelevant (wrong) warnings from the Netty channel handler + logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline + logger.netty.level = OFF \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fb54893cc8dcea45fd6c657d25eb97b40399a29e --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-deployment.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-jobmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: jobmanager + template: + metadata: + labels: + app: flink + component: jobmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: jobmanager + image: ghcr.io/cau-se/theodolite-uc4-beam-flink:latest + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc4.beam.flink.Uc4BeamFlink", + "--parallelism=$(PARALLELISM)", + "--disableMetrics=true", + "--fasterCopy"] + # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: PARALLELISM + value: "1" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + - name: FLINK_PROPERTIES + value: |+ + blob.server.port: 6124 + jobmanager.rpc.port: 6123 + taskmanager.rpc.port: 6122 + queryable-state.proxy.ports: 6125 + jobmanager.memory.process.size: 4Gb + taskmanager.memory.process.size: 4Gb + parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6123 + name: rpc + - containerPort: 6124 + name: blob-server + - containerPort: 8081 + name: webui + - containerPort: 9249 + name: metrics + livenessProbe: + tcpSocket: + port: 6123 + initialDelaySeconds: 30 + periodSeconds: 60 + securityContext: + runAsUser: 9999 diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-rest-service.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-rest-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3d74aaf7f625c6922e2e1b4f20c19e50a39b68ac --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-rest-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager-rest +spec: + type: NodePort + ports: + - name: rest + port: 8081 + targetPort: 8081 + nodePort: 30081 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-service.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e2ff5d9898eb1ebf5db9a827472a47514ab1473c --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/jobmanager-service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-jobmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: rpc + port: 6123 + - name: blob-server + port: 6124 + - name: webui + port: 8081 + - name: metrics + port: 9249 + selector: + app: flink + component: jobmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02f78823c627e27ddfe1db5eac3f6a7f7a7f1bf8 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: flink + appScope: titan-ccp + name: flink +spec: + selector: + matchLabels: + app: flink + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5eabd7d52875b8ea556a4b47fde18cf859a279b7 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flink-taskmanager +spec: + replicas: 1 + selector: + matchLabels: + app: flink + component: taskmanager + template: + metadata: + labels: + app: flink + component: taskmanager + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: taskmanager + image: ghcr.io/cau-se/theodolite-uc4-beam-flink:latest + args: ["taskmanager"] + env: + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS + value: "100" + - name: CHECKPOINTING + value: "false" + - name: "FLINK_STATE_BACKEND" + value: "rocksdb" + - name: JOB_MANAGER_RPC_ADDRESS + value: "flink-jobmanager" + # - name: TASK_MANAGER_NUMBER_OF_TASK_SLOTS + # value: "1" #TODO + # - name: FLINK_PROPERTIES + # value: |+ + # blob.server.port: 6124 + # jobmanager.rpc.port: 6123 + # taskmanager.rpc.port: 6122 + # queryable-state.proxy.ports: 6125 + # jobmanager.memory.process.size: 4Gb + # taskmanager.memory.process.size: 4Gb + # #parallelism.default: 1 #TODO + resources: + limits: + memory: 4Gi + cpu: 1000m + ports: + - containerPort: 6122 + name: rpc + - containerPort: 6125 + name: query-state + - containerPort: 9249 + name: metrics + # livenessProbe: + # tcpSocket: + # port: 6122 + # initialDelaySeconds: 30 + # periodSeconds: 60 + securityContext: + runAsUser: 9999 # refers to user _flink_ from official flink image, change if necessary + diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-service.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2e27f64af1cfd1a26da142b8a50bb41c8ba5fcb --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/resources/taskmanager-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: flink-taskmanager + labels: + app: flink +spec: + type: ClusterIP + ports: + - name: metrics + port: 9249 + selector: + app: flink + component: taskmanager \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-flink/uc4-beam-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-beam-flink/uc4-beam-flink-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..738b1c837469a9272bf27d4df08d6e5242b1a4c2 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-flink/uc4-beam-flink-benchmark-operator.yaml @@ -0,0 +1,69 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc4-beam-flink +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc4-beam-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc4-load-generator" + files: + - "uc4-load-generator-deployment.yaml" + - "uc4-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "taskmanager-deployment.yaml" + - type: "EnvVarPatcher" + resource: "jobmanager-deployment.yaml" + properties: + container: "jobmanager" + variableName: "PARALLELISM" + - type: "EnvVarPatcher" # required? + resource: "taskmanager-deployment.yaml" + properties: + container: "taskmanager" + variableName: "PARALLELISM" + loadTypes: + - typeName: "NumNestedGroups" + patchers: + - type: "EnvVarPatcher" + resource: "uc4-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_NESTED_GROUPS" + - type: NumNestedGroupsLoadGeneratorReplicaPatcher + resource: "uc4-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + numSensors: "4.0" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: "configuration" + numPartitions: 40 + replicationFactor: 1 + - name: "aggregation-feedback" + numPartitions: 40 + replicationFactor: 1 + - name: "theodolite-.*" + removeOnly: True \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-samza/resources/beam-samza-service.yaml b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/beam-samza-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6317caf9fe624e42449b8f630d040a068709cda3 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/beam-samza-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: titan-ccp-aggregation + labels: + app: titan-ccp-aggregation +spec: + #type: NodePort + selector: + app: titan-ccp-aggregation + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + - name: metrics + port: 5556 diff --git a/theodolite-benchmarks/definitions/uc4-beam-samza/resources/service-monitor.yaml b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/service-monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e7e758cacb5086305efa26292ddef2afc958096 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/service-monitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app: titan-ccp-aggregation + appScope: titan-ccp + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + endpoints: + - port: metrics + interval: 10s diff --git a/theodolite-benchmarks/definitions/uc4-beam-samza/resources/uc4-beam-samza-deployment.yaml b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/uc4-beam-samza-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c0602d86207d2e63d3eb549b068b0afe2692df21 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-samza/resources/uc4-beam-samza-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: titan-ccp-aggregation +spec: + selector: + matchLabels: + app: titan-ccp-aggregation + replicas: 1 + template: + metadata: + labels: + app: titan-ccp-aggregation + spec: + terminationGracePeriodSeconds: 0 + containers: + - name: uc4-beam-samza + image: ghcr.io/cau-se/theodolite-uc4-beam-samza:latest + env: + - name: SAMZA_JOB_COORDINATOR_ZK_CONNECT + value: "theodolite-kafka-zoo-entrance:2181" + - name: SAMZA_SYSTEMS_KAFKA_PRODUCER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SAMZA_SYSTEMS_KAFKA_CONSUMER_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: MAX_SOURCE_PARALLELISM + value: "1024" + - name: KAFKA_BOOTSTRAP_SERVERS + value: "theodolite-kafka-kafka-bootstrap:9092" + - name: SCHEMA_REGISTRY_URL + value: "http://theodolite-cp-schema-registry:8081" + - name: COMMIT_INTERVAL_MS # Set as default for the applications + value: "100" + resources: + limits: + memory: 4Gi + cpu: 1000m \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-beam-samza/uc4-beam-samza-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-beam-samza/uc4-beam-samza-benchmark-operator.yaml new file mode 100644 index 0000000000000000000000000000000000000000..12690cec23761a38c948b0cb8757550ded54acef --- /dev/null +++ b/theodolite-benchmarks/definitions/uc4-beam-samza/uc4-beam-samza-benchmark-operator.yaml @@ -0,0 +1,68 @@ +apiVersion: theodolite.com/v1 +kind: benchmark +metadata: + name: uc4-beam-samza +spec: + sut: + resources: + - configMap: + name: "benchmark-resources-uc4-beam-samza" + files: + - "uc4-beam-samza-deployment.yaml" + - "beam-samza-service.yaml" + - "service-monitor.yaml" + afterActions: + - selector: # delete zookeeper nodes to reset zookeeper + pod: + matchLabels: + app: "zookeeper-client" + container: "zookeeper-client" + exec: + command: ["bash", "-c", "bin/zkCli.sh -server $ZOOKEEPER_SERVER deleteall /app-theodolite-uc4-application-1"] + timeoutSeconds: 60 + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc4-load-generator" + files: + - "uc4-load-generator-deployment.yaml" + - "uc4-load-generator-service.yaml" + resourceTypes: + - typeName: "Instances" + patchers: + - type: "ReplicaPatcher" + resource: "uc4-beam-samza-deployment.yaml" + loadTypes: + - typeName: "NumNestedGroups" + patchers: + - type: "EnvVarPatcher" + resource: "uc4-load-generator-deployment.yaml" + properties: + container: "workload-generator" + variableName: "NUM_NESTED_GROUPS" + - type: NumNestedGroupsLoadGeneratorReplicaPatcher + resource: "uc4-load-generator-deployment.yaml" + properties: + loadGenMaxRecords: "150000" + numSensors: "4.0" + kafkaConfig: + bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092" + topics: + - name: "input" + numPartitions: 40 + replicationFactor: 1 + - name: "output" + numPartitions: 40 + replicationFactor: 1 + - name: "configuration" + numPartitions: 40 + replicationFactor: 1 + - name: "aggregation-feedback" + numPartitions: 40 + replicationFactor: 1 + - name: "theodolite-.*" + removeOnly: True + - name: ".*samza.*" + removeOnly: true + - name: ".*uc4-application.*" + removeOnly: true \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc4-flink/resources/jobmanager-deployment.yaml b/theodolite-benchmarks/definitions/uc4-flink/resources/jobmanager-deployment.yaml index 2f6eaecc4fd1aede1b9a5ff2341149d1aa8c5ccd..d1ebf745537bd233ba6e702b2cc4cd919103e7b7 100644 --- a/theodolite-benchmarks/definitions/uc4-flink/resources/jobmanager-deployment.yaml +++ b/theodolite-benchmarks/definitions/uc4-flink/resources/jobmanager-deployment.yaml @@ -46,7 +46,7 @@ spec: limits: memory: 4Gi cpu: 1000m - args: ["standalone-job", "--job-classname", "theodolite.uc4.application.AggregationServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] + args: ["standalone-job", "--job-classname", "rocks.theodolite.benchmarks.uc4.flinks.uc4.flink.AggregationServiceFlinkJob"] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"] #command: ['sleep', '60m'] ports: - containerPort: 6123 diff --git a/theodolite-benchmarks/definitions/uc4-load-generator/resources/uc4-load-generator-deployment.yaml b/theodolite-benchmarks/definitions/uc4-load-generator/resources/uc4-load-generator-deployment.yaml index 0f64fc881b5beb31a6dad4ff2a755413049b96fa..70674757ff97b4377902395868eac2e03070c31a 100644 --- a/theodolite-benchmarks/definitions/uc4-load-generator/resources/uc4-load-generator-deployment.yaml +++ b/theodolite-benchmarks/definitions/uc4-load-generator/resources/uc4-load-generator-deployment.yaml @@ -30,5 +30,7 @@ spec: value: "theodolite-kafka-kafka-bootstrap:9092" - name: SCHEMA_REGISTRY_URL value: "http://theodolite-cp-schema-registry:8081" + - name: NUM_SENSORS + value: "4" - name: NUM_NESTED_GROUPS value: "5" diff --git a/theodolite-benchmarks/docker-test/smoketest-runner.sh b/theodolite-benchmarks/docker-test/smoketest-runner.sh index 3167c90a567eed3cc2678c80c722dbd0b8684f1e..1661560bda9cf164dc19b1b031d9f9c8531345d8 100755 --- a/theodolite-benchmarks/docker-test/smoketest-runner.sh +++ b/theodolite-benchmarks/docker-test/smoketest-runner.sh @@ -19,11 +19,15 @@ else RETURN=$? echo "test.sh does not exists for '$COMPOSE_FILE_PATH'." fi + +docker-compose ps + +docker-compose down + if [ $RETURN -eq 0 ]; then echo "Test for '$COMPOSE_FILE_PATH' has passed." else echo "Test for '$COMPOSE_FILE_PATH' has failed." fi -docker-compose down exit $RETURN diff --git a/theodolite-benchmarks/docker-test/uc1-beam-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc1-beam-flink/docker-compose.yml index 69de6049aca50a6a8e10a9e709b38d322bc8cf61..835c0b316e4f0f65becce4946688cb6b92f83b57 100644 --- a/theodolite-benchmarks/docker-test/uc1-beam-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc1-beam-flink/docker-compose.yml @@ -53,7 +53,7 @@ services: #ports: # - "8080:8081" command: > - standalone-job --job-classname application.Uc1BeamFlink + standalone-job --job-classname rocks.theodolite.benchmarks.uc1.beam.flink.Uc1BeamFlink --disableMetrics=true --fasterCopy environment: diff --git a/theodolite-benchmarks/docker-test/uc1-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc1-flink/docker-compose.yml index 55e359665de56cb03a5049c299761cb07690df30..ee6cb06cce228e107fac93a47401718a24bccecd 100755 --- a/theodolite-benchmarks/docker-test/uc1-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc1-flink/docker-compose.yml @@ -52,7 +52,7 @@ services: image: ghcr.io/cau-se/theodolite-uc1-flink:${THEODOLITE_TAG:-latest} #ports: # - "8080:8081" - command: standalone-job --job-classname theodolite.uc1.application.HistoryServiceFlinkJob + command: standalone-job --job-classname rocks.theodolite.benchmarks.uc1.flink.HistoryServiceFlinkJob environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 - SCHEMA_REGISTRY_URL=http://schema-registry:8081 diff --git a/theodolite-benchmarks/docker-test/uc2-beam-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc2-beam-flink/docker-compose.yml index 79f6f040144d3c4da56d469095ad3ddce90026a2..e92c09e7822acc93554f47b40debb5d4ea7c0f78 100644 --- a/theodolite-benchmarks/docker-test/uc2-beam-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc2-beam-flink/docker-compose.yml @@ -53,7 +53,7 @@ services: #ports: # - "8080:8081" command: > - standalone-job --job-classname application.Uc2BeamFlink + standalone-job --job-classname rocks.theodolite.benchmarks.uc2.beam.flink.Uc2BeamFlink --disableMetrics=true --fasterCopy environment: diff --git a/theodolite-benchmarks/docker-test/uc2-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc2-flink/docker-compose.yml index 1397c8ab0e7bb8d7ee67b7fa9c18143c404fd9ff..a68b8084669c45ead3e08bf493ca32efdb234504 100755 --- a/theodolite-benchmarks/docker-test/uc2-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc2-flink/docker-compose.yml @@ -52,7 +52,7 @@ services: image: ghcr.io/cau-se/theodolite-uc2-flink:${THEODOLITE_TAG:-latest} #ports: # - "8080:8081" - command: standalone-job --job-classname theodolite.uc2.application.HistoryServiceFlinkJob + command: standalone-job --job-classname rocks.theodolite.benchmarks.uc2.flink.HistoryServiceFlinkJob environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 - SCHEMA_REGISTRY_URL=http://schema-registry:8081 diff --git a/theodolite-benchmarks/docker-test/uc3-beam-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc3-beam-flink/docker-compose.yml index e68dc94d4185d789272279e8fa2e5d178ffdd14b..4416517a8db0814234536793bc262530103b45b3 100644 --- a/theodolite-benchmarks/docker-test/uc3-beam-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc3-beam-flink/docker-compose.yml @@ -53,7 +53,7 @@ services: #ports: # - "8080:8081" command: > - standalone-job --job-classname application.Uc3BeamFlink + standalone-job --job-classname rocks.theodolite.benchmarks.uc3.beam.flink.Uc3BeamFlink --disableMetrics=true --fasterCopy environment: diff --git a/theodolite-benchmarks/docker-test/uc3-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc3-flink/docker-compose.yml index 0c83d8a25d19d4989f982d251893635ea1222cb0..3c5aadd8fb6b3b40b009808f55659982dd837f52 100755 --- a/theodolite-benchmarks/docker-test/uc3-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc3-flink/docker-compose.yml @@ -52,7 +52,7 @@ services: image: ghcr.io/cau-se/theodolite-uc3-flink:${THEODOLITE_TAG:-latest} #ports: # - "8080:8081" - command: standalone-job --job-classname theodolite.uc3.application.HistoryServiceFlinkJob + command: standalone-job --job-classname rocks.theodolite.benchmarks.uc3.flink.HistoryServiceFlinkJob environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 - SCHEMA_REGISTRY_URL=http://schema-registry:8081 diff --git a/theodolite-benchmarks/docker-test/uc4-beam-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc4-beam-flink/docker-compose.yml index 2968b718eb06ade4d42bbe104e214d573881ac14..465fcb6ee6a2b2121dfe359140c259e7a3eb763a 100644 --- a/theodolite-benchmarks/docker-test/uc4-beam-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc4-beam-flink/docker-compose.yml @@ -55,7 +55,7 @@ services: # - "8080:8081" command: > standalone-job - --job-classname application.Uc4BeamFlink + --job-classname rocks.theodolite.benchmarks.uc4.beam.flink.Uc4BeamFlink --disableMetrics=true --fasterCopy environment: diff --git a/theodolite-benchmarks/docker-test/uc4-flink/docker-compose.yml b/theodolite-benchmarks/docker-test/uc4-flink/docker-compose.yml index 24e5acdf94d1ba3d5c2807d172ba054309a2ef4a..c3fe0502f36e3b25857186046e5ed6892f07f61f 100755 --- a/theodolite-benchmarks/docker-test/uc4-flink/docker-compose.yml +++ b/theodolite-benchmarks/docker-test/uc4-flink/docker-compose.yml @@ -53,7 +53,7 @@ services: image: ghcr.io/cau-se/theodolite-uc4-flink:${THEODOLITE_TAG:-latest} #ports: # - "8080:8081" - command: standalone-job --job-classname theodolite.uc4.application.AggregationServiceFlinkJob + command: standalone-job --job-classname rocks.theodolite.benchmarks.uc4.flink.AggregationServiceFlinkJob environment: - KAFKA_BOOTSTRAP_SERVERS=kafka:9092 - SCHEMA_REGISTRY_URL=http://schema-registry:8081 diff --git a/theodolite-benchmarks/flink-commons/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/flink-commons/.settings/org.eclipse.jdt.ui.prefs index 174249a98f9d91ce2cbf2bb64b27c09b37f05d9f..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/flink-commons/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/flink-commons/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false sp_cleanup.remove_redundant_semicolons=false -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/flink-commons/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/ConfigurationKeys.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/ConfigurationKeys.java similarity index 90% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/ConfigurationKeys.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/ConfigurationKeys.java index 2847ede440ecd65bdf35fc8e825d0f7b723a3f8f..8fd8fbde288d1750fb1bab2147885d7be6245316 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/ConfigurationKeys.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink; +package rocks.theodolite.benchmarks.commons.flink; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/KafkaConnectorFactory.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/KafkaConnectorFactory.java similarity index 96% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/KafkaConnectorFactory.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/KafkaConnectorFactory.java index 55d73b0fb9274b0ae67468d50b7978799d7e6257..a17403f07b8dcc9d3034222035428ecae6b7f860 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/KafkaConnectorFactory.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/KafkaConnectorFactory.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink; +package rocks.theodolite.benchmarks.commons.flink; import java.time.Duration; import java.util.Properties; @@ -15,8 +15,8 @@ import org.apache.flink.streaming.connectors.kafka.KafkaSerializationSchema; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.serialization.Serde; -import theodolite.commons.flink.serialization.FlinkKafkaKeyValueSerde; -import theodolite.commons.flink.util.SerializableSupplier; +import rocks.theodolite.benchmarks.commons.flink.serialization.FlinkKafkaKeyValueSerde; +import rocks.theodolite.benchmarks.commons.flink.util.SerializableSupplier; /** * A class for creating {@link FlinkKafkaConsumer} and {@link FlinkKafkaProducer}. diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/StateBackends.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/StateBackends.java similarity index 98% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/StateBackends.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/StateBackends.java index a94927e4bf49e1dbe6d109eb8f19f7d292f3d879..0f58c9ae8a16842ee077e7c9d01cf69571f11af4 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/StateBackends.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/StateBackends.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink; +package rocks.theodolite.benchmarks.commons.flink; import java.io.IOException; import org.apache.commons.configuration2.Configuration; diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/TupleType.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/TupleType.java similarity index 92% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/TupleType.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/TupleType.java index 360331e4d1e4fdc47a24ac8ae995b7590301f7fd..fc2249ae36b5be2c2ffdf114a1f6c1ecad3364d1 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/TupleType.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/TupleType.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink; +package rocks.theodolite.benchmarks.commons.flink; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.common.typeinfo.Types; diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/FlinkKafkaKeyValueSerde.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/FlinkKafkaKeyValueSerde.java similarity index 95% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/FlinkKafkaKeyValueSerde.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/FlinkKafkaKeyValueSerde.java index 22f615a6af4caf575af57dbe9b7f989889c4095f..40482a7caf2838e54f42771f743e48cabeeee615 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/FlinkKafkaKeyValueSerde.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/FlinkKafkaKeyValueSerde.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink.serialization; +package rocks.theodolite.benchmarks.commons.flink.serialization; import javax.annotation.Nullable; import org.apache.flink.api.common.typeinfo.TypeInformation; @@ -8,7 +8,7 @@ import org.apache.flink.streaming.connectors.kafka.KafkaSerializationSchema; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.Serde; -import theodolite.commons.flink.util.SerializableSupplier; +import rocks.theodolite.benchmarks.commons.flink.util.SerializableSupplier; /** * A {@link KafkaSerializationSchema} and {@link KafkaDeserializationSchema} for an arbitrary diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/StatsSerializer.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/StatsSerializer.java similarity index 93% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/StatsSerializer.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/StatsSerializer.java index fe74fbe4b9dcb6ce89d10131de1336bfff40a919..881f5870a4dda3085d1391aea016f61018627029 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/serialization/StatsSerializer.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/serialization/StatsSerializer.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink.serialization; +package rocks.theodolite.benchmarks.commons.flink.serialization; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; diff --git a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/util/SerializableSupplier.java b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/util/SerializableSupplier.java similarity index 84% rename from theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/util/SerializableSupplier.java rename to theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/util/SerializableSupplier.java index bcc51a9ef7b8bb0f36398ea401f1d2c898472081..4697e13eaed444a9f23d8ec44deb386f9c542ace 100644 --- a/theodolite-benchmarks/flink-commons/src/main/java/theodolite/commons/flink/util/SerializableSupplier.java +++ b/theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/util/SerializableSupplier.java @@ -1,4 +1,4 @@ -package theodolite.commons.flink.util; +package rocks.theodolite.benchmarks.commons.flink.util; import java.io.Serializable; import java.util.function.Supplier; diff --git a/theodolite-benchmarks/http-bridge/build.gradle b/theodolite-benchmarks/http-bridge/build.gradle index 6bc7c721894e36799015a0f2fb155c9b838238b8..fa98d9fdd602174a945df95321f5e32b8c64052f 100644 --- a/theodolite-benchmarks/http-bridge/build.gradle +++ b/theodolite-benchmarks/http-bridge/build.gradle @@ -6,8 +6,6 @@ plugins { id 'application' } -tasks.distZip.enabled = false - repositories { mavenCentral() maven { @@ -31,3 +29,8 @@ dependencies { testImplementation 'junit:junit:4.12' } + + +tasks.distZip.enabled = false + +mainClassName = "rocks.theodolite.benchmarks.httpbridge.HttpBridge" diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Deserializer.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Deserializer.java similarity index 80% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Deserializer.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Deserializer.java index f25c120d2165c4a1f747fdba32de43d4e4d157a6..80f325691b326a88e5a5033c526c575455bd2cd1 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Deserializer.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Deserializer.java @@ -1,4 +1,4 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; /** * A class for converting objects to strings. diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Endpoint.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Endpoint.java similarity index 92% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Endpoint.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Endpoint.java index 43850d80699a0db0b0fcebd76f625a17f8133f30..ac83574adb74c8d9320ab858673ea009bd3296a1 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/Endpoint.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/Endpoint.java @@ -1,6 +1,6 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; -import theodolite.commons.workloadgeneration.RecordSender; +import rocks.theodolite.benchmarks.loadgenerator.RecordSender; /** * Class describing an endpoint of the {@link HttpBridge}, which converts JSON objects to Java diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/EnvVarHttpBridgeFactory.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/EnvVarHttpBridgeFactory.java similarity index 90% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/EnvVarHttpBridgeFactory.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/EnvVarHttpBridgeFactory.java index 97956b8d47185c90efdc03393c03c8c44aea2335..d3c172ac87221ab03f0171883df26802bf5a3aa9 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/EnvVarHttpBridgeFactory.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/EnvVarHttpBridgeFactory.java @@ -1,10 +1,10 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; import java.util.List; import java.util.Objects; import java.util.Optional; -import theodolite.commons.workloadgeneration.ConfigurationKeys; -import theodolite.commons.workloadgeneration.TitanKafkaSenderFactory; +import rocks.theodolite.benchmarks.loadgenerator.ConfigurationKeys; +import rocks.theodolite.benchmarks.loadgenerator.TitanKafkaSenderFactory; import titan.ccp.model.records.ActivePowerRecord; class EnvVarHttpBridgeFactory { diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/GsonDeserializer.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/GsonDeserializer.java similarity index 92% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/GsonDeserializer.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/GsonDeserializer.java index 42220617546527157d5463d6b9ce9208abc66d58..947e78947c8b381752648ecb53c90dc67da31c7b 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/GsonDeserializer.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/GsonDeserializer.java @@ -1,4 +1,4 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; import com.google.gson.Gson; diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/HttpBridge.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/HttpBridge.java similarity index 89% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/HttpBridge.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/HttpBridge.java index d36e191c8b0a591107de796f511aa853063dff73..3de0bc5947e7b2b38c6cbb4c6527a3532feee28e 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/HttpBridge.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/HttpBridge.java @@ -1,7 +1,7 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; import java.util.List; -import theodolite.commons.workloadgeneration.RecordSender; +import rocks.theodolite.benchmarks.loadgenerator.RecordSender; /** * Class that creates a webserver with potentially multiple {@link Endpoint}s, which receives JSON diff --git a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/JavalinWebServer.java b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/JavalinWebServer.java similarity index 97% rename from theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/JavalinWebServer.java rename to theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/JavalinWebServer.java index e7073a421582d74009f4a89acfcfb816a689acf3..a7c0ee75943c0255432013c3e6cc73c2dde2f3ec 100644 --- a/theodolite-benchmarks/http-bridge/src/main/java/theodolite/commons/httpbridge/JavalinWebServer.java +++ b/theodolite-benchmarks/http-bridge/src/main/java/rocks/theodolite/benchmarks/httpbridge/JavalinWebServer.java @@ -1,4 +1,4 @@ -package theodolite.commons.httpbridge; +package rocks.theodolite.benchmarks.httpbridge; import io.javalin.Javalin; import io.javalin.plugin.metrics.MicrometerPlugin; diff --git a/theodolite-benchmarks/kstreams-commons/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/kstreams-commons/.settings/org.eclipse.jdt.ui.prefs index 713419c8d3d74d3bd7fd05c3e839367753fcdee0..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/kstreams-commons/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/kstreams-commons/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,32 +12,80 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false -cleanup.remove_redundant_semicolons=false +cleanup.remove_redundant_semicolons=true cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false sp_cleanup.remove_redundant_semicolons=false -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/kstreams-commons/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/ConfigurationKeys.java b/theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/ConfigurationKeys.java similarity index 95% rename from theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/ConfigurationKeys.java rename to theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/ConfigurationKeys.java index ca1838b84a4f1b3ddf11ad4dea8e34792371974b..ca74aa7d9fd88a7d3c20589438e0c9454062d2f0 100644 --- a/theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/ConfigurationKeys.java +++ b/theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.commons.kafkastreams; +package rocks.theodolite.benchmarks.commons.kstreams; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/KafkaStreamsBuilder.java b/theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/KafkaStreamsBuilder.java similarity index 98% rename from theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/KafkaStreamsBuilder.java rename to theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/KafkaStreamsBuilder.java index fe3cf484a81ee3561ad17b6b25d218cd011f2d5d..06e8591eebc538fcfaed2db394625d8a6dd8b033 100644 --- a/theodolite-benchmarks/kstreams-commons/src/main/java/theodolite/commons/kafkastreams/KafkaStreamsBuilder.java +++ b/theodolite-benchmarks/kstreams-commons/src/main/java/rocks/theodolite/benchmarks/commons/kstreams/KafkaStreamsBuilder.java @@ -1,4 +1,4 @@ -package theodolite.commons.kafkastreams; +package rocks.theodolite.benchmarks.commons.kstreams; import java.util.Properties; import java.util.function.Function; diff --git a/theodolite-benchmarks/load-generator-commons/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/load-generator-commons/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/load-generator-commons/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/load-generator-commons/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/load-generator-commons/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/BeforeAction.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/BeforeAction.java similarity index 82% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/BeforeAction.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/BeforeAction.java index 56af95d70f762095a6fe090457b7d4b473a43b1a..852d5da827fe5d13572a4e44046a96924badda4e 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/BeforeAction.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/BeforeAction.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; /** * Describes the before action which is executed before every sub experiment. diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ClusterConfig.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ClusterConfig.java similarity index 97% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ClusterConfig.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ClusterConfig.java index 9d84dc67461f98fabdee4c8e0784ad7394d7f108..ae8778db3011b474daf1aff05a0c393ee0febb31 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ClusterConfig.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ClusterConfig.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; /** * Configuration of a load generator cluster. diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ConfigurationKeys.java similarity index 88% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ConfigurationKeys.java index e94a11425eebc8180504a8a4f4ff582116623574..efb7db61cc4c81ec2d1ffd49141d6d70a23dacaa 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/ConfigurationKeys.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; /** * Keys to access configuration parameters. @@ -23,6 +23,8 @@ public final class ConfigurationKeys { public static final String THREADS = "THREADS"; + public static final String DISABLE_DNS_CACHING = "DISABLE_DNS_CACHING"; + public static final String TARGET = "TARGET"; public static final String KAFKA_BOOTSTRAP_SERVERS = "KAFKA_BOOTSTRAP_SERVERS"; @@ -39,12 +41,15 @@ public final class ConfigurationKeys { public static final String HTTP_URL = "HTTP_URL"; + public static final String HTTP_ASYNC = "HTTP_ASYNC"; + public static final String PUBSUB_INPUT_TOPIC = "PUBSUB_INPUT_TOPIC"; public static final String PUBSUB_PROJECT = "PUBSUB_PROJECT"; public static final String PUBSUB_EMULATOR_HOST = "PUBSUB_EMULATOR_HOST"; + private ConfigurationKeys() {} } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/EnvVarLoadGeneratorFactory.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/EnvVarLoadGeneratorFactory.java similarity index 86% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/EnvVarLoadGeneratorFactory.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/EnvVarLoadGeneratorFactory.java index 2901b68d8f3e6fa90cccfe15e7992aca67653f94..29ede821eefe171f377d58fce8d98eee28e8a277 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/EnvVarLoadGeneratorFactory.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/EnvVarLoadGeneratorFactory.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.net.URI; import java.time.Duration; @@ -11,9 +11,19 @@ import titan.ccp.model.records.ActivePowerRecord; class EnvVarLoadGeneratorFactory { + public static final boolean DISABLE_DNS_CACHING_DEFAULT = false; + private static final Logger LOGGER = LoggerFactory.getLogger(EnvVarLoadGeneratorFactory.class); public LoadGenerator create(final LoadGenerator loadGeneratorTemplate) { + + final boolean disableDnsCaching = Boolean.parseBoolean(Objects.requireNonNullElse( + System.getenv(ConfigurationKeys.DISABLE_DNS_CACHING), + Boolean.toString(DISABLE_DNS_CACHING_DEFAULT))); + if (disableDnsCaching) { + this.disableDnsCaching(); + } + final int numSensors = Integer.parseInt(Objects.requireNonNullElse( System.getenv(ConfigurationKeys.NUM_SENSORS), Integer.toString(LoadGenerator.NUMBER_OF_KEYS_DEFAULT))); @@ -32,9 +42,9 @@ class EnvVarLoadGeneratorFactory { .setLoadDefinition(new WorkloadDefinition( new KeySpace(LoadGenerator.SENSOR_PREFIX_DEFAULT, numSensors), Duration.ofMillis(periodMs))) - .setGeneratorConfig(new LoadGeneratorConfig( + .setGeneratorConfig(new LoadGeneratorConfig(GeneratorAction.from( TitanRecordGenerator.forConstantValue(value), - this.buildRecordSender())) + this.buildRecordSender()))) .withThreads(threads); } @@ -109,8 +119,11 @@ class EnvVarLoadGeneratorFactory { Objects.requireNonNullElse( System.getenv(ConfigurationKeys.HTTP_URL), LoadGenerator.HTTP_URI_DEFAULT)); - recordSender = new HttpRecordSender<>(url); - LOGGER.info("Use HTTP server as target with url '{}'.", url); + final boolean async = Boolean.parseBoolean(Objects.requireNonNullElse( + System.getenv(ConfigurationKeys.HTTP_ASYNC), + Boolean.toString(LoadGenerator.HTTP_ASYNC_DEFAULT))); + recordSender = new HttpRecordSender<>(url, async); + LOGGER.info("Use HTTP server as target with URL '{}' and asynchronously: '{}'.", url, async); } else if (target == LoadGeneratorTarget.PUBSUB) { final String project = System.getenv(ConfigurationKeys.PUBSUB_PROJECT); final String inputTopic = Objects.requireNonNullElse( @@ -135,4 +148,9 @@ class EnvVarLoadGeneratorFactory { return recordSender; } + private void disableDnsCaching() { + LOGGER.info("Disable DNS caching."); + java.security.Security.setProperty("networkaddress.cache.ttl", "0"); + } + } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/GeneratorAction.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorAction.java similarity index 60% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/GeneratorAction.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorAction.java index 11a9cbf2d96bc3a02f3972ba23f2167af06a2ec3..fb3bf1c9f802d2af2a0eae72bc58c9e609a6b624 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/GeneratorAction.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorAction.java @@ -1,18 +1,22 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; /** * Interface representing a record generator action consisting of generating a record and sending * it. */ @FunctionalInterface -interface GeneratorAction { +public interface GeneratorAction { void generate(final String key); + default void shutdown() { + // Nothing to do per default + } + public static <T> GeneratorAction from( final RecordGenerator<? extends T> generator, final RecordSender<? super T> sender) { - return key -> sender.send(generator.generate(key)); + return new GeneratorActionImpl<>(generator, sender); } } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorActionImpl.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorActionImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..1d177b7193ee8df8b4d65546cbbcbb6f49a95488 --- /dev/null +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/GeneratorActionImpl.java @@ -0,0 +1,27 @@ +package rocks.theodolite.benchmarks.loadgenerator; + +class GeneratorActionImpl<T> implements GeneratorAction { + + private final RecordGenerator<? extends T> generator; + + private final RecordSender<? super T> sender; + + public GeneratorActionImpl( + final RecordGenerator<? extends T> generator, + final RecordSender<? super T> sender) { + this.generator = generator; + this.sender = sender; + } + + @Override + public void shutdown() { + this.generator.close(); + this.sender.close(); + } + + @Override + public void generate(final String key) { + this.sender.send(this.generator.generate(key)); + } + +} diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunner.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunner.java similarity index 84% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunner.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunner.java index c010492950c5caace9ff85baefee1af4e46d25bb..3b222a332fc76159aedcf82a1753363c7b1e414e 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunner.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunner.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import com.hazelcast.cluster.Member; import com.hazelcast.cluster.MembershipEvent; @@ -36,7 +36,7 @@ public class HazelcastRunner { } /** - * Start the workload generation and blocks until the workload generation is stopped again. + * Start the load generation and blocks until the load generation is stopped again. */ public void runBlocking() { while (!this.stopAction.isDone()) { @@ -52,19 +52,24 @@ public class HazelcastRunner { } public void restart() { - this.stopRunnerState(); + this.stopRunnerStateAsync(); } + /** + * Stop generating load and clean up the entire state. + */ public void stop() { this.stopAction.complete(null); - this.stopRunnerState(); + this.stopRunnerStateAsync().join(); + this.hzInstance.shutdown(); } - private void stopRunnerState() { + private CompletableFuture<Void> stopRunnerStateAsync() { synchronized (this) { if (this.runnerState != null) { - this.runnerState.stopAsync(); + return this.runnerState.stopAsync(); } + return CompletableFuture.completedFuture(null); } } @@ -94,7 +99,9 @@ public class HazelcastRunner { .getJoin(); joinConfig.getMulticastConfig().setEnabled(false); if (cluster.hasBootstrapServer()) { - joinConfig.getTcpIpConfig().addMember(cluster.getBootstrapServer()); + joinConfig.getTcpIpConfig() + .setEnabled(true) + .addMember(cluster.getBootstrapServer()); } else if (cluster.hasKubernetesDnsName()) { joinConfig.getKubernetesConfig() .setEnabled(true) diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunnerStateInstance.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunnerStateInstance.java similarity index 96% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunnerStateInstance.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunnerStateInstance.java index d8fd7de421b88749a2077f81329213ff754e1608..81a6db7329309a8c2b09fb3308cb496c5420a206 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HazelcastRunnerStateInstance.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HazelcastRunnerStateInstance.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import com.google.common.collect.Streams; import com.hazelcast.cluster.Member; @@ -27,6 +27,7 @@ public class HazelcastRunnerStateInstance { private static final Duration TASK_ASSIGNMENT_WAIT_DURATION = Duration.ofMillis(500); private final CompletableFuture<Void> stopAction = new CompletableFuture<>(); + private final CompletableFuture<Void> stopFinished = new CompletableFuture<>(); private LoadGeneratorExecution loadGeneratorExecution; private final LoadGeneratorConfig loadGeneratorConfig; @@ -61,10 +62,12 @@ public class HazelcastRunnerStateInstance { } this.stopAction.join(); this.stopLoadGeneration(); + this.stopFinished.complete(null); } - public void stopAsync() { + public CompletableFuture<Void> stopAsync() { this.stopAction.complete(null); + return this.stopFinished; } private void tryPerformBeforeAction() { diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HttpRecordSender.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSender.java similarity index 82% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HttpRecordSender.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSender.java index 6b7a5db067c8117f046aa0ff1c6f5d56c35c4321..124f11a979f3afad5507db86c68e9eeb42c64eb6 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/HttpRecordSender.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSender.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import com.google.gson.Gson; import java.net.URI; @@ -7,6 +7,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; +import java.time.Duration; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -23,6 +24,8 @@ public class HttpRecordSender<T extends SpecificRecord> implements RecordSender< private static final int HTTP_OK = 200; + private static final Duration CONNECTION_TIMEOUT = Duration.ofSeconds(1); + private static final Logger LOGGER = LoggerFactory.getLogger(HttpRecordSender.class); private final Gson gson = new Gson(); @@ -41,7 +44,17 @@ public class HttpRecordSender<T extends SpecificRecord> implements RecordSender< * @param uri the {@link URI} records should be sent to */ public HttpRecordSender(final URI uri) { - this(uri, true, List.of(HTTP_OK)); + this(uri, false, List.of(HTTP_OK)); + } + + /** + * Create a new {@link HttpRecordSender}. + * + * @param uri the {@link URI} records should be sent to + * @param async whether HTTP requests should be sent asynchronous + */ + public HttpRecordSender(final URI uri, final boolean async) { + this(uri, async, List.of(HTTP_OK)); } /** @@ -63,6 +76,7 @@ public class HttpRecordSender<T extends SpecificRecord> implements RecordSender< final String json = this.gson.toJson(message); final HttpRequest request = HttpRequest.newBuilder() .uri(this.uri) + .timeout(CONNECTION_TIMEOUT) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); final BodyHandler<Void> bodyHandler = BodyHandlers.discarding(); @@ -81,7 +95,7 @@ public class HttpRecordSender<T extends SpecificRecord> implements RecordSender< response.statusCode()); } }); - if (this.async) { + if (this.isSync()) { try { result.get(); } catch (InterruptedException | ExecutionException e) { @@ -90,4 +104,8 @@ public class HttpRecordSender<T extends SpecificRecord> implements RecordSender< } } + private boolean isSync() { + return !this.async; + } + } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSender.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSender.java new file mode 100644 index 0000000000000000000000000000000000000000..56b1946ad78d888fe6e5140fdc373bb2cd3a4ed4 --- /dev/null +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSender.java @@ -0,0 +1,137 @@ +package rocks.theodolite.benchmarks.loadgenerator; + +import java.util.Properties; +import java.util.function.Function; +import org.apache.avro.specific.SpecificRecord; +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerConfig; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.apache.kafka.common.serialization.Serializer; +import org.apache.kafka.common.serialization.StringSerializer; +import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; + +/** + * Sends records to Kafka. + * + * @param <T> Record type to send. + */ +public interface KafkaRecordSender<T> extends RecordSender<T> { + + @Override + public void close(); + + /** + * Creates a builder object for a {@link KafkaRecordSender} based on a Kafka {@link Serializer}. + * + * @param bootstrapServers The server to for accessing Kafka. + * @param topic The topic where to write. + * @param serializer The {@link Serializer} for mapping a value to keys. + */ + public static <T> Builder<T> builderWithSerializer( + final String bootstrapServers, + final String topic, + final Serializer<T> serializer) { + return new Builder<>(bootstrapServers, topic, serializer); + } + + /** + * Creates a Builder object for a {@link KafkaRecordSender} based on a Confluent Schema Registry + * URL. + * + * @param bootstrapServers The Server to for accessing Kafka. + * @param topic The topic where to write. + * @param schemaRegistryUrl URL to the schema registry for avro. + */ + public static <T extends SpecificRecord> Builder<T> builderWithSchemaRegistry( + final String bootstrapServers, + final String topic, + final String schemaRegistryUrl) { + final SchemaRegistryAvroSerdeFactory avroSerdeFactory = + new SchemaRegistryAvroSerdeFactory(schemaRegistryUrl); + return new Builder<>(bootstrapServers, topic, avroSerdeFactory.<T>forValues().serializer()); + } + + /** + * Builder class to build a new {@link KafkaRecordSenderImpl}. + * + * @param <T> Type of the records that should later be send. + */ + public static class Builder<T> { + + private final String bootstrapServers; + private final String topic; + private final Serializer<T> serializer; + private Function<T, String> keyAccessor = x -> ""; // NOPMD + private Function<T, Long> timestampAccessor = x -> null; // NOPMD + private Properties defaultProperties = new Properties(); // NOPMD + + private Builder(final String bootstrapServers, final String topic, + final Serializer<T> serializer) { + this.bootstrapServers = bootstrapServers; + this.topic = topic; + this.serializer = serializer; + } + + public Builder<T> keyAccessor(final Function<T, String> keyAccessor) { + this.keyAccessor = keyAccessor; + return this; + } + + public Builder<T> timestampAccessor(final Function<T, Long> timestampAccessor) { + this.timestampAccessor = timestampAccessor; + return this; + } + + public Builder<T> defaultProperties(final Properties defaultProperties) { + this.defaultProperties = defaultProperties; + return this; + } + + /** + * Create a {@link KafkaRecordSender} from this builder. + */ + public KafkaRecordSender<T> build() { + final Properties properties = new Properties(); + properties.putAll(this.defaultProperties); + properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, this.bootstrapServers); + // properties.put("acks", this.acknowledges); + // properties.put("batch.size", this.batchSize); + // properties.put("linger.ms", this.lingerMs); + // properties.put("buffer.memory", this.bufferMemory); + + return new KafkaRecordSenderImpl<>( + new KafkaProducer<>( + properties, + new StringSerializer(), + this.serializer), + new DefaultRecordFactory<>(), + this.topic, + this.keyAccessor, + this.timestampAccessor); + } + + private static class DefaultRecordFactory<T> implements KafkaRecordFactory<T, String, T> { + + @Override + public ProducerRecord<String, T> create(final String topic, final String key, final T value, + final long timestamp) { + return new ProducerRecord<>(topic, null, timestamp, key, value); + } + + } + } + + /** + * Create Kafka {@link ProducerRecord}s from a topic, a key, a value and a timestamp. + * + * @param <T> type the records should be created from. + * @param <K> key type of the {@link ProducerRecord}s. + * @param <V> value type of the {@link ProducerRecord}s. + */ + public static interface KafkaRecordFactory<T, K, V> { + + ProducerRecord<K, V> create(String topic, String key, T value, long timestamp); + + } + +} diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSenderImpl.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSenderImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..02a4d206b0a2414d5f12f5348f6c1bfc56852281 --- /dev/null +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KafkaRecordSenderImpl.java @@ -0,0 +1,70 @@ +package rocks.theodolite.benchmarks.loadgenerator; + +import java.util.function.Function; +import org.apache.kafka.clients.producer.Producer; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.apache.kafka.common.errors.SerializationException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Sends records to Kafka. + * + * @param <T> Record type to send. + * @param <K> Internal key type for Kafka records. + * @param <V> Internal value type for Kafka records. + */ +/* default */ class KafkaRecordSenderImpl<T, K, V> implements KafkaRecordSender<T> { + + private static final Logger LOGGER = LoggerFactory.getLogger(KafkaRecordSenderImpl.class); + + private final String topic; + + private final Function<T, String> keyAccessor; + + private final Function<T, Long> timestampAccessor; + + private final Producer<K, V> producer; + + private final KafkaRecordFactory<T, K, V> recordFactory; + + /** + * Create a new {@link KafkaRecordSenderImpl}. + */ + protected KafkaRecordSenderImpl( + final Producer<K, V> producer, + final KafkaRecordFactory<T, K, V> recordFactory, + final String topic, + final Function<T, String> keyAccessor, + final Function<T, Long> timestampAccessor) { + this.topic = topic; + this.producer = producer; + this.recordFactory = recordFactory; + this.keyAccessor = keyAccessor; + this.timestampAccessor = timestampAccessor; + } + + @Override + public void close() { + this.producer.close(); + } + + @Override + public void send(final T message) { + final ProducerRecord<K, V> record = this.recordFactory.create( + this.topic, + this.keyAccessor.apply(message), + message, + this.timestampAccessor.apply(message)); + + LOGGER.debug("Send record to Kafka topic {}: {}", this.topic, record); + try { + this.producer.send(record); + } catch (final SerializationException e) { + LOGGER.warn( + "Record could not be serialized and thus not sent to Kafka due to exception. Skipping this record.", // NOCS + e); + } + } + +} diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KeySpace.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KeySpace.java similarity index 78% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KeySpace.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KeySpace.java index 51255d774427a9e00de0d4c921b884022585edab..82dac7b42dc6e16406f32d30f0dc7a372d7af43d 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KeySpace.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/KeySpace.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.io.Serializable; import java.util.Collection; @@ -10,7 +10,7 @@ import java.util.stream.IntStream; */ public class KeySpace implements Serializable { - private static final long serialVersionUID = 7343135392720315515L; // NOPMD + private static final long serialVersionUID = 7343135392720315516L; // NOPMD private final String prefix; private final int min; @@ -18,11 +18,11 @@ public class KeySpace implements Serializable { /** * Create a new key space. All keys will have the prefix {@code prefix}. The remaining part of - * each key will be determined by a number of the interval ({@code min}, {@code max}). + * each key will be determined by a number of the interval [{@code min}, {@code max}). * * @param prefix the prefix to use for all keys * @param min the lower bound (inclusive) to start counting from - * @param max the upper bound (inclusive) to count to + * @param max the upper bound (exclusive) to count to */ public KeySpace(final String prefix, final int min, final int max) { this.prefix = prefix; @@ -31,7 +31,7 @@ public class KeySpace implements Serializable { } public KeySpace(final String prefix, final int numberOfKeys) { - this(prefix, 0, numberOfKeys - 1); + this(prefix, 0, numberOfKeys); } public String getPrefix() { @@ -52,21 +52,21 @@ public class KeySpace implements Serializable { * Get the amount of keys in this {@link KeySpace}. */ public int getCount() { - return this.getMax() - this.getMin() + 1; + return this.max - this.min; } /** * Get all keys in this {@link KeySpace}. */ public Collection<String> getKeys() { - return IntStream.rangeClosed(this.min, this.max) + return IntStream.range(this.min, this.max) .mapToObj(id -> this.prefix + id) .collect(Collectors.toUnmodifiableList()); } @Override public String toString() { - return this.prefix + '[' + this.min + '-' + this.max + ']'; + return this.prefix + '[' + this.min + '-' + this.max + ')'; } } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGenerator.java similarity index 87% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGenerator.java index 1f02a0e0c910f7d1821c92a0fa71f6d08dbbf6ad..27edb97efc335400acf1d6244db0ce384ee20f59 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGenerator.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.time.Duration; import java.util.Objects; @@ -17,6 +17,7 @@ public final class LoadGenerator { public static final LoadGeneratorTarget TARGET_DEFAULT = LoadGeneratorTarget.KAFKA; // Target: HTTP public static final String HTTP_URI_DEFAULT = "http://localhost:8080"; + public static final boolean HTTP_ASYNC_DEFAULT = false; // Target: Kafka public static final String SCHEMA_REGISTRY_URL_DEFAULT = "http://localhost:8081"; public static final String KAFKA_TOPIC_DEFAULT = "input"; // NOCS @@ -78,6 +79,7 @@ public final class LoadGenerator { this.clusterConfig, this.generatorConfig, this.loadDefinition); + Runtime.getRuntime().addShutdownHook(new Thread(() -> runner.stop())); runner.runBlocking(); } @@ -91,11 +93,12 @@ public final class LoadGenerator { new KeySpace(SENSOR_PREFIX_DEFAULT, NUMBER_OF_KEYS_DEFAULT), Duration.ofMillis(PERIOD_MS_DEFAULT))) .setGeneratorConfig(new LoadGeneratorConfig( - TitanRecordGenerator.forConstantValue(VALUE_DEFAULT), - TitanKafkaSenderFactory.forKafkaConfig( - KAFKA_BOOTSTRAP_SERVERS_DEFAULT, - KAFKA_TOPIC_DEFAULT, - SCHEMA_REGISTRY_URL_DEFAULT))); + GeneratorAction.from( + TitanRecordGenerator.forConstantValue(VALUE_DEFAULT), + TitanKafkaSenderFactory.forKafkaConfig( + KAFKA_BOOTSTRAP_SERVERS_DEFAULT, + KAFKA_TOPIC_DEFAULT, + SCHEMA_REGISTRY_URL_DEFAULT)))); } /** diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorConfig.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorConfig.java similarity index 50% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorConfig.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorConfig.java index 4b5fea3e4670315ef47d94669b42a3cca4b5d0ae..e854138b38613ba614c871febcb80cf9c6b059ef 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorConfig.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorConfig.java @@ -1,25 +1,20 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; /** * Configuration of a load generator. */ public class LoadGeneratorConfig { - private final GeneratorAction messageGenerator; + private final GeneratorAction generatorAction; private BeforeAction beforeAction = BeforeAction.doNothing(); private int threads = 1; - public <T> LoadGeneratorConfig( - final RecordGenerator<? extends T> generator, - final RecordSender<? super T> sender) { - this.messageGenerator = GeneratorAction.from(generator, sender); + public LoadGeneratorConfig(final GeneratorAction generatorAction) { + this.generatorAction = generatorAction; } - public <T> LoadGeneratorConfig( - final RecordGenerator<? extends T> generator, - final RecordSender<? super T> sender, - final int threads) { - this(generator, sender); + public LoadGeneratorConfig(final GeneratorAction generatorAction, final int threads) { + this(generatorAction); this.threads = threads; } @@ -37,7 +32,7 @@ public class LoadGeneratorConfig { public LoadGeneratorExecution buildLoadGeneratorExecution( final WorkloadDefinition workloadDefinition) { - return new LoadGeneratorExecution(workloadDefinition, this.messageGenerator, this.threads); + return new LoadGeneratorExecution(workloadDefinition, this.generatorAction, this.threads); } } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorExecution.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorExecution.java similarity index 97% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorExecution.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorExecution.java index e1a2a7e1bea964b5c69a6cd34374d7b0932bac03..809c93c2e4eb85657a4e773f70150fcef8817ed1 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorExecution.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorExecution.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.util.Random; import java.util.concurrent.Executors; diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorTarget.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTarget.java similarity index 91% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorTarget.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTarget.java index 61ae6e86d1be63ca1f4ae3c362122235bb4662f0..2fe7628d0d7611d0877847f5ff288d432feacc11 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGeneratorTarget.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTarget.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.util.stream.Stream; diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/PubSubRecordSender.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/PubSubRecordSender.java similarity index 98% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/PubSubRecordSender.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/PubSubRecordSender.java index ccbeb729236307b26538ee12b1a0e2373a7f0378..ecba6961245651c7420d89c5da9bd1f993972188 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/PubSubRecordSender.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/PubSubRecordSender.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import com.google.api.core.ApiFuture; import com.google.api.gax.core.CredentialsProvider; @@ -55,7 +55,8 @@ public class PubSubRecordSender<T> implements RecordSender<T> { /** * Terminate this {@link PubSubRecordSender} and shutdown the underlying {@link Publisher}. */ - public void terminate() { + @Override + public void close() { this.publisher.shutdown(); try { this.publisher.awaitTermination(SHUTDOWN_TIMEOUT_SEC, TimeUnit.SECONDS); diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordGenerator.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordGenerator.java similarity index 56% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordGenerator.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordGenerator.java index ea6501f38ea57bf6cefb5c76b05f442454ca0d99..05e127eb019cf877cc5df73e09a6f053ef793fc3 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordGenerator.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordGenerator.java @@ -1,4 +1,6 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; + +import java.io.Closeable; /** * This interface describes a function that takes meta information from a string key and produces an @@ -7,8 +9,13 @@ package theodolite.commons.workloadgeneration; * @param <T> the type of the objects that will be generated by the function. */ @FunctionalInterface -public interface RecordGenerator<T> { +public interface RecordGenerator<T> extends Closeable { T generate(final String key); + @Override + default void close() { + // Nothing to do per default + } + } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordSender.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordSender.java similarity index 58% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordSender.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordSender.java index ee57f2f239a34dd6f8f329d47e4d698427e371b0..f1f1bef980f01da4a23b49440be71ba552c13905 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/RecordSender.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/RecordSender.java @@ -1,4 +1,6 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; + +import java.io.Closeable; /** * This interface describes a function that consumes a message {@code T}. This function is dedicated @@ -7,8 +9,13 @@ package theodolite.commons.workloadgeneration; * @param <T> the type of records to send as messages. */ @FunctionalInterface -public interface RecordSender<T> { +public interface RecordSender<T> extends Closeable { void send(final T message); + @Override + default void close() { + // Nothing to do per default + } + } diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanKafkaSenderFactory.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanKafkaSenderFactory.java similarity index 91% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanKafkaSenderFactory.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanKafkaSenderFactory.java index 0cdf8d91ea01cc16df5dcd55d77b08c3f4986442..ee7d416513439a5d0ba7bad7bcdb09e1baf5e4c7 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanKafkaSenderFactory.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanKafkaSenderFactory.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.util.Properties; import titan.ccp.model.records.ActivePowerRecord; @@ -31,7 +31,7 @@ public final class TitanKafkaSenderFactory { final String schemaRegistryUrl, final Properties properties) { return KafkaRecordSender - .<ActivePowerRecord>builder( + .<ActivePowerRecord>builderWithSchemaRegistry( bootstrapServers, topic, schemaRegistryUrl) diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanPubSubSenderFactory.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanPubSubSenderFactory.java similarity index 96% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanPubSubSenderFactory.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanPubSubSenderFactory.java index 5a18376ab4c2fcbf896f847c0ed34af69c5eb507..569d98fb9dcd235d12a0c415fdae495eeb6abdd4 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanPubSubSenderFactory.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanPubSubSenderFactory.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanRecordGenerator.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGenerator.java similarity index 95% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanRecordGenerator.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGenerator.java index cebdacaee9a8e7d05787fdf3f846d49914574828..34b17db4220e60e1fd273b1acf0a0c1543a0742b 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/TitanRecordGenerator.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGenerator.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.time.Clock; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/WorkloadDefinition.java b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinition.java similarity index 84% rename from theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/WorkloadDefinition.java rename to theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinition.java index 5795cad7a4d942476116f6453758aa2304b5eda0..1e7e6e5974323b545dd29b5db341405ffbd32eb3 100644 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/WorkloadDefinition.java +++ b/theodolite-benchmarks/load-generator-commons/src/main/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinition.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.io.Serializable; import java.time.Duration; @@ -42,16 +42,16 @@ public class WorkloadDefinition implements Serializable { * distributing its {@link KeySpace} (almost) equally among all {@link WorkloadDefinition}s. */ public Set<WorkloadDefinition> divide(final int parts) { - final int effParts = Math.min(parts, this.keySpace.getCount()); - final int minSize = this.keySpace.getCount() / effParts; - final int largerParts = this.keySpace.getCount() % effParts; - return IntStream.range(0, effParts) + // final int effParts = Math.min(parts, this.keySpace.getCount()); + final int minSize = this.keySpace.getCount() / parts; + final int largerParts = this.keySpace.getCount() % parts; + return IntStream.range(0, parts) .mapToObj(part -> { final int thisSize = part < largerParts ? minSize + 1 : minSize; final int largePartsBefore = Math.min(largerParts, part); final int smallPartsBefore = part - largePartsBefore; final int start = largePartsBefore * (minSize + 1) + smallPartsBefore * minSize; - final int end = start + thisSize - 1; + final int end = start + thisSize; return new KeySpace( this.keySpace.getPrefix(), start, diff --git a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KafkaRecordSender.java b/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KafkaRecordSender.java deleted file mode 100644 index 44ff8a92afd5356b4bb2af203899a61f7af48b2d..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/load-generator-commons/src/main/java/theodolite/commons/workloadgeneration/KafkaRecordSender.java +++ /dev/null @@ -1,138 +0,0 @@ -package theodolite.commons.workloadgeneration; - -import java.util.Properties; -import java.util.function.Function; -import org.apache.avro.specific.SpecificRecord; -import org.apache.kafka.clients.producer.KafkaProducer; -import org.apache.kafka.clients.producer.Producer; -import org.apache.kafka.clients.producer.ProducerRecord; -import org.apache.kafka.common.errors.SerializationException; -import org.apache.kafka.common.serialization.StringSerializer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; - -/** - * Sends monitoring records to Kafka. - * - * @param <T> {@link SpecificRecord} to send - */ -public class KafkaRecordSender<T extends SpecificRecord> implements RecordSender<T> { - - private static final Logger LOGGER = LoggerFactory.getLogger(KafkaRecordSender.class); - - private final String topic; - - private final Function<T, String> keyAccessor; - - private final Function<T, Long> timestampAccessor; - - private final Producer<String, T> producer; - - /** - * Create a new {@link KafkaRecordSender}. - */ - private KafkaRecordSender(final Builder<T> builder) { - this.topic = builder.topic; - this.keyAccessor = builder.keyAccessor; - this.timestampAccessor = builder.timestampAccessor; - - final Properties properties = new Properties(); - properties.putAll(builder.defaultProperties); - properties.put("bootstrap.servers", builder.bootstrapServers); - // properties.put("acks", this.acknowledges); - // properties.put("batch.size", this.batchSize); - // properties.put("linger.ms", this.lingerMs); - // properties.put("buffer.memory", this.bufferMemory); - - final SchemaRegistryAvroSerdeFactory avroSerdeFactory = - new SchemaRegistryAvroSerdeFactory(builder.schemaRegistryUrl); - this.producer = new KafkaProducer<>( - properties, - new StringSerializer(), - avroSerdeFactory.<T>forKeys().serializer()); - } - - /** - * Write the passed monitoring record to Kafka. - */ - public void write(final T monitoringRecord) { - final ProducerRecord<String, T> record = - new ProducerRecord<>(this.topic, null, this.timestampAccessor.apply(monitoringRecord), - this.keyAccessor.apply(monitoringRecord), monitoringRecord); - - LOGGER.debug("Send record to Kafka topic {}: {}", this.topic, record); - try { - this.producer.send(record); - } catch (final SerializationException e) { - LOGGER.warn( - "Record could not be serialized and thus not sent to Kafka due to exception. Skipping this record.", // NOCS - e); - } - } - - public void terminate() { - this.producer.close(); - } - - @Override - public void send(final T message) { - this.write(message); - } - - public static <T extends SpecificRecord> Builder<T> builder( - final String bootstrapServers, - final String topic, - final String schemaRegistryUrl) { - return new Builder<>(bootstrapServers, topic, schemaRegistryUrl); - } - - /** - * Builder class to build a new {@link KafkaRecordSender}. - * - * @param <T> Type of the records that should later be send. - */ - public static class Builder<T extends SpecificRecord> { - - private final String bootstrapServers; - private final String topic; - private final String schemaRegistryUrl; - private Function<T, String> keyAccessor = x -> ""; // NOPMD - private Function<T, Long> timestampAccessor = x -> null; // NOPMD - private Properties defaultProperties = new Properties(); // NOPMD - - /** - * Creates a Builder object for a {@link KafkaRecordSender}. - * - * @param bootstrapServers The Server to for accessing Kafka. - * @param topic The topic where to write. - * @param schemaRegistryUrl URL to the schema registry for avro. - */ - private Builder(final String bootstrapServers, final String topic, - final String schemaRegistryUrl) { - this.bootstrapServers = bootstrapServers; - this.topic = topic; - this.schemaRegistryUrl = schemaRegistryUrl; - } - - public Builder<T> keyAccessor(final Function<T, String> keyAccessor) { - this.keyAccessor = keyAccessor; - return this; - } - - public Builder<T> timestampAccessor(final Function<T, Long> timestampAccessor) { - this.timestampAccessor = timestampAccessor; - return this; - } - - public Builder<T> defaultProperties(final Properties defaultProperties) { - this.defaultProperties = defaultProperties; - return this; - } - - public KafkaRecordSender<T> build() { - return new KafkaRecordSender<>(this); - } - } - -} diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/HttpRecordSenderTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSenderTest.java similarity index 97% rename from theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/HttpRecordSenderTest.java rename to theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSenderTest.java index 0d331a900f5bd5c18dbeaf2fc2a249256151ce70..7c565ace82698bf47f6b3711a28e08f87e8e412b 100644 --- a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/HttpRecordSenderTest.java +++ b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/HttpRecordSenderTest.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/KeySpaceTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/KeySpaceTest.java similarity index 75% rename from theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/KeySpaceTest.java rename to theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/KeySpaceTest.java index 49004839a9c8fd280aba5006a1f08c2acb3c3136..cbd230433d2345cf00212cf6f68463d07c5ef765 100644 --- a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/KeySpaceTest.java +++ b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/KeySpaceTest.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import org.junit.Assert; import org.junit.Test; @@ -7,14 +7,14 @@ public class KeySpaceTest { @Test public void testCountFixedRangeFromZero() { - final KeySpace keySpace = new KeySpace("prefix", 0, 9); + final KeySpace keySpace = new KeySpace("prefix", 0, 10); final int count = keySpace.getCount(); Assert.assertEquals(10, count); } @Test public void testCountFixedRangeNotFromZero() { - final KeySpace keySpace = new KeySpace("prefix", 4, 11); + final KeySpace keySpace = new KeySpace("prefix", 4, 12); final int count = keySpace.getCount(); Assert.assertEquals(8, count); } diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/LoadGeneratorTargetTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTargetTest.java similarity index 92% rename from theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/LoadGeneratorTargetTest.java rename to theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTargetTest.java index 644ffad9a4d2732f72ac307294d1311eba3a9ce8..46f6d1081eae857d90489de49bbfd102c89b3821 100644 --- a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/LoadGeneratorTargetTest.java +++ b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/LoadGeneratorTargetTest.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import org.junit.Assert; import org.junit.Test; diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/TitanRecordGeneratorTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGeneratorTest.java similarity index 96% rename from theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/TitanRecordGeneratorTest.java rename to theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGeneratorTest.java index 04ba38b9c8fcd41df46d3d3070a6308acfd72cb7..eb7c7f2a403dfb7138bdfd8e0855930001a4488b 100644 --- a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/TitanRecordGeneratorTest.java +++ b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/TitanRecordGeneratorTest.java @@ -1,4 +1,4 @@ -package theodolite.commons.workloadgeneration; +package rocks.theodolite.benchmarks.loadgenerator; import java.time.Clock; import java.time.Instant; diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinitionTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinitionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..b670a73c6fe423e42e02c7d25d67311a5858c1af --- /dev/null +++ b/theodolite-benchmarks/load-generator-commons/src/test/java/rocks/theodolite/benchmarks/loadgenerator/WorkloadDefinitionTest.java @@ -0,0 +1,192 @@ +package rocks.theodolite.benchmarks.loadgenerator; + +import java.time.Duration; +import java.util.Comparator; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import org.junit.Assert; +import org.junit.Test; + +public class WorkloadDefinitionTest { + + @Test + public void testDivideByOneAmount() { + final KeySpace keySpace = new KeySpace("prefix", 100); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(1); + Assert.assertEquals(1, subworkloads.size()); + } + + @Test + public void testDivideMultipleAmount() { + final KeySpace keySpace = new KeySpace("prefix", 100); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(2); + Assert.assertEquals(2, subworkloads.size()); + } + + @Test + public void testDivideNonMultipleAmount() { + final KeySpace keySpace = new KeySpace("prefix", 100); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(3); + Assert.assertEquals(3, subworkloads.size()); + } + + @Test + public void testDivide() { + final KeySpace keySpace = new KeySpace("prefix", 100); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(3); + Assert.assertEquals(3, subworkloads.size()); + for (final WorkloadDefinition subworkload : subworkloads) { + Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); + Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); + } + final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() + .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) + .collect(Collectors.toList()); + + final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); + final List<String> expectedKeySubworkload1 = IntStream + .rangeClosed(0, 33) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload1, subworkload1.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); + final List<String> expectedKeySubworkload2 = IntStream + .rangeClosed(34, 66) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload2, subworkload2.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); + final List<String> expectedKeySubworkload3 = IntStream + .rangeClosed(67, 99) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload3, subworkload3.getKeySpace().getKeys()); + } + + @Test + public void testDivideMany() { + final KeySpace keySpace = new KeySpace("prefix", 10); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(7); + Assert.assertEquals(7, subworkloads.size()); + for (final WorkloadDefinition subworkload : subworkloads) { + Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); + Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); + } + final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() + .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) + .collect(Collectors.toList()); + + final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); + final List<String> expectedKeySubworkload1 = IntStream + .rangeClosed(0, 1) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload1, subworkload1.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); + final List<String> expectedKeySubworkload2 = IntStream + .rangeClosed(2, 3) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload2, subworkload2.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); + final List<String> expectedKeySubworkload3 = IntStream + .rangeClosed(4, 5) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload3, subworkload3.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload4 = orderedSubworkloads.get(3); + final List<String> expectedKeySubworkload4 = IntStream + .rangeClosed(6, 6) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload4, subworkload4.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload5 = orderedSubworkloads.get(4); + final List<String> expectedKeySubworkload5 = IntStream + .rangeClosed(7, 7) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload5, subworkload5.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload6 = orderedSubworkloads.get(5); + final List<String> expectedKeySubworkload6 = IntStream + .rangeClosed(8, 8) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload6, subworkload6.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload7 = orderedSubworkloads.get(6); + final List<String> expectedKeySubworkload7 = IntStream + .rangeClosed(9, 9) + .mapToObj(id -> "prefix" + id) + .collect(Collectors.toList()); + Assert.assertEquals(expectedKeySubworkload7, subworkload7.getKeySpace().getKeys()); + } + + @Test + public void testDivideWithOneEmpty() { + final KeySpace keySpace = new KeySpace("prefix", 2); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(3); + Assert.assertEquals(3, subworkloads.size()); + for (final WorkloadDefinition subworkload : subworkloads) { + Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); + Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); + } + final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() + .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) + .collect(Collectors.toList()); + + final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); + final List<String> expectedKeySubworkload1 = List.of("prefix0"); + Assert.assertEquals(expectedKeySubworkload1, subworkload1.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); + final List<String> expectedKeySubworkload2 = List.of("prefix1"); + Assert.assertEquals(expectedKeySubworkload2, subworkload2.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); + final List<String> expectedKeySubworkload3 = List.of(); + Assert.assertEquals(expectedKeySubworkload3, subworkload3.getKeySpace().getKeys()); + } + + @Test + public void testDivideWithTwoEmpty() { + final KeySpace keySpace = new KeySpace("prefix", 1); + final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); + final Set<WorkloadDefinition> subworkloads = workload.divide(3); + Assert.assertEquals(3, subworkloads.size()); + for (final WorkloadDefinition subworkload : subworkloads) { + Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); + Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); + } + final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() + .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) + .collect(Collectors.toList()); + + final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); + final List<String> expectedKeySubworkload1 = List.of("prefix0"); + Assert.assertEquals(expectedKeySubworkload1, subworkload1.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); + final List<String> expectedKeySubworkload2 = List.of(); + Assert.assertEquals(expectedKeySubworkload2, subworkload2.getKeySpace().getKeys()); + + final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); + final List<String> expectedKeySubworkload3 = List.of(); + Assert.assertEquals(expectedKeySubworkload3, subworkload3.getKeySpace().getKeys()); + } + +} diff --git a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/WorkloadDefinitionTest.java b/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/WorkloadDefinitionTest.java deleted file mode 100644 index 9a5dbf2d20e9e33b5902e5f352dc8a4023478cdf..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/load-generator-commons/src/test/java/theodolite/commons/workloadgeneration/WorkloadDefinitionTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package theodolite.commons.workloadgeneration; - -import java.time.Duration; -import java.util.Comparator; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.junit.Assert; -import org.junit.Test; - -public class WorkloadDefinitionTest { - - @Test - public void testDivideByOneAmount() { - final KeySpace keySpace = new KeySpace("prefix", 100); - final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); - final Set<WorkloadDefinition> subworkloads = workload.divide(1); - Assert.assertEquals(1, subworkloads.size()); - } - - @Test - public void testDivideMultipleAmount() { - final KeySpace keySpace = new KeySpace("prefix", 100); - final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); - final Set<WorkloadDefinition> subworkloads = workload.divide(2); - Assert.assertEquals(2, subworkloads.size()); - } - - @Test - public void testDivideNonMultipleAmount() { - final KeySpace keySpace = new KeySpace("prefix", 100); - final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); - final Set<WorkloadDefinition> subworkloads = workload.divide(3); - Assert.assertEquals(3, subworkloads.size()); - } - - @Test - public void testDivide() { - final KeySpace keySpace = new KeySpace("prefix", 100); - final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); - final Set<WorkloadDefinition> subworkloads = workload.divide(3); - Assert.assertEquals(3, subworkloads.size()); - for (final WorkloadDefinition subworkload : subworkloads) { - Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); - Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); - } - final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() - .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) - .collect(Collectors.toList()); - final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); - Assert.assertEquals(0, subworkload1.getKeySpace().getMin()); - Assert.assertEquals(33, subworkload1.getKeySpace().getMax()); - final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); - Assert.assertEquals(34, subworkload2.getKeySpace().getMin()); - Assert.assertEquals(66, subworkload2.getKeySpace().getMax()); - final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); - Assert.assertEquals(67, subworkload3.getKeySpace().getMin()); - Assert.assertEquals(99, subworkload3.getKeySpace().getMax()); - } - - @Test - public void testDivideMany() { - final KeySpace keySpace = new KeySpace("prefix", 10); - final WorkloadDefinition workload = new WorkloadDefinition(keySpace, Duration.ofSeconds(1)); - final Set<WorkloadDefinition> subworkloads = workload.divide(7); - Assert.assertEquals(7, subworkloads.size()); - for (final WorkloadDefinition subworkload : subworkloads) { - Assert.assertEquals("prefix", subworkload.getKeySpace().getPrefix()); - Assert.assertEquals(Duration.ofSeconds(1), subworkload.getPeriod()); - } - final List<WorkloadDefinition> orderedSubworkloads = subworkloads.stream() - .sorted(Comparator.comparingInt(l -> l.getKeySpace().getMin())) - .collect(Collectors.toList()); - final WorkloadDefinition subworkload1 = orderedSubworkloads.get(0); - Assert.assertEquals(0, subworkload1.getKeySpace().getMin()); - Assert.assertEquals(1, subworkload1.getKeySpace().getMax()); - final WorkloadDefinition subworkload2 = orderedSubworkloads.get(1); - Assert.assertEquals(2, subworkload2.getKeySpace().getMin()); - Assert.assertEquals(3, subworkload2.getKeySpace().getMax()); - final WorkloadDefinition subworkload3 = orderedSubworkloads.get(2); - Assert.assertEquals(4, subworkload3.getKeySpace().getMin()); - Assert.assertEquals(5, subworkload3.getKeySpace().getMax()); - final WorkloadDefinition subworkload4 = orderedSubworkloads.get(3); - Assert.assertEquals(6, subworkload4.getKeySpace().getMin()); - Assert.assertEquals(6, subworkload4.getKeySpace().getMax()); - final WorkloadDefinition subworkload5 = orderedSubworkloads.get(4); - Assert.assertEquals(7, subworkload5.getKeySpace().getMin()); - Assert.assertEquals(7, subworkload5.getKeySpace().getMax()); - final WorkloadDefinition subworkload6 = orderedSubworkloads.get(5); - Assert.assertEquals(8, subworkload6.getKeySpace().getMin()); - Assert.assertEquals(8, subworkload6.getKeySpace().getMax()); - final WorkloadDefinition subworkload7 = orderedSubworkloads.get(6); - Assert.assertEquals(9, subworkload7.getKeySpace().getMin()); - Assert.assertEquals(9, subworkload7.getKeySpace().getMax()); - } - -} diff --git a/theodolite-benchmarks/uc1-beam-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-beam-flink/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-flink/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-beam-flink/build.gradle b/theodolite-benchmarks/uc1-beam-flink/build.gradle index f4b6cff8efbcdbcb701f249220643669f0f89626..fff1a0817b9bfd6f0c631c97aef585465ad15f4d 100644 --- a/theodolite-benchmarks/uc1-beam-flink/build.gradle +++ b/theodolite-benchmarks/uc1-beam-flink/build.gradle @@ -3,7 +3,17 @@ plugins { } dependencies { - implementation project(':uc1-beam') + implementation project(':uc1-beam') } -mainClassName = "application.Uc1BeamFlink" +sourceSets { + main { + resources { + srcDirs += [ + project(':uc1-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc1.beam.flink.Uc1BeamFlink" diff --git a/theodolite-benchmarks/uc1-beam-flink/src/main/java/application/Uc1BeamFlink.java b/theodolite-benchmarks/uc1-beam-flink/src/main/java/application/Uc1BeamFlink.java deleted file mode 100644 index fe58369b3c0c19351bcc5cde170df68946af7cbd..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc1-beam-flink/src/main/java/application/Uc1BeamFlink.java +++ /dev/null @@ -1,40 +0,0 @@ -package application; - -import org.apache.beam.runners.flink.FlinkRunner; -import theodolite.commons.beam.AbstractBeamService; - -/** - * Implementation of the use case Database Storage using Apache Beam with the Flink Runner. To - * execute locally in standalone start Kafka, Zookeeper, the schema-registry and the workload - * generator using the delayed_startup.sh script. Start a Flink cluster and pass its REST adress - * using--flinkMaster as run parameter. To persist logs add - * ${workspace_loc:/uc1-application-samza/eclipseConsoleLogs.log} as Output File under Standard - * Input Output in Common in the Run Configuration Start via Eclipse Run. - */ -public final class Uc1BeamFlink extends AbstractBeamService { - - /** - * Private constructor setting specific options for this use case. - */ - private Uc1BeamFlink(final String[] args) { //NOPMD - super(args); - this.options.setRunner(FlinkRunner.class); - } - - /** - * Main method. - */ - public static void main(final String[] args) { - - // Create application via configurations - final Uc1BeamFlink uc1 = new Uc1BeamFlink(args); - - // Create pipeline with configurations - final Uc1BeamPipeline pipeline = new Uc1BeamPipeline(uc1.options, uc1.getConfig()); - - // Submit job and start execution - pipeline.run().waitUntilFinish(); - } - -} - diff --git a/theodolite-benchmarks/uc1-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc1/beam/flink/Uc1BeamFlink.java b/theodolite-benchmarks/uc1-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc1/beam/flink/Uc1BeamFlink.java new file mode 100644 index 0000000000000000000000000000000000000000..e1317219fedf24bc4b0eb4a3f9668da7de196cca --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc1/beam/flink/Uc1BeamFlink.java @@ -0,0 +1,24 @@ +package rocks.theodolite.benchmarks.uc1.beam.flink; + +import org.apache.beam.runners.flink.FlinkRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc1.beam.PipelineFactory; + +/** + * Implementation of the use case Database Storage using Apache Beam with the Flink Runner. To + * execute locally in standalone start Kafka, Zookeeper, the schema-registry and the workload + * generator using the delayed_startup.sh script. Start a Flink cluster and pass its REST adress + * using--flinkMaster as run parameter. To persist logs add + * ${workspace_loc:/uc1-application-samza/eclipseConsoleLogs.log} as Output File under Standard + * Input Output in Common in the Run Configuration Start via Eclipse Run. + */ +public final class Uc1BeamFlink { + + private Uc1BeamFlink() {} + + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), FlinkRunner.class, args).run(); + } + +} + diff --git a/theodolite-benchmarks/uc1-beam-samza/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-beam-samza/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-samza/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-beam-samza/build.gradle b/theodolite-benchmarks/uc1-beam-samza/build.gradle index 54c070d967d17ccd41c85f90486655c9fd56b65b..fab142f6d7a0f8415bda1cc0e41f088b952a11fb 100644 --- a/theodolite-benchmarks/uc1-beam-samza/build.gradle +++ b/theodolite-benchmarks/uc1-beam-samza/build.gradle @@ -6,5 +6,14 @@ dependencies { implementation project(':uc1-beam') } +sourceSets { + main { + resources { + srcDirs += [ + project(':uc1-beam').sourceSets.main.resources + ] + } + } +} -mainClassName = "application.Uc1BeamSamza" +mainClassName = "rocks.theodolite.benchmarks.uc1.beam.samza.Uc1BeamSamza" diff --git a/theodolite-benchmarks/uc1-beam-samza/src/main/java/application/Uc1BeamSamza.java b/theodolite-benchmarks/uc1-beam-samza/src/main/java/application/Uc1BeamSamza.java deleted file mode 100644 index aaef5c2d6968c4b89059537277a2582ecca70451..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc1-beam-samza/src/main/java/application/Uc1BeamSamza.java +++ /dev/null @@ -1,43 +0,0 @@ -package application; - -import org.apache.beam.runners.samza.SamzaRunner; -import theodolite.commons.beam.AbstractBeamService; - -/** - * Implementation of the use case Database Storage using Apache Beam with the Samza Runner. To - * execute locally in standalone start Kafka, Zookeeper, the schema-registry and the workload - * generator. Add - * --configFactory=org.apache.samza.config.factories.PropertiesConfigFactory - * --configFilePath=samza-standalone.properties - * --samzaExecutionEnvironment=STANDALONE --maxSourceParallelism=1024 as program arguments. To - * persist logs add ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File - * under Standard Input Output in Common in the Run Configuration Start via Eclipse Run. - */ -public final class Uc1BeamSamza extends AbstractBeamService { - - /** - * Private constructor setting specific options for this use case. - */ - private Uc1BeamSamza(final String[] args) { //NOPMD - super(args); - this.options.setRunner(SamzaRunner.class); - } - - /** - * Main method. - */ - public static void main(final String[] args) { - - // Create application via configurations - final Uc1BeamSamza uc1 = new Uc1BeamSamza(args); - - // Create pipeline with configurations - final Uc1BeamPipeline pipeline = new Uc1BeamPipeline(uc1.options, uc1.getConfig()); - - // Submit job and start execution - pipeline.run().waitUntilFinish(); - } -} - - - diff --git a/theodolite-benchmarks/uc1-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc1/beam/samza/Uc1BeamSamza.java b/theodolite-benchmarks/uc1-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc1/beam/samza/Uc1BeamSamza.java new file mode 100644 index 0000000000000000000000000000000000000000..d3455db71bc3520bfa11c4da3a58c32da46337f9 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc1/beam/samza/Uc1BeamSamza.java @@ -0,0 +1,26 @@ +package rocks.theodolite.benchmarks.uc1.beam.samza; + +import org.apache.beam.runners.samza.SamzaRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc1.beam.PipelineFactory; + +/** + * Implementation of the use case Database Storage using Apache Beam with the Samza Runner. To + * execute locally in standalone start Kafka, Zookeeper, the schema-registry and the workload + * generator. Add --configFactory=org.apache.samza.config.factories.PropertiesConfigFactory + * --configFilePath=samza-standalone.properties --samzaExecutionEnvironment=STANDALONE + * --maxSourceParallelism=1024 as program arguments. To persist logs add + * ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File under Standard + * Input Output in Common in the Run Configuration Start via Eclipse Run. + */ +public final class Uc1BeamSamza { + + private Uc1BeamSamza() {} + + /** + * Main method. + */ + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), SamzaRunner.class, args).run(); + } +} diff --git a/theodolite-benchmarks/uc1-beam-samza/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc1-beam-samza/src/main/resources/META-INF/application.properties deleted file mode 100644 index 70cc5e94a64b8218344263d9d9d2ba3421fd69fd..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc1-beam-samza/src/main/resources/META-INF/application.properties +++ /dev/null @@ -1,18 +0,0 @@ -application.name=theodolite-uc1-application -application.version=0.0.1 - -sink.type=logger - -kafka.bootstrap.servers=localhost:9092 -kafka.input.topic=input -kafka.output.topic=output - -schema.registry.url=http://localhost:8081 - -num.threads=1 -commit.interval.ms=1000 -cache.max.bytes.buffering=-1 - -specific.avro.reader=True -enable.auto.commit.config=True -auto.offset.reset.config=earliest diff --git a/theodolite-benchmarks/uc1-beam/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-beam/.settings/org.eclipse.jdt.ui.prefs index da2db2cefa90c0d974068e22804132eb6c11d824..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc1-beam/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-beam/.settings/org.eclipse.jdt.ui.prefs @@ -105,6 +105,7 @@ cleanup.strictly_equal_or_different=false cleanup.stringbuffer_to_stringbuilder=false cleanup.stringbuilder=false cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false cleanup.substring=false cleanup.switch=false cleanup.system_property=false @@ -144,6 +145,7 @@ org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false @@ -165,14 +167,14 @@ sp_cleanup.boolean_literal=false sp_cleanup.boolean_value_rather_than_comparison=false sp_cleanup.break_loop=false sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparing_on_criteria=true sp_cleanup.comparison_statement=false sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false -sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.convert_to_enhanced_for_loop=true sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false sp_cleanup.convert_to_switch_expressions=false -sp_cleanup.correct_indentation=false +sp_cleanup.correct_indentation=true sp_cleanup.do_while_rather_than_while=false sp_cleanup.double_negation=false sp_cleanup.else_if=false @@ -190,7 +192,7 @@ sp_cleanup.invert_equals=false sp_cleanup.join=false sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false +sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true @@ -227,15 +229,15 @@ sp_cleanup.redundant_comparator=false sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true -sp_cleanup.remove_trailing_whitespaces=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true sp_cleanup.remove_unused_local_variables=false sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false @@ -251,7 +253,8 @@ sp_cleanup.static_inner_class=false sp_cleanup.strictly_equal_or_different=false sp_cleanup.stringbuffer_to_stringbuilder=false sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false sp_cleanup.substring=false sp_cleanup.switch=false sp_cleanup.system_property=false @@ -261,7 +264,7 @@ sp_cleanup.system_property_file_separator=false sp_cleanup.system_property_line_separator=false sp_cleanup.system_property_path_separator=false sp_cleanup.ternary_operator=false -sp_cleanup.try_with_resource=true +sp_cleanup.try_with_resource=false sp_cleanup.unlooped_while=false sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false @@ -278,6 +281,6 @@ sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false sp_cleanup.use_unboxing=false sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc1-beam/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/Uc1BeamPipeline.java b/theodolite-benchmarks/uc1-beam/src/main/java/application/Uc1BeamPipeline.java deleted file mode 100644 index 352b32a29ff6cfd5d01a4e74798f79c8d08c769a..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/Uc1BeamPipeline.java +++ /dev/null @@ -1,39 +0,0 @@ -package application; - -import org.apache.beam.sdk.coders.AvroCoder; -import org.apache.beam.sdk.coders.CoderRegistry; -import org.apache.beam.sdk.options.PipelineOptions; -import org.apache.beam.sdk.transforms.Values; -import org.apache.commons.configuration2.Configuration; -import theodolite.commons.beam.AbstractPipeline; -import theodolite.commons.beam.kafka.KafkaActivePowerTimestampReader; -import titan.ccp.model.records.ActivePowerRecord; - -/** - * Implementation of benchmark UC1: Database Storage with Apache Beam. - */ -public final class Uc1BeamPipeline extends AbstractPipeline { - - public static final String SINK_TYPE_KEY = "sink.type"; - - protected Uc1BeamPipeline(final PipelineOptions options, final Configuration config) { - super(options, config); - - final SinkType sinkType = SinkType.from(config.getString(SINK_TYPE_KEY)); - - // Set Coders for classes that will be distributed - final CoderRegistry cr = super.getCoderRegistry(); - cr.registerCoderForClass(ActivePowerRecord.class, AvroCoder.of(ActivePowerRecord.SCHEMA$)); - - final KafkaActivePowerTimestampReader kafka = new KafkaActivePowerTimestampReader( - super.bootstrapServer, - super.inputTopic, - super.buildConsumerConfig()); - - super.apply(kafka) - .apply(Values.create()) - .apply(sinkType.create(config)); - } - -} - diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/ConverterAdapter.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/ConverterAdapter.java similarity index 96% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/ConverterAdapter.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/ConverterAdapter.java index e368c3a06cde50ea8d49d84b038fb2ec5aa97d1a..08834a47223e8b4209da79c4cdcbb6a60e027418 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/ConverterAdapter.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/ConverterAdapter.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc1.beam; import org.apache.beam.sdk.transforms.SimpleFunction; import org.apache.beam.sdk.values.TypeDescriptor; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/GenericSink.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/GenericSink.java similarity index 96% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/GenericSink.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/GenericSink.java index 04b47cd8c4c6a976fc602fa2fbf93dcaaa36680e..04eae799837b2e5278842d248d135e479f84086b 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/GenericSink.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/GenericSink.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc1.beam; import org.apache.beam.sdk.transforms.MapElements; import org.apache.beam.sdk.transforms.PTransform; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/PipelineFactory.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/PipelineFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..32658a21b8b80fddb5baf58002a701e8e35b542e --- /dev/null +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/PipelineFactory.java @@ -0,0 +1,58 @@ +package rocks.theodolite.benchmarks.uc1.beam; + +import java.util.function.Function; +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.coders.AvroCoder; +import org.apache.beam.sdk.coders.CoderRegistry; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.beam.sdk.transforms.Values; +import org.apache.commons.configuration2.Configuration; +import rocks.theodolite.benchmarks.commons.beam.AbstractPipelineFactory; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaActivePowerTimestampReader; +import titan.ccp.model.records.ActivePowerRecord; + +/** + * {@link AbstractPipelineFactory} for UC1. + */ +public class PipelineFactory extends AbstractPipelineFactory { + + public static final String SINK_TYPE_KEY = "sink.type"; + + public PipelineFactory(final Configuration configuration) { + super(configuration); + } + + @Override + protected void expandOptions(final PipelineOptions options) { + // No options to set + // TODO Add for PubSub + // final String pubSubEmulatorHost = super.config.getString(null); + // if (pubSubEmulatorHost != null) { + // final PubsubOptions pubSubOptions = options.as(PubsubOptions.class); + // pubSubOptions.setPubsubRootUrl("http://" + pubSubEmulatorHost); + // } + } + + @Override + protected void constructPipeline(final Pipeline pipeline) { + final SinkType sinkType = SinkType.from(this.config.getString(SINK_TYPE_KEY)); + + final KafkaActivePowerTimestampReader kafkaReader = super.buildKafkaReader(); + + pipeline.apply(kafkaReader) + .apply(Values.create()) + .apply(sinkType.create(this.config)); + } + + @Override + protected void registerCoders(final CoderRegistry registry) { + registry.registerCoderForClass( + ActivePowerRecord.class, + AvroCoder.of(ActivePowerRecord.SCHEMA$)); + } + + public static Function<Configuration, AbstractPipelineFactory> factory() { + return config -> new PipelineFactory(config); + } + +} diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/SinkFactory.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkFactory.java similarity index 91% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/SinkFactory.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkFactory.java index 91052827ff58f0bb52d289073c84e31cfc234c31..d4854293b0c26804f0204e58c09a45f13dbf171f 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/SinkFactory.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkFactory.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc1.beam; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PCollection; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/SinkType.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkType.java similarity index 92% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/SinkType.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkType.java index 82ca2573ef5108e2f2a9423400ca63be1760d449..da836815e09631e2ebc071badc02618171e0792a 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/SinkType.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/SinkType.java @@ -1,10 +1,10 @@ -package application; +package rocks.theodolite.benchmarks.uc1.beam; -import application.firestore.FirestoreSink; import java.util.stream.Stream; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PCollection; import org.apache.commons.configuration2.Configuration; +import rocks.theodolite.benchmarks.uc1.beam.firestore.FirestoreSink; import rocks.theodolite.benchmarks.uc1.commons.logger.LogWriterFactory; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/WriterAdapter.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/WriterAdapter.java similarity index 94% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/WriterAdapter.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/WriterAdapter.java index eb9a2670cd8e61ed103a277e9d26072dc926dbeb..4519515cf7d74abb0c447c56df4bbe313133c6a7 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/WriterAdapter.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/WriterAdapter.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc1.beam; import org.apache.beam.sdk.transforms.DoFn; import rocks.theodolite.benchmarks.uc1.commons.DatabaseAdapter; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/DocumentMapper.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/DocumentMapper.java similarity index 96% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/DocumentMapper.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/DocumentMapper.java index d7781a9334384e900acbaaa00471995c00ccb630..1abf847250779150bb48b45c162afaeac1130044 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/DocumentMapper.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/DocumentMapper.java @@ -1,4 +1,4 @@ -package application.firestore; +package rocks.theodolite.benchmarks.uc1.beam.firestore; import com.google.firestore.v1.Document; import com.google.firestore.v1.Value; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreConfig.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreConfig.java similarity index 93% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreConfig.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreConfig.java index 1482a59811f6fc6c0126d412f65e3e871b10220a..143387d0e15fc778721e026f1c7fdb3b01fc15ef 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreConfig.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreConfig.java @@ -1,4 +1,4 @@ -package application.firestore; +package rocks.theodolite.benchmarks.uc1.beam.firestore; import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.firestore.FirestoreOptions; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreSink.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreSink.java similarity index 96% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreSink.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreSink.java index a1db24eeb9e05f3b8e198621f4a3e7107e095b13..dfe3f240b9727d0fa5027ea5f29cd67def3323ba 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/FirestoreSink.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/FirestoreSink.java @@ -1,4 +1,4 @@ -package application.firestore; +package rocks.theodolite.benchmarks.uc1.beam.firestore; import com.google.cloud.firestore.DocumentSnapshot; import com.google.firestore.v1.Document; diff --git a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/UpdateOperationMapper.java b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/UpdateOperationMapper.java similarity index 88% rename from theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/UpdateOperationMapper.java rename to theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/UpdateOperationMapper.java index d67bed2aedbd97bfe4271efa0514c8d4e594683e..fc1170073477eabd7b340f59e97ef8cbe1cf3743 100644 --- a/theodolite-benchmarks/uc1-beam/src/main/java/application/firestore/UpdateOperationMapper.java +++ b/theodolite-benchmarks/uc1-beam/src/main/java/rocks/theodolite/benchmarks/uc1/beam/firestore/UpdateOperationMapper.java @@ -1,4 +1,4 @@ -package application.firestore; +package rocks.theodolite.benchmarks.uc1.beam.firestore; import com.google.firestore.v1.Document; import com.google.firestore.v1.Write; diff --git a/theodolite-benchmarks/uc1-beam-flink/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc1-beam/src/main/resources/META-INF/application.properties similarity index 95% rename from theodolite-benchmarks/uc1-beam-flink/src/main/resources/META-INF/application.properties rename to theodolite-benchmarks/uc1-beam/src/main/resources/META-INF/application.properties index 70cc5e94a64b8218344263d9d9d2ba3421fd69fd..b785d698cd59a31bff7e9cffc21ca1d877f037fe 100644 --- a/theodolite-benchmarks/uc1-beam-flink/src/main/resources/META-INF/application.properties +++ b/theodolite-benchmarks/uc1-beam/src/main/resources/META-INF/application.properties @@ -2,6 +2,7 @@ application.name=theodolite-uc1-application application.version=0.0.1 sink.type=logger +source.type=kafka kafka.bootstrap.servers=localhost:9092 kafka.input.topic=input diff --git a/theodolite-benchmarks/uc1-commons/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-commons/.settings/org.eclipse.jdt.ui.prefs index 713419c8d3d74d3bd7fd05c3e839367753fcdee0..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc1-commons/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-commons/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,32 +12,80 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false -cleanup.remove_redundant_semicolons=false +cleanup.remove_redundant_semicolons=true cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false sp_cleanup.remove_redundant_semicolons=false -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc1-commons/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-flink/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc1-flink/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-flink/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc1-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-flink/build.gradle b/theodolite-benchmarks/uc1-flink/build.gradle index 681effe9a347f0fa9f26d6a2caf0668ade09d6c2..4eb96987e7974259f693d37d2f063243a3d0bb6d 100644 --- a/theodolite-benchmarks/uc1-flink/build.gradle +++ b/theodolite-benchmarks/uc1-flink/build.gradle @@ -6,4 +6,4 @@ dependencies { implementation project(':uc1-commons') } -mainClassName = "theodolite.uc1.application.HistoryServiceFlinkJob" +mainClassName = "rocks.theodolite.benchmarks.uc1.flink.HistoryServiceFlinkJob" diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConfigurationKeys.java similarity index 93% rename from theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java rename to theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConfigurationKeys.java index 382525cfe75f82dbbe8fbcc85308b0e7788a43bc..d2235e0693abe8f5f45899eb03bfbefec51526d5 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.uc1.application; +package rocks.theodolite.benchmarks.uc1.flink; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConverterAdapter.java b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConverterAdapter.java similarity index 94% rename from theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConverterAdapter.java rename to theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConverterAdapter.java index af0a0b1cf5a25d22c1fdc5e7adb7467be03f9b9f..064b8afbb03dc16262ca7fcf90a0fdd8af4419a9 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/ConverterAdapter.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/ConverterAdapter.java @@ -1,4 +1,4 @@ -package theodolite.uc1.application; +package rocks.theodolite.benchmarks.uc1.flink; import org.apache.flink.api.common.functions.MapFunction; import rocks.theodolite.benchmarks.uc1.commons.RecordConverter; diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/HistoryServiceFlinkJob.java similarity index 96% rename from theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java rename to theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/HistoryServiceFlinkJob.java index 41131152734f68dd34489461b1ad31d94a970eac..d674effac653cb1613a1b218f381ec3c6c910673 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/HistoryServiceFlinkJob.java @@ -1,4 +1,4 @@ -package theodolite.uc1.application; +package rocks.theodolite.benchmarks.uc1.flink; import org.apache.commons.configuration2.Configuration; import org.apache.flink.api.common.typeinfo.Types; @@ -7,9 +7,9 @@ import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import rocks.theodolite.benchmarks.commons.flink.KafkaConnectorFactory; import rocks.theodolite.benchmarks.uc1.commons.DatabaseAdapter; import rocks.theodolite.benchmarks.uc1.commons.logger.LogWriterFactory; -import theodolite.commons.flink.KafkaConnectorFactory; import titan.ccp.common.configuration.ServiceConfigurations; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/WriterAdapter.java b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/WriterAdapter.java similarity index 94% rename from theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/WriterAdapter.java rename to theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/WriterAdapter.java index b2f375ec5f5a66141a2551015fb9fbd013ab9c16..4ead8d8c63c10b8057832e72c93c34b583eda838 100644 --- a/theodolite-benchmarks/uc1-flink/src/main/java/theodolite/uc1/application/WriterAdapter.java +++ b/theodolite-benchmarks/uc1-flink/src/main/java/rocks/theodolite/benchmarks/uc1/flink/WriterAdapter.java @@ -1,4 +1,4 @@ -package theodolite.uc1.application; +package rocks.theodolite.benchmarks.uc1.flink; import org.apache.flink.api.common.functions.FlatMapFunction; import org.apache.flink.util.Collector; diff --git a/theodolite-benchmarks/uc1-kstreams/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-kstreams/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc1-kstreams/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-kstreams/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc1-kstreams/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-kstreams/build.gradle b/theodolite-benchmarks/uc1-kstreams/build.gradle index 1460a99a2aad7767b84259494c4c231344862545..15fd13dcde355974eb77dea61e32891592d27ac2 100644 --- a/theodolite-benchmarks/uc1-kstreams/build.gradle +++ b/theodolite-benchmarks/uc1-kstreams/build.gradle @@ -6,4 +6,4 @@ dependencies { implementation project(':uc1-commons') } -mainClassName = "theodolite.uc1.application.HistoryService" +mainClassName = "rocks.theodolite.benchmarks.uc1.kstreams.HistoryService" diff --git a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/application/HistoryService.java b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/HistoryService.java similarity index 91% rename from theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/application/HistoryService.java rename to theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/HistoryService.java index f0d8062a2442181507c0bef990b73e0e9cf4a372..0a2a1bec7c3515f903905efeb07e717a46e329ea 100644 --- a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/application/HistoryService.java +++ b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/HistoryService.java @@ -1,9 +1,8 @@ -package theodolite.uc1.application; +package rocks.theodolite.benchmarks.uc1.kstreams; import java.util.concurrent.CompletableFuture; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.KafkaStreams; -import theodolite.uc1.streamprocessing.Uc1KafkaStreamsBuilder; import titan.ccp.common.configuration.ServiceConfigurations; /** diff --git a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/TopologyBuilder.java b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/TopologyBuilder.java similarity index 97% rename from theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/TopologyBuilder.java rename to theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/TopologyBuilder.java index 64d6d08c30c1a015c668e744fe164bda3f493aa4..944e449c4693dc7c234844c97567d7f9f048cf3b 100644 --- a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/TopologyBuilder.java +++ b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/TopologyBuilder.java @@ -1,4 +1,4 @@ -package theodolite.uc1.streamprocessing; +package rocks.theodolite.benchmarks.uc1.kstreams; import java.util.Properties; import org.apache.kafka.common.serialization.Serdes; diff --git a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/Uc1KafkaStreamsBuilder.java b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/Uc1KafkaStreamsBuilder.java similarity index 85% rename from theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/Uc1KafkaStreamsBuilder.java rename to theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/Uc1KafkaStreamsBuilder.java index cc39bb04623c06a4d41cb2c695804ed41818a67c..a1e9c4d78d0f340273fb3db944ba96913c8d0b13 100644 --- a/theodolite-benchmarks/uc1-kstreams/src/main/java/theodolite/uc1/streamprocessing/Uc1KafkaStreamsBuilder.java +++ b/theodolite-benchmarks/uc1-kstreams/src/main/java/rocks/theodolite/benchmarks/uc1/kstreams/Uc1KafkaStreamsBuilder.java @@ -1,10 +1,10 @@ -package theodolite.uc1.streamprocessing; +package rocks.theodolite.benchmarks.uc1.kstreams; import java.util.Objects; import java.util.Properties; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.Topology; -import theodolite.commons.kafkastreams.KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.KafkaStreamsBuilder; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; /** diff --git a/theodolite-benchmarks/uc1-load-generator/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-load-generator/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc1-load-generator/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-load-generator/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc1-load-generator/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc1-load-generator/build.gradle b/theodolite-benchmarks/uc1-load-generator/build.gradle index aadd4796d86dd46ca6094b00479f9f8483fc7e15..e4791c176c74ddc32b9d72057edfd8c65f291851 100644 --- a/theodolite-benchmarks/uc1-load-generator/build.gradle +++ b/theodolite-benchmarks/uc1-load-generator/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.load-generator' } -mainClassName = "theodolite.uc1.workloadgenerator.LoadGenerator" +mainClassName = "rocks.theodolite.benchmarks.uc1.loadgenerator.LoadGenerator" diff --git a/theodolite-benchmarks/uc1-load-generator/src/main/java/theodolite/uc1/workloadgenerator/LoadGenerator.java b/theodolite-benchmarks/uc1-load-generator/src/main/java/rocks/theodolite/benchmarks/uc1/loadgenerator/LoadGenerator.java similarity index 78% rename from theodolite-benchmarks/uc1-load-generator/src/main/java/theodolite/uc1/workloadgenerator/LoadGenerator.java rename to theodolite-benchmarks/uc1-load-generator/src/main/java/rocks/theodolite/benchmarks/uc1/loadgenerator/LoadGenerator.java index 26741eb33b2a8d1c23a40938d1261254ac37b636..8817ac90839ab4263c4cde380409ebc89a016de5 100644 --- a/theodolite-benchmarks/uc1-load-generator/src/main/java/theodolite/uc1/workloadgenerator/LoadGenerator.java +++ b/theodolite-benchmarks/uc1-load-generator/src/main/java/rocks/theodolite/benchmarks/uc1/loadgenerator/LoadGenerator.java @@ -1,4 +1,4 @@ -package theodolite.uc1.workloadgenerator; +package rocks.theodolite.benchmarks.uc1.loadgenerator; import java.io.IOException; import org.slf4j.Logger; @@ -18,6 +18,6 @@ public final class LoadGenerator { */ public static void main(final String[] args) throws InterruptedException, IOException { LOGGER.info("Start workload generator for use case UC1."); - theodolite.commons.workloadgeneration.LoadGenerator.fromEnvironment().run(); + rocks.theodolite.benchmarks.loadgenerator.LoadGenerator.fromEnvironment().run(); } } diff --git a/theodolite-benchmarks/uc2-beam-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-beam-flink/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-flink/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-beam-flink/build.gradle b/theodolite-benchmarks/uc2-beam-flink/build.gradle index 9ab898cd465abe20e855d06ebf85373e46ab12e2..095d166fc2dc17957c263cc36255831afb45887d 100644 --- a/theodolite-benchmarks/uc2-beam-flink/build.gradle +++ b/theodolite-benchmarks/uc2-beam-flink/build.gradle @@ -2,9 +2,18 @@ plugins { id 'theodolite.beam.flink' } - dependencies { implementation project(':uc2-beam') } -mainClassName = "application.Uc2BeamFlink" +sourceSets { + main { + resources { + srcDirs += [ + project(':uc2-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc2.beam.flink.Uc2BeamFlink" diff --git a/theodolite-benchmarks/uc2-beam-flink/src/main/java/application/Uc2BeamFlink.java b/theodolite-benchmarks/uc2-beam-flink/src/main/java/application/Uc2BeamFlink.java deleted file mode 100644 index f5bb849e626444929e00b17b1324a08c41cb19a0..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc2-beam-flink/src/main/java/application/Uc2BeamFlink.java +++ /dev/null @@ -1,35 +0,0 @@ -package application; - -import org.apache.beam.runners.flink.FlinkRunner; -import org.apache.beam.sdk.Pipeline; -import theodolite.commons.beam.AbstractBeamService; - -/** - * Implementation of the use case Downsampling using Apache Beam with the Flink Runner. To execute - * locally in standalone start Kafka, Zookeeper, the schema-registry and the workload generator - * using the delayed_startup.sh script. Start a Flink cluster and pass its REST adress - * using--flinkMaster as run parameter. - */ -public final class Uc2BeamFlink extends AbstractBeamService { - - /** - * Private constructor setting specific options for this use case. - */ - private Uc2BeamFlink(final String[] args) { // NOPMD - super(args); - this.options.setRunner(FlinkRunner.class); - } - - /** - * Start running this microservice. - */ - public static void main(final String[] args) { - - final Uc2BeamFlink uc2BeamFlink = new Uc2BeamFlink(args); - - final Pipeline pipeline = new Uc2BeamPipeline(uc2BeamFlink.options, uc2BeamFlink.getConfig()); - - pipeline.run().waitUntilFinish(); - } -} - diff --git a/theodolite-benchmarks/uc2-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc2/beam/flink/Uc2BeamFlink.java b/theodolite-benchmarks/uc2-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc2/beam/flink/Uc2BeamFlink.java new file mode 100644 index 0000000000000000000000000000000000000000..ab6a9992a5dfca11a182235b467d5be76488ed55 --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc2/beam/flink/Uc2BeamFlink.java @@ -0,0 +1,21 @@ +package rocks.theodolite.benchmarks.uc2.beam.flink; + +import org.apache.beam.runners.flink.FlinkRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc2.beam.PipelineFactory; + +/** + * Implementation of the use case Downsampling using Apache Beam with the Flink Runner. To execute + * locally in standalone start Kafka, Zookeeper, the schema-registry and the workload generator + * using the delayed_startup.sh script. Start a Flink cluster and pass its REST adress + * using--flinkMaster as run parameter. + */ +public final class Uc2BeamFlink { + + private Uc2BeamFlink() {} + + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), FlinkRunner.class, args).run(); + } +} + diff --git a/theodolite-benchmarks/uc2-beam-samza/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-beam-samza/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-samza/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc2-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-beam-samza/build.gradle b/theodolite-benchmarks/uc2-beam-samza/build.gradle index 29d7f9ac0c22c421072646ca665b3849c558d56f..c8148e3bb59f59fb06638d33c40a21750323f757 100644 --- a/theodolite-benchmarks/uc2-beam-samza/build.gradle +++ b/theodolite-benchmarks/uc2-beam-samza/build.gradle @@ -2,9 +2,18 @@ plugins { id 'theodolite.beam.samza' } - dependencies { implementation project(':uc2-beam') } -mainClassName = "application.Uc2BeamSamza" +sourceSets { + main { + resources { + srcDirs += [ + project(':uc2-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc2.beam.samza.Uc2BeamSamza" diff --git a/theodolite-benchmarks/uc2-beam-samza/src/main/java/application/Uc2BeamSamza.java b/theodolite-benchmarks/uc2-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc2/beam/samza/Uc2BeamSamza.java similarity index 56% rename from theodolite-benchmarks/uc2-beam-samza/src/main/java/application/Uc2BeamSamza.java rename to theodolite-benchmarks/uc2-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc2/beam/samza/Uc2BeamSamza.java index d4b3d6d910824a718bffe8dc5f0204d53b9865c1..80981818d401b48ed61ee56987764684df9dd31f 100644 --- a/theodolite-benchmarks/uc2-beam-samza/src/main/java/application/Uc2BeamSamza.java +++ b/theodolite-benchmarks/uc2-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc2/beam/samza/Uc2BeamSamza.java @@ -1,8 +1,8 @@ -package application; +package rocks.theodolite.benchmarks.uc2.beam.samza; import org.apache.beam.runners.samza.SamzaRunner; -import org.apache.beam.sdk.Pipeline; -import theodolite.commons.beam.AbstractBeamService; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc2.beam.PipelineFactory; /** * Implementation of the use case Downsampling using Apache Beam with the Samza Runner. To run @@ -14,26 +14,13 @@ import theodolite.commons.beam.AbstractBeamService; * persist logs add ${workspace_loc:/uc3-application-samza/eclipseConsoleLogs.log} as Output File * under Standard Input Output in Common in the Run Configuration Start via Eclipse Run. */ -public final class Uc2BeamSamza extends AbstractBeamService { +public final class Uc2BeamSamza { - /** - * Private constructor setting specific options for this use case. - */ - private Uc2BeamSamza(final String[] args) { //NOPMD - super(args); - this.options.setRunner(SamzaRunner.class); - } + private Uc2BeamSamza() {} - /** - * Start running this microservice. - */ public static void main(final String[] args) { - - final Uc2BeamSamza uc2BeamSamza = new Uc2BeamSamza(args); - - final Pipeline pipeline = new Uc2BeamPipeline(uc2BeamSamza.options, uc2BeamSamza.getConfig()); - - pipeline.run().waitUntilFinish(); + new BeamService(PipelineFactory.factory(), SamzaRunner.class, args).run(); } + } diff --git a/theodolite-benchmarks/uc2-beam-samza/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc2-beam-samza/src/main/resources/META-INF/application.properties deleted file mode 100644 index 1545a0f6630c8ea51d694f4056ca3aa750463f5b..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc2-beam-samza/src/main/resources/META-INF/application.properties +++ /dev/null @@ -1,17 +0,0 @@ -application.name=theodolite-uc2-application -application.version=0.0.1 - -kafka.bootstrap.servers=localhost:9092 -kafka.input.topic=input -kafka.output.topic=output -kafka.window.duration.minutes=1 - -schema.registry.url=http://localhost:8081 - -num.threads=1 -commit.interval.ms=1000 -cache.max.bytes.buffering=-1 - -specific.avro.reader=True -enable.auto.commit.config=True -auto.offset.reset.config=earliest \ No newline at end of file diff --git a/theodolite-benchmarks/uc2-beam/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-beam/.settings/org.eclipse.jdt.ui.prefs index 43ccd3dbcdf80e49b8920c8fe242b35c3f604281..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc2-beam/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc2-beam/.settings/org.eclipse.jdt.ui.prefs @@ -105,6 +105,7 @@ cleanup.strictly_equal_or_different=false cleanup.stringbuffer_to_stringbuilder=false cleanup.stringbuilder=false cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false cleanup.substring=false cleanup.switch=false cleanup.system_property=false @@ -144,6 +145,7 @@ org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false @@ -156,8 +158,8 @@ sp_cleanup.add_missing_override_annotations_interface_methods=true sp_cleanup.add_serial_version_id=false sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true sp_cleanup.array_with_curly=false sp_cleanup.arrays_fill=false sp_cleanup.bitwise_conditional_expression=false @@ -165,7 +167,7 @@ sp_cleanup.boolean_literal=false sp_cleanup.boolean_value_rather_than_comparison=false sp_cleanup.break_loop=false sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparing_on_criteria=true sp_cleanup.comparison_statement=false sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false @@ -175,7 +177,7 @@ sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true sp_cleanup.do_while_rather_than_while=false sp_cleanup.double_negation=false -sp_cleanup.else_if=true +sp_cleanup.else_if=false sp_cleanup.embedded_if=false sp_cleanup.evaluate_nullable=false sp_cleanup.extract_increment=false @@ -190,7 +192,7 @@ sp_cleanup.invert_equals=false sp_cleanup.join=false sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false +sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true @@ -227,8 +229,8 @@ sp_cleanup.redundant_comparator=false sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false @@ -251,7 +253,8 @@ sp_cleanup.static_inner_class=false sp_cleanup.strictly_equal_or_different=false sp_cleanup.stringbuffer_to_stringbuilder=false sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false sp_cleanup.substring=false sp_cleanup.switch=false sp_cleanup.system_property=false @@ -273,11 +276,11 @@ sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false sp_cleanup.use_unboxing=false sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc2-beam/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-beam/src/main/java/application/Uc2BeamPipeline.java b/theodolite-benchmarks/uc2-beam/src/main/java/application/Uc2BeamPipeline.java deleted file mode 100644 index 02eec9868b0bbfbf6fd45206ff0d4092ac09e1ac..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc2-beam/src/main/java/application/Uc2BeamPipeline.java +++ /dev/null @@ -1,73 +0,0 @@ -package application; - -import com.google.common.math.Stats; -import com.google.common.math.StatsAccumulator; -import java.util.Map; -import org.apache.beam.sdk.coders.AvroCoder; -import org.apache.beam.sdk.coders.CoderRegistry; -import org.apache.beam.sdk.coders.KvCoder; -import org.apache.beam.sdk.coders.SerializableCoder; -import org.apache.beam.sdk.coders.StringUtf8Coder; -import org.apache.beam.sdk.options.PipelineOptions; -import org.apache.beam.sdk.transforms.Combine; -import org.apache.beam.sdk.transforms.MapElements; -import org.apache.beam.sdk.transforms.windowing.FixedWindows; -import org.apache.beam.sdk.transforms.windowing.Window; -import org.apache.beam.sdk.values.KV; -import org.apache.commons.configuration2.Configuration; -import org.apache.kafka.common.serialization.StringSerializer; -import org.joda.time.Duration; -import theodolite.commons.beam.AbstractPipeline; -import theodolite.commons.beam.ConfigurationKeys; -import theodolite.commons.beam.kafka.KafkaActivePowerTimestampReader; -import theodolite.commons.beam.kafka.KafkaWriterTransformation; -import titan.ccp.model.records.ActivePowerRecord; - - -/** - * Implementation of the use case Downsampling using Apache Beam. - */ -public final class Uc2BeamPipeline extends AbstractPipeline { - - protected Uc2BeamPipeline(final PipelineOptions options, final Configuration config) { - super(options, config); - // Additional needed variables - final String outputTopic = config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); - - final Duration duration = - Duration.standardMinutes(config.getInt(ConfigurationKeys.KAFKA_WINDOW_DURATION_MINUTES)); - - // Build kafka configuration - final Map<String, Object> consumerConfig = buildConsumerConfig(); - - // Set Coders for Classes that will be distributed - final CoderRegistry cr = getCoderRegistry(); - cr.registerCoderForClass(ActivePowerRecord.class, AvroCoder.of(ActivePowerRecord.SCHEMA$)); - cr.registerCoderForClass(StatsAggregation.class, SerializableCoder.of(StatsAggregation.class)); - cr.registerCoderForClass(StatsAccumulator.class, AvroCoder.of(StatsAccumulator.class)); - - // Read from Kafka - final KafkaActivePowerTimestampReader kafkaActivePowerRecordReader = - new KafkaActivePowerTimestampReader(bootstrapServer, inputTopic, consumerConfig); - - // Transform into String - final StatsToString statsToString = new StatsToString(); - - // Write to Kafka - final KafkaWriterTransformation<String> kafkaWriter = - new KafkaWriterTransformation<>(bootstrapServer, outputTopic, StringSerializer.class); - - // Apply pipeline transformations - this.apply(kafkaActivePowerRecordReader) - // Apply a fixed window - .apply(Window.<KV<String, ActivePowerRecord>>into(FixedWindows.of(duration))) - // Aggregate per window for every key - .apply(Combine.<String, ActivePowerRecord, Stats>perKey(new StatsAggregation())) - .setCoder(KvCoder.of(StringUtf8Coder.of(), SerializableCoder.of(Stats.class))) - // Map into correct output format - .apply(MapElements.via(statsToString)) - // Write to Kafka - .apply(kafkaWriter); - } -} - diff --git a/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/PipelineFactory.java b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/PipelineFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..6de0b8f956c94af36cd70cf44ab691ff97e11ae9 --- /dev/null +++ b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/PipelineFactory.java @@ -0,0 +1,85 @@ +package rocks.theodolite.benchmarks.uc2.beam; + +import com.google.common.math.Stats; +import com.google.common.math.StatsAccumulator; +import java.util.function.Function; +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.coders.AvroCoder; +import org.apache.beam.sdk.coders.CoderRegistry; +import org.apache.beam.sdk.coders.KvCoder; +import org.apache.beam.sdk.coders.SerializableCoder; +import org.apache.beam.sdk.coders.StringUtf8Coder; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.beam.sdk.transforms.Combine; +import org.apache.beam.sdk.transforms.MapElements; +import org.apache.beam.sdk.transforms.windowing.FixedWindows; +import org.apache.beam.sdk.transforms.windowing.Window; +import org.apache.beam.sdk.values.KV; +import org.apache.commons.configuration2.Configuration; +import org.apache.kafka.common.serialization.StringSerializer; +import org.joda.time.Duration; +import rocks.theodolite.benchmarks.commons.beam.AbstractPipelineFactory; +import rocks.theodolite.benchmarks.commons.beam.ConfigurationKeys; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaActivePowerTimestampReader; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaWriterTransformation; +import titan.ccp.model.records.ActivePowerRecord; + +/** + * {@link AbstractPipelineFactory} for UC2. + */ +public class PipelineFactory extends AbstractPipelineFactory { + + public PipelineFactory(final Configuration configuration) { + super(configuration); + } + + @Override + protected void expandOptions(final PipelineOptions options) { + // No options to set + } + + @Override + protected void constructPipeline(final Pipeline pipeline) { + final String outputTopic = this.config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); + + final Duration duration = Duration.standardMinutes( + this.config.getInt(ConfigurationKeys.KAFKA_WINDOW_DURATION_MINUTES)); + + final KafkaActivePowerTimestampReader kafkaReader = super.buildKafkaReader(); + + // Transform into String + final StatsToString statsToString = new StatsToString(); + + // Write to Kafka + final String bootstrapServer = this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS); + final KafkaWriterTransformation<String> kafkaWriter = + new KafkaWriterTransformation<>(bootstrapServer, outputTopic, StringSerializer.class); + + // Apply pipeline transformations + pipeline.apply(kafkaReader) + // Apply a fixed window + .apply(Window.<KV<String, ActivePowerRecord>>into(FixedWindows.of(duration))) + // Aggregate per window for every key + .apply(Combine.<String, ActivePowerRecord, Stats>perKey(new StatsAggregation())) + .setCoder(KvCoder.of(StringUtf8Coder.of(), SerializableCoder.of(Stats.class))) + // Map into correct output format + .apply(MapElements.via(statsToString)) + // Write to Kafka + .apply(kafkaWriter); + } + + @Override + protected void registerCoders(final CoderRegistry registry) { + registry.registerCoderForClass(ActivePowerRecord.class, + AvroCoder.of(ActivePowerRecord.SCHEMA$)); + registry.registerCoderForClass(StatsAggregation.class, + SerializableCoder.of(StatsAggregation.class)); + registry.registerCoderForClass(StatsAccumulator.class, + AvroCoder.of(StatsAccumulator.class)); + } + + public static Function<Configuration, AbstractPipelineFactory> factory() { + return config -> new PipelineFactory(config); + } + +} diff --git a/theodolite-benchmarks/uc2-beam/src/main/java/application/StatsAggregation.java b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsAggregation.java similarity index 96% rename from theodolite-benchmarks/uc2-beam/src/main/java/application/StatsAggregation.java rename to theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsAggregation.java index 688f6677ec6d74e063a07a20c079b783aa71c399..a8956ee4b55c1e545e2c25ce38e2911b7c961337 100644 --- a/theodolite-benchmarks/uc2-beam/src/main/java/application/StatsAggregation.java +++ b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsAggregation.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc2.beam; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc2-beam/src/main/java/application/StatsToString.java b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsToString.java similarity index 91% rename from theodolite-benchmarks/uc2-beam/src/main/java/application/StatsToString.java rename to theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsToString.java index 9a73ae8e1681b2c350dee328cba7283cf3386fd7..222c9f3a1be0604f42c0d5d70308253463bb66f5 100644 --- a/theodolite-benchmarks/uc2-beam/src/main/java/application/StatsToString.java +++ b/theodolite-benchmarks/uc2-beam/src/main/java/rocks/theodolite/benchmarks/uc2/beam/StatsToString.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc2.beam; import com.google.common.math.Stats; import org.apache.beam.sdk.transforms.SimpleFunction; diff --git a/theodolite-benchmarks/uc2-beam-flink/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc2-beam/src/main/resources/META-INF/application.properties similarity index 100% rename from theodolite-benchmarks/uc2-beam-flink/src/main/resources/META-INF/application.properties rename to theodolite-benchmarks/uc2-beam/src/main/resources/META-INF/application.properties diff --git a/theodolite-benchmarks/uc2-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-flink/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc2-flink/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc2-flink/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc2-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-flink/build.gradle b/theodolite-benchmarks/uc2-flink/build.gradle index 0be6f3773f508dc84cad6a62b125b6a889edb383..0c50937f3378a8644a1551bcab1f79c173257794 100644 --- a/theodolite-benchmarks/uc2-flink/build.gradle +++ b/theodolite-benchmarks/uc2-flink/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.flink' } -mainClassName = "theodolite.uc2.application.HistoryServiceFlinkJob" +mainClassName = "rocks.theodolite.benchmarks.uc1.flink.HistoryServiceFlinkJob" diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/ConfigurationKeys.java similarity index 96% rename from theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java rename to theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/ConfigurationKeys.java index e8261062689ce4c586a4e6fbde02878a28f48e97..bcb15b7d655d9a05b0b65d4dda480379173a8212 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.uc2.application; +package rocks.theodolite.benchmarks.uc2.flink; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/HistoryServiceFlinkJob.java similarity index 95% rename from theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java rename to theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/HistoryServiceFlinkJob.java index 7a97099c71a18449b7cc3f0413632b52fd5b69f5..7e67be897ce06f9f12e3fbcefb61d44a0775eea5 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/HistoryServiceFlinkJob.java @@ -1,4 +1,4 @@ -package theodolite.uc2.application; +package rocks.theodolite.benchmarks.uc2.flink; import com.google.common.math.Stats; import org.apache.commons.configuration2.Configuration; @@ -13,9 +13,9 @@ import org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer; import org.apache.kafka.common.serialization.Serdes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import theodolite.commons.flink.KafkaConnectorFactory; -import theodolite.commons.flink.StateBackends; -import theodolite.commons.flink.serialization.StatsSerializer; +import rocks.theodolite.benchmarks.commons.flink.KafkaConnectorFactory; +import rocks.theodolite.benchmarks.commons.flink.StateBackends; +import rocks.theodolite.benchmarks.commons.flink.serialization.StatsSerializer; import titan.ccp.common.configuration.ServiceConfigurations; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsAggregateFunction.java b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsAggregateFunction.java similarity index 90% rename from theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsAggregateFunction.java rename to theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsAggregateFunction.java index 7bd090de819ce0c0c73687bd53a191b66ae31ed9..b2a9e5f538c9e92ba777dbcd61caaa3199ebb383 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsAggregateFunction.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsAggregateFunction.java @@ -1,9 +1,9 @@ -package theodolite.uc2.application; +package rocks.theodolite.benchmarks.uc2.flink; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; import org.apache.flink.api.common.functions.AggregateFunction; -import theodolite.uc2.application.util.StatsFactory; +import rocks.theodolite.benchmarks.uc2.flink.util.StatsFactory; import titan.ccp.model.records.ActivePowerRecord; /** diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsProcessWindowFunction.java b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsProcessWindowFunction.java similarity index 94% rename from theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsProcessWindowFunction.java rename to theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsProcessWindowFunction.java index d422c37b667d9d3309f0dd858758db29051807b9..a8451a41a1445b88102ab25fee1d92b73bd33e22 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/StatsProcessWindowFunction.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/StatsProcessWindowFunction.java @@ -1,4 +1,4 @@ -package theodolite.uc2.application; +package rocks.theodolite.benchmarks.uc2.flink; import com.google.common.math.Stats; import org.apache.flink.api.java.tuple.Tuple2; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsFactory.java b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/util/StatsFactory.java similarity index 91% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsFactory.java rename to theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/util/StatsFactory.java index b7880be4eb48035959251cc56273d16407bcb888..9fbddcc6d1a0ca6a01d9bc20f8acec7f01ec155a 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsFactory.java +++ b/theodolite-benchmarks/uc2-flink/src/main/java/rocks/theodolite/benchmarks/uc2/flink/util/StatsFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc2.flink.util; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc2-kstreams/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-kstreams/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc2-kstreams/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc2-kstreams/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc2-kstreams/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-kstreams/build.gradle b/theodolite-benchmarks/uc2-kstreams/build.gradle index 6688f229b3c57f95aaaf5f5cd4ca615db609277a..9712c51cc089a519660dc4c7cf8eddb282aa5131 100644 --- a/theodolite-benchmarks/uc2-kstreams/build.gradle +++ b/theodolite-benchmarks/uc2-kstreams/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.kstreams' } -mainClassName = "theodolite.uc2.application.HistoryService" +mainClassName = "rocks.theodolite.benchmarks.uc2.kstreams.HistoryService" diff --git a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/application/HistoryService.java b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/HistoryService.java similarity index 90% rename from theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/application/HistoryService.java rename to theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/HistoryService.java index 1aa28400cc9d55c77518a880d8cc2f48a2823a6b..3b87053507a7739381482719acf317903fe2d361 100644 --- a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/application/HistoryService.java +++ b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/HistoryService.java @@ -1,12 +1,11 @@ -package theodolite.uc2.application; +package rocks.theodolite.benchmarks.uc2.kstreams; import java.time.Duration; import java.util.Objects; import java.util.concurrent.CompletableFuture; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.KafkaStreams; -import theodolite.commons.kafkastreams.ConfigurationKeys; -import theodolite.uc2.streamprocessing.Uc2KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.ConfigurationKeys; import titan.ccp.common.configuration.ServiceConfigurations; /** diff --git a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/TopologyBuilder.java b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/TopologyBuilder.java similarity index 95% rename from theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/TopologyBuilder.java rename to theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/TopologyBuilder.java index 21dcf14a9322ce5a6381f96f22f5fadb85cc78f0..ae17c83bc141ef6056d7f9f89738d1442ba4afed 100644 --- a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/TopologyBuilder.java +++ b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/TopologyBuilder.java @@ -1,4 +1,4 @@ -package theodolite.uc2.streamprocessing; +package rocks.theodolite.benchmarks.uc2.kstreams; import com.google.common.math.Stats; import java.time.Duration; @@ -13,7 +13,7 @@ import org.apache.kafka.streams.kstream.Produced; import org.apache.kafka.streams.kstream.TimeWindows; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import theodolite.uc2.streamprocessing.util.StatsFactory; +import rocks.theodolite.benchmarks.uc2.kstreams.util.StatsFactory; import titan.ccp.common.kafka.GenericSerde; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/Uc2KafkaStreamsBuilder.java b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/Uc2KafkaStreamsBuilder.java similarity index 91% rename from theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/Uc2KafkaStreamsBuilder.java rename to theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/Uc2KafkaStreamsBuilder.java index 1d6019f27cb78f6643e111095edbbdd9f6c03e1b..9db55ef921e44ac6ebb8b31ca58c13862c33ddcb 100644 --- a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/Uc2KafkaStreamsBuilder.java +++ b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/Uc2KafkaStreamsBuilder.java @@ -1,11 +1,11 @@ -package theodolite.uc2.streamprocessing; +package rocks.theodolite.benchmarks.uc2.kstreams; import java.time.Duration; import java.util.Objects; import java.util.Properties; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.Topology; -import theodolite.commons.kafkastreams.KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.KafkaStreamsBuilder; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; /** diff --git a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/util/StatsFactory.java b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/util/StatsFactory.java similarity index 90% rename from theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/util/StatsFactory.java rename to theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/util/StatsFactory.java index 9697108eb8dacabf925f06067199a41eb0658dbe..8e43bf7e776222dd1269b5c4bcd0b330fec7f005 100644 --- a/theodolite-benchmarks/uc2-flink/src/main/java/theodolite/uc2/application/util/StatsFactory.java +++ b/theodolite-benchmarks/uc2-kstreams/src/main/java/rocks/theodolite/benchmarks/uc2/kstreams/util/StatsFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc2.application.util; +package rocks.theodolite.benchmarks.uc2.kstreams.util; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc2-load-generator/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-load-generator/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc2-load-generator/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc2-load-generator/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc2-load-generator/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc2-load-generator/build.gradle b/theodolite-benchmarks/uc2-load-generator/build.gradle index 1954fe5cbfd62d26f27c59be486a516c91892e18..0e45bc209f75eb2171d834cbc564d216c78fb126 100644 --- a/theodolite-benchmarks/uc2-load-generator/build.gradle +++ b/theodolite-benchmarks/uc2-load-generator/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.load-generator' } -mainClassName = "theodolite.uc2.workloadgenerator.LoadGenerator" +mainClassName = "rocks.theodolite.benchmarks.uc2.loadgenerator.LoadGenerator" diff --git a/theodolite-benchmarks/uc2-load-generator/src/main/java/theodolite/uc2/workloadgenerator/LoadGenerator.java b/theodolite-benchmarks/uc2-load-generator/src/main/java/rocks/theodolite/benchmarks/uc2/loadgenerator/LoadGenerator.java similarity index 73% rename from theodolite-benchmarks/uc2-load-generator/src/main/java/theodolite/uc2/workloadgenerator/LoadGenerator.java rename to theodolite-benchmarks/uc2-load-generator/src/main/java/rocks/theodolite/benchmarks/uc2/loadgenerator/LoadGenerator.java index 2c5b59bc19f703c4216bc02920b62bcf9da5d5fb..f148dc69e1a495d00044126c7cf7f99ba97066f1 100644 --- a/theodolite-benchmarks/uc2-load-generator/src/main/java/theodolite/uc2/workloadgenerator/LoadGenerator.java +++ b/theodolite-benchmarks/uc2-load-generator/src/main/java/rocks/theodolite/benchmarks/uc2/loadgenerator/LoadGenerator.java @@ -1,4 +1,4 @@ -package theodolite.uc2.workloadgenerator; +package rocks.theodolite.benchmarks.uc2.loadgenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -14,6 +14,6 @@ public final class LoadGenerator { public static void main(final String[] args) { LOGGER.info("Start workload generator for use case UC2"); - theodolite.commons.workloadgeneration.LoadGenerator.fromEnvironment().run(); + rocks.theodolite.benchmarks.loadgenerator.LoadGenerator.fromEnvironment().run(); } } diff --git a/theodolite-benchmarks/uc3-beam-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-beam-flink/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-flink/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-beam-flink/build.gradle b/theodolite-benchmarks/uc3-beam-flink/build.gradle index 8f047c6dce50636f01a7cdf645722aa5f7ac9ce9..c2fe5c11b0e24ecfa322d3f825261d2c60d650c4 100644 --- a/theodolite-benchmarks/uc3-beam-flink/build.gradle +++ b/theodolite-benchmarks/uc3-beam-flink/build.gradle @@ -2,11 +2,18 @@ plugins { id 'theodolite.beam.flink' } - dependencies { implementation project(':uc3-beam') } +sourceSets { + main { + resources { + srcDirs += [ + project(':uc3-beam').sourceSets.main.resources + ] + } + } +} -// This is the path of the main class, stored within ./src/main/java/ -mainClassName = 'application.Uc3BeamFlink' +mainClassName = 'rocks.theodolite.benchmarks.uc3.beam.flink.Uc3BeamFlink' diff --git a/theodolite-benchmarks/uc3-beam-flink/src/main/java/application/Uc3BeamFlink.java b/theodolite-benchmarks/uc3-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc3/beam/flink/Uc3BeamFlink.java similarity index 59% rename from theodolite-benchmarks/uc3-beam-flink/src/main/java/application/Uc3BeamFlink.java rename to theodolite-benchmarks/uc3-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc3/beam/flink/Uc3BeamFlink.java index 18532b2655fcc6c24dad5f2fca87607c0b5d2e54..8782559fea6a08ad2c5a92b355149e3a2ee02ea2 100644 --- a/theodolite-benchmarks/uc3-beam-flink/src/main/java/application/Uc3BeamFlink.java +++ b/theodolite-benchmarks/uc3-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc3/beam/flink/Uc3BeamFlink.java @@ -1,7 +1,8 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam.flink; import org.apache.beam.runners.flink.FlinkRunner; -import theodolite.commons.beam.AbstractBeamService; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc3.beam.PipelineFactory; /** * Implementation of the use case Aggregation based on Time Attributes using Apache Beam with the @@ -12,28 +13,15 @@ import theodolite.commons.beam.AbstractBeamService; * ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File under Standard * Input Output in Common in the Run Configuration Start via Eclipse Run. */ -public final class Uc3BeamFlink extends AbstractBeamService { +public final class Uc3BeamFlink { - /** - * Private constructor to avoid instantiation. - */ - private Uc3BeamFlink(final String[] args) { //NOPMD - super(args); - this.options.setRunner(FlinkRunner.class); - } + private Uc3BeamFlink() {} /** * Start running this microservice. */ public static void main(final String[] args) { - - final Uc3BeamFlink uc3BeamFlink = new Uc3BeamFlink(args); - - final Uc3BeamPipeline pipeline = - new Uc3BeamPipeline(uc3BeamFlink.options, uc3BeamFlink.getConfig()); - - pipeline.run().waitUntilFinish(); + new BeamService(PipelineFactory.factory(), FlinkRunner.class, args).run(); } - } diff --git a/theodolite-benchmarks/uc3-beam-samza/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-beam-samza/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-beam-samza/build.gradle b/theodolite-benchmarks/uc3-beam-samza/build.gradle index 513b850330f4f71f440ad5da4ecea95f092f5ccc..b5d47d82b9c6056492ec7c21aebd691f4e335ddb 100644 --- a/theodolite-benchmarks/uc3-beam-samza/build.gradle +++ b/theodolite-benchmarks/uc3-beam-samza/build.gradle @@ -2,9 +2,18 @@ plugins { id 'theodolite.beam.samza' } - dependencies { implementation project(':uc3-beam') } -mainClassName = "application.Uc3BeamSamza" \ No newline at end of file +sourceSets { + main { + resources { + srcDirs += [ + project(':uc3-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc3.beam.samza.Uc3BeamSamza" diff --git a/theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java b/theodolite-benchmarks/uc3-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc3/beam/samza/Uc3BeamSamza.java similarity index 59% rename from theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java rename to theodolite-benchmarks/uc3-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc3/beam/samza/Uc3BeamSamza.java index 913293bd02cb16e14ee9d94ea0e161c74853e72a..84e705f6f52f41f5c553a1ef3fb2ebd7ce95e20a 100644 --- a/theodolite-benchmarks/uc3-beam-samza/src/main/java/application/Uc3BeamSamza.java +++ b/theodolite-benchmarks/uc3-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc3/beam/samza/Uc3BeamSamza.java @@ -1,7 +1,8 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam.samza; import org.apache.beam.runners.samza.SamzaRunner; -import theodolite.commons.beam.AbstractBeamService; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc3.beam.PipelineFactory; /** * Implementation of the use case Aggregation based on Time Attributes using Apache Beam with the @@ -12,27 +13,15 @@ import theodolite.commons.beam.AbstractBeamService; * ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File under Standard * Input Output in Common in the Run Configuration Start via Eclipse Run. */ -public final class Uc3BeamSamza extends AbstractBeamService { +public final class Uc3BeamSamza { - /** - * Private constructor to avoid instantiation. - */ - private Uc3BeamSamza(final String[] args) { //NOPMD - super(args); - this.options.setRunner(SamzaRunner.class); - } + private Uc3BeamSamza() {} /** * Start running this microservice. */ public static void main(final String[] args) { - - final Uc3BeamSamza uc3BeamSamza = new Uc3BeamSamza(args); - - final Uc3BeamPipeline pipeline = - new Uc3BeamPipeline(uc3BeamSamza.options, uc3BeamSamza.getConfig()); - - pipeline.run().waitUntilFinish(); + new BeamService(PipelineFactory.factory(), SamzaRunner.class, args).run(); } } diff --git a/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties deleted file mode 100644 index 2db723927eaee10d39e02a6b2d369a06af7711fc..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc3-beam-samza/src/main/resources/META-INF/application.properties +++ /dev/null @@ -1,22 +0,0 @@ -application.name=theodolite-uc3-application -application.version=0.0.1 - -kafka.bootstrap.servers=localhost:9092 -kafka.input.topic=input -kafka.output.topic=output -kafka.window.duration.minutes=1 - -schema.registry.url=http://localhost:8081 - -aggregation.duration.days=30 -aggregation.advance.days=1 - -trigger.interval=15 - -num.threads=1 -commit.interval.ms=1000 -cache.max.bytes.buffering=-1 - -specific.avro.reader=True -enable.auto.commit.config=True -auto.offset.reset.config=earliest \ No newline at end of file diff --git a/theodolite-benchmarks/uc3-beam/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-beam/.settings/org.eclipse.jdt.ui.prefs index d71754b65d8da3cee7e6e440f49aa833ddabae10..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc3-beam/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc3-beam/.settings/org.eclipse.jdt.ui.prefs @@ -105,6 +105,7 @@ cleanup.strictly_equal_or_different=false cleanup.stringbuffer_to_stringbuilder=false cleanup.stringbuilder=false cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false cleanup.substring=false cleanup.switch=false cleanup.system_property=false @@ -144,6 +145,7 @@ org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false @@ -165,11 +167,11 @@ sp_cleanup.boolean_literal=false sp_cleanup.boolean_value_rather_than_comparison=false sp_cleanup.break_loop=false sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparing_on_criteria=true sp_cleanup.comparison_statement=false sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false -sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.convert_to_enhanced_for_loop=true sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true @@ -190,7 +192,7 @@ sp_cleanup.invert_equals=false sp_cleanup.join=false sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false +sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true @@ -227,14 +229,14 @@ sp_cleanup.redundant_comparator=false sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true sp_cleanup.remove_unused_local_variables=false sp_cleanup.remove_unused_private_fields=true @@ -251,7 +253,8 @@ sp_cleanup.static_inner_class=false sp_cleanup.strictly_equal_or_different=false sp_cleanup.stringbuffer_to_stringbuilder=false sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false sp_cleanup.substring=false sp_cleanup.switch=false sp_cleanup.system_property=false @@ -261,7 +264,7 @@ sp_cleanup.system_property_file_separator=false sp_cleanup.system_property_line_separator=false sp_cleanup.system_property_path_separator=false sp_cleanup.ternary_operator=false -sp_cleanup.try_with_resource=true +sp_cleanup.try_with_resource=false sp_cleanup.unlooped_while=false sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false @@ -278,6 +281,6 @@ sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false sp_cleanup.use_unboxing=false sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc3-beam/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/Uc3BeamPipeline.java b/theodolite-benchmarks/uc3-beam/src/main/java/application/Uc3BeamPipeline.java deleted file mode 100644 index c402271777dd63026e1f1fb36855dad1a72e1136..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/Uc3BeamPipeline.java +++ /dev/null @@ -1,102 +0,0 @@ -package application; - -import com.google.common.math.Stats; -import com.google.common.math.StatsAccumulator; -import java.util.Map; -import org.apache.beam.sdk.coders.AvroCoder; -import org.apache.beam.sdk.coders.CoderRegistry; -import org.apache.beam.sdk.coders.KvCoder; -import org.apache.beam.sdk.coders.SerializableCoder; -import org.apache.beam.sdk.options.PipelineOptions; -import org.apache.beam.sdk.transforms.Combine; -import org.apache.beam.sdk.transforms.MapElements; -import org.apache.beam.sdk.transforms.windowing.AfterProcessingTime; -import org.apache.beam.sdk.transforms.windowing.AfterWatermark; -import org.apache.beam.sdk.transforms.windowing.SlidingWindows; -import org.apache.beam.sdk.transforms.windowing.Window; -import org.apache.beam.sdk.values.KV; -import org.apache.commons.configuration2.Configuration; -import org.apache.kafka.common.serialization.StringSerializer; -import org.joda.time.Duration; -import theodolite.commons.beam.AbstractPipeline; -import theodolite.commons.beam.ConfigurationKeys; -import theodolite.commons.beam.kafka.KafkaActivePowerTimestampReader; -import theodolite.commons.beam.kafka.KafkaWriterTransformation; -import titan.ccp.model.records.ActivePowerRecord; - - -/** - * Implementation of the use case Aggregation based on Time Attributes using Apache Beam. - */ -public final class Uc3BeamPipeline extends AbstractPipeline { - - protected Uc3BeamPipeline(final PipelineOptions options, final Configuration config) { - super(options, config); - // Additional needed variables - final String outputTopic = config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); - - final Duration duration = - Duration.standardDays(config.getInt(ConfigurationKeys.AGGREGATION_DURATION_DAYS)); - final Duration aggregationAdvanceDuration = - Duration.standardDays(config.getInt(ConfigurationKeys.AGGREGATION_ADVANCE_DAYS)); - final Duration triggerDelay = - Duration.standardSeconds(config.getInt(ConfigurationKeys.TRIGGER_INTERVAL)); - - // Build Kafka configuration - final Map<String, Object> consumerConfig = this.buildConsumerConfig(); - - // Set Coders for classes that will be distributed - final CoderRegistry cr = this.getCoderRegistry(); - registerCoders(cr); - - // Read from Kafka - final KafkaActivePowerTimestampReader kafka = - new KafkaActivePowerTimestampReader(this.bootstrapServer, this.inputTopic, consumerConfig); - - // Map the time format - final MapTimeFormat mapTimeFormat = new MapTimeFormat(); - - // Get the stats per HourOfDay - final HourOfDayWithStats hourOfDayWithStats = new HourOfDayWithStats(); - - // Write to Kafka - final KafkaWriterTransformation<String> kafkaWriter = - new KafkaWriterTransformation<>(this.bootstrapServer, outputTopic, StringSerializer.class); - - this.apply(kafka) - // Map to correct time format - .apply(MapElements.via(mapTimeFormat)) - // Apply a sliding window - .apply(Window - .<KV<HourOfDayKey, ActivePowerRecord>>into( - SlidingWindows.of(duration).every(aggregationAdvanceDuration)) - .triggering(AfterWatermark.pastEndOfWindow() - .withEarlyFirings( - AfterProcessingTime.pastFirstElementInPane().plusDelayOf(triggerDelay))) - .withAllowedLateness(Duration.ZERO) - .accumulatingFiredPanes()) - - // Aggregate per window for every key - .apply(Combine.<HourOfDayKey, ActivePowerRecord, Stats>perKey(new StatsAggregation())) - .setCoder(KvCoder.of(new HourOfDaykeyCoder(), SerializableCoder.of(Stats.class))) - - // Map into correct output format - .apply(MapElements.via(hourOfDayWithStats)) - // Write to Kafka - .apply(kafkaWriter); - } - - - /** - * Registers all Coders for all needed Coders. - * - * @param cr CoderRegistry. - */ - private static void registerCoders(final CoderRegistry cr) { - cr.registerCoderForClass(ActivePowerRecord.class, AvroCoder.of(ActivePowerRecord.SCHEMA$)); - cr.registerCoderForClass(HourOfDayKey.class, new HourOfDaykeyCoder()); - cr.registerCoderForClass(StatsAggregation.class, SerializableCoder.of(StatsAggregation.class)); - cr.registerCoderForClass(StatsAccumulator.class, AvroCoder.of(StatsAccumulator.class)); - } -} - diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKey.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKey.java similarity index 77% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKey.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKey.java index 6db59dd65ee494157400b0f4c6eafbdd7655d402..bde85327cfa8daa82bd3b29db82a96b06e1621f4 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKey.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKey.java @@ -1,13 +1,8 @@ -package application; - -import org.apache.beam.sdk.coders.AvroCoder; -import org.apache.beam.sdk.coders.DefaultCoder; - +package rocks.theodolite.benchmarks.uc3.beam; /** * Composed key of an hour of the day and a sensor id. */ -@DefaultCoder(AvroCoder.class) public class HourOfDayKey { private final int hourOfDay; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDaykeyCoder.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyCoder.java similarity index 90% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDaykeyCoder.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyCoder.java index 196408263ec29a1ec9b45375dd0b53a18e8f60b3..4189761c05981815290c5d2779ad78e94fcb51c0 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDaykeyCoder.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyCoder.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam; import java.io.IOException; import java.io.InputStream; @@ -12,9 +12,9 @@ import org.apache.beam.sdk.coders.CoderException; import org.apache.kafka.common.serialization.Serde; /** - * Wrapper Class that encapsulates a HourOfDayKeySerde in a org.apache.beam.sdk.coders.Coder. + * Wrapper Class that encapsulates a {@link HourOfDayKeySerde} in a {@link Coder}. */ -public class HourOfDaykeyCoder extends Coder<HourOfDayKey> implements Serializable { +public class HourOfDayKeyCoder extends Coder<HourOfDayKey> implements Serializable { public static final long serialVersionUID = 4444444; private static final boolean DETERMINISTIC = true; private static final int VALUE_SIZE = 4; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeyFactory.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyFactory.java similarity index 92% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeyFactory.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyFactory.java index b993a0199bc13e9b416f9b9cb77a27635d7fe1e1..a685f324103b23a79fd53bda7eae55d798c40e1d 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeyFactory.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeyFactory.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam; import java.io.Serializable; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeySerde.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeySerde.java similarity index 95% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeySerde.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeySerde.java index 6855907e7f357d681c3bd9a6054bf15ad29711ed..1c09d7d508888b48c2a509d83f55ff49ca967f17 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeySerde.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayKeySerde.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.beam; import org.apache.kafka.common.serialization.Serde; import titan.ccp.common.kafka.simpleserdes.BufferSerde; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayWithStats.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayWithStats.java similarity index 93% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayWithStats.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayWithStats.java index 46232b3f13601d77f6cb7b13ea0bcdc31290357a..0d9aa6ab0342db1d92cfedc874adb8c454d00ef8 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayWithStats.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/HourOfDayWithStats.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam; import com.google.common.math.Stats; import org.apache.beam.sdk.transforms.SimpleFunction; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/MapTimeFormat.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/MapTimeFormat.java similarity index 73% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/MapTimeFormat.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/MapTimeFormat.java index 7d8897fb0fd76cd4eb145da6a7ce031f9f45d396..3c0d7acdbeccfaf03aac70df478e3db6dd1378e4 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/MapTimeFormat.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/MapTimeFormat.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam; import java.time.Instant; import java.time.LocalDateTime; @@ -8,7 +8,7 @@ import org.apache.beam.sdk.values.KV; import titan.ccp.model.records.ActivePowerRecord; /** - * Changes the time format to us europe/paris time. + * Changes the time format to us Europe/Paris time. */ public class MapTimeFormat extends SimpleFunction<KV<String, ActivePowerRecord>, KV<HourOfDayKey, ActivePowerRecord>> { @@ -17,11 +17,11 @@ public class MapTimeFormat private final ZoneId zone = ZoneId.of("Europe/Paris"); @Override - public KV<HourOfDayKey, ActivePowerRecord> apply( - final KV<String, ActivePowerRecord> kv) { + public KV<HourOfDayKey, ActivePowerRecord> apply(final KV<String, ActivePowerRecord> kv) { final Instant instant = Instant.ofEpochMilli(kv.getValue().getTimestamp()); final LocalDateTime dateTime = LocalDateTime.ofInstant(instant, this.zone); - return KV.of(this.keyFactory.createKey(kv.getValue().getIdentifier(), dateTime), + return KV.of( + this.keyFactory.createKey(kv.getValue().getIdentifier(), dateTime), kv.getValue()); } } diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/PipelineFactory.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/PipelineFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..de960d3d8466f9f420f002667df04d8a2fc64873 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/PipelineFactory.java @@ -0,0 +1,110 @@ +package rocks.theodolite.benchmarks.uc3.beam; + +import com.google.common.math.Stats; +import com.google.common.math.StatsAccumulator; +import java.util.function.Function; +import org.apache.beam.sdk.Pipeline; +import org.apache.beam.sdk.coders.AvroCoder; +import org.apache.beam.sdk.coders.CoderRegistry; +import org.apache.beam.sdk.coders.KvCoder; +import org.apache.beam.sdk.coders.SerializableCoder; +import org.apache.beam.sdk.options.PipelineOptions; +import org.apache.beam.sdk.transforms.Combine; +import org.apache.beam.sdk.transforms.MapElements; +import org.apache.beam.sdk.transforms.windowing.AfterProcessingTime; +import org.apache.beam.sdk.transforms.windowing.AfterWatermark; +import org.apache.beam.sdk.transforms.windowing.SlidingWindows; +import org.apache.beam.sdk.transforms.windowing.Window; +import org.apache.beam.sdk.values.KV; +import org.apache.commons.configuration2.Configuration; +import org.apache.kafka.common.serialization.StringSerializer; +import org.joda.time.Duration; +import rocks.theodolite.benchmarks.commons.beam.AbstractPipelineFactory; +import rocks.theodolite.benchmarks.commons.beam.ConfigurationKeys; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaActivePowerTimestampReader; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaWriterTransformation; +import titan.ccp.model.records.ActivePowerRecord; + +/** + * {@link AbstractPipelineFactory} for UC3. + */ +public class PipelineFactory extends AbstractPipelineFactory { + + public PipelineFactory(final Configuration configuration) { + super(configuration); + } + + @Override + protected void expandOptions(final PipelineOptions options) { + // No options to set + } + + @Override + protected void constructPipeline(final Pipeline pipeline) { + final String outputTopic = this.config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); + + final Duration duration = + Duration.standardDays(this.config.getInt(ConfigurationKeys.AGGREGATION_DURATION_DAYS)); + final Duration aggregationAdvanceDuration = + Duration.standardDays(this.config.getInt(ConfigurationKeys.AGGREGATION_ADVANCE_DAYS)); + final Duration triggerDelay = + Duration.standardSeconds(this.config.getInt(ConfigurationKeys.TRIGGER_INTERVAL)); + + // Read from Kafka + final KafkaActivePowerTimestampReader kafkaReader = super.buildKafkaReader(); + + // Map the time format + final MapTimeFormat mapTimeFormat = new MapTimeFormat(); + + // Get the stats per HourOfDay + final HourOfDayWithStats hourOfDayWithStats = new HourOfDayWithStats(); + + // Write to Kafka + final String bootstrapServer = this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS); + final KafkaWriterTransformation<String> kafkaWriter = + new KafkaWriterTransformation<>(bootstrapServer, outputTopic, StringSerializer.class); + + pipeline.apply(kafkaReader) + // Map to correct time format + .apply(MapElements.via(mapTimeFormat)) + // Apply a sliding window + .apply(Window + .<KV<HourOfDayKey, ActivePowerRecord>>into( + SlidingWindows.of(duration).every(aggregationAdvanceDuration)) + .triggering(AfterWatermark.pastEndOfWindow() + .withEarlyFirings( + AfterProcessingTime.pastFirstElementInPane().plusDelayOf(triggerDelay))) + .withAllowedLateness(Duration.ZERO) + .accumulatingFiredPanes()) + + // Aggregate per window for every key + .apply(Combine.perKey(new StatsAggregation())) + .setCoder(KvCoder.of(new HourOfDayKeyCoder(), SerializableCoder.of(Stats.class))) + + // Map into correct output format + .apply(MapElements.via(hourOfDayWithStats)) + // Write to Kafka + .apply(kafkaWriter); + } + + @Override + protected void registerCoders(final CoderRegistry registry) { + registry.registerCoderForClass( + ActivePowerRecord.class, + AvroCoder.of(ActivePowerRecord.SCHEMA$)); + registry.registerCoderForClass( + HourOfDayKey.class, + new HourOfDayKeyCoder()); + registry.registerCoderForClass( + StatsAggregation.class, + SerializableCoder.of(StatsAggregation.class)); + registry.registerCoderForClass( + StatsAccumulator.class, + AvroCoder.of(StatsAccumulator.class)); + } + + public static Function<Configuration, AbstractPipelineFactory> factory() { + return config -> new PipelineFactory(config); + } + +} diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/StatsAggregation.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsAggregation.java similarity index 96% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/StatsAggregation.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsAggregation.java index ee5cfc48bcd42dec41dd2030ad3f4a730fd6ac85..e479c0ab5e192f7e5239c100a05df454bd2973ad 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/StatsAggregation.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsAggregation.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.beam; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsKeyFactory.java b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsKeyFactory.java similarity index 87% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsKeyFactory.java rename to theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsKeyFactory.java index 0e414c4a13f1cf7df1da5f0026b6de82e1c1c6ce..6f34a50ad171da7d595f23f9b81f4dabfe226fae 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsKeyFactory.java +++ b/theodolite-benchmarks/uc3-beam/src/main/java/rocks/theodolite/benchmarks/uc3/beam/StatsKeyFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.beam; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-beam-flink/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc3-beam/src/main/resources/META-INF/application.properties similarity index 100% rename from theodolite-benchmarks/uc3-beam-flink/src/main/resources/META-INF/application.properties rename to theodolite-benchmarks/uc3-beam/src/main/resources/META-INF/application.properties diff --git a/theodolite-benchmarks/uc3-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-flink/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc3-flink/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc3-flink/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc3-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-flink/build.gradle b/theodolite-benchmarks/uc3-flink/build.gradle index b8bb79bc1d41627f57c3d9f3b897cbc4c260d620..b6eb067406400299dd3d40061f41b9bc414117b6 100644 --- a/theodolite-benchmarks/uc3-flink/build.gradle +++ b/theodolite-benchmarks/uc3-flink/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.flink' } -mainClassName = "theodolite.uc3.application.HistoryServiceFlinkJob" +mainClassName = "rocks.theodolite.benchmarks.uc3.flink.HistoryServiceFlinkJob" diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/ConfigurationKeys.java similarity index 96% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/ConfigurationKeys.java index bc4e0b9d2d230026e9d2b6df0a11e4fb68380aed..980f07b9b1478bd2c5fa74c89d1aaff4c10f60df 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application; +package rocks.theodolite.benchmarks.uc3.flink; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HistoryServiceFlinkJob.java similarity index 92% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HistoryServiceFlinkJob.java index 621146864fc84d032a7dc3c65fa253df9b940b2d..4cf7ed080882e42bf488a8e6490c3eab463882b4 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HistoryServiceFlinkJob.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HistoryServiceFlinkJob.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application; +package rocks.theodolite.benchmarks.uc3.flink; import com.google.common.math.Stats; import java.time.Instant; @@ -17,13 +17,13 @@ import org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer; import org.apache.kafka.common.serialization.Serdes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import theodolite.commons.flink.KafkaConnectorFactory; -import theodolite.commons.flink.StateBackends; -import theodolite.commons.flink.serialization.StatsSerializer; -import theodolite.uc3.application.util.HourOfDayKey; -import theodolite.uc3.application.util.HourOfDayKeyFactory; -import theodolite.uc3.application.util.HourOfDayKeySerde; -import theodolite.uc3.application.util.StatsKeyFactory; +import rocks.theodolite.benchmarks.commons.flink.KafkaConnectorFactory; +import rocks.theodolite.benchmarks.commons.flink.StateBackends; +import rocks.theodolite.benchmarks.commons.flink.serialization.StatsSerializer; +import rocks.theodolite.benchmarks.uc3.flink.util.HourOfDayKey; +import rocks.theodolite.benchmarks.uc3.flink.util.HourOfDayKeyFactory; +import rocks.theodolite.benchmarks.uc3.flink.util.HourOfDayKeySerde; +import rocks.theodolite.benchmarks.uc3.flink.util.StatsKeyFactory; import titan.ccp.common.configuration.ServiceConfigurations; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HourOfDayProcessWindowFunction.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HourOfDayProcessWindowFunction.java similarity index 89% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HourOfDayProcessWindowFunction.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HourOfDayProcessWindowFunction.java index 349c63413d0da792ad34e8ec8d94e7ff5dc06a42..9c70ef9dac3e7d000fa21a70b92109bc61156ab7 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/HourOfDayProcessWindowFunction.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/HourOfDayProcessWindowFunction.java @@ -1,11 +1,11 @@ -package theodolite.uc3.application; +package rocks.theodolite.benchmarks.uc3.flink; import com.google.common.math.Stats; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction; import org.apache.flink.streaming.api.windowing.windows.TimeWindow; import org.apache.flink.util.Collector; -import theodolite.uc3.application.util.HourOfDayKey; +import rocks.theodolite.benchmarks.uc3.flink.util.HourOfDayKey; /** * A {@link ProcessWindowFunction} that forwards a computed {@link Stats} object along with its diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/StatsAggregateFunction.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/StatsAggregateFunction.java similarity index 90% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/StatsAggregateFunction.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/StatsAggregateFunction.java index 4706da0a9491e0391f25cd61639c3bb565509cb1..38d277dac28e88c82a38a1b56ef15cab2c00db14 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/StatsAggregateFunction.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/StatsAggregateFunction.java @@ -1,9 +1,9 @@ -package theodolite.uc3.application; +package rocks.theodolite.benchmarks.uc3.flink; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; import org.apache.flink.api.common.functions.AggregateFunction; -import theodolite.uc3.application.util.StatsFactory; +import rocks.theodolite.benchmarks.uc3.flink.util.StatsFactory; import titan.ccp.model.records.ActivePowerRecord; /** diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKey.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKey.java similarity index 97% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKey.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKey.java index 5def88b404f23a59955ca2de42b91c22b7b1b53d..d5cf47bfbf9777dabd809eea8d7770946e39b8e0 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKey.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKey.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.flink.util; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeyFactory.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeyFactory.java similarity index 91% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeyFactory.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeyFactory.java index bd67b2508bc91a87635c52e95b963ed908ed92bf..91e4afb0423f16cd0dd3942301e2f6e51adcd402 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeyFactory.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeyFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.flink.util; import java.io.Serializable; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeySerde.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeySerde.java similarity index 97% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeySerde.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeySerde.java index 6e3ae9f754d2b1d4ab10349040f0c9e51134c4f7..2c5bd40fe29f683693fb57bc679dd288e7d3bfb9 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayKeySerde.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayKeySerde.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.flink.util; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayRecordFactory.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayRecordFactory.java similarity index 93% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayRecordFactory.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayRecordFactory.java index dfa9b95b08b95bf29621969c56a1e76cdcfc7877..5c52a446eac7f7ba39dfe12c247744054fd735d5 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayRecordFactory.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/HourOfDayRecordFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.flink.util; import com.google.common.math.Stats; import org.apache.kafka.streams.kstream.Windowed; diff --git a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/util/StatsFactory.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsFactory.java similarity index 91% rename from theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/util/StatsFactory.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsFactory.java index e4aff4fc80cea24c20be537f6aa5cda7c2be909a..71955acdf9c81d71284e761cbdf151b5a2bb73ef 100644 --- a/theodolite-benchmarks/uc2-kstreams/src/main/java/theodolite/uc2/streamprocessing/util/StatsFactory.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc2.streamprocessing.util; +package rocks.theodolite.benchmarks.uc3.flink.util; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsKeyFactory.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsKeyFactory.java similarity index 86% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsKeyFactory.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsKeyFactory.java index fdebccaa2d116253c41492cab3443057adef7b36..23ffed974c25e3ef43a49b2a72491d2be7f78d05 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsKeyFactory.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsKeyFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.flink.util; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsRecordFactory.java b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsRecordFactory.java similarity index 93% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsRecordFactory.java rename to theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsRecordFactory.java index 31935df9db0949b05e602109b3edc23dee9499af..f67187e4bcd87198509fc5a8c107c7ed039a1ae0 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/StatsRecordFactory.java +++ b/theodolite-benchmarks/uc3-flink/src/main/java/rocks/theodolite/benchmarks/uc3/flink/util/StatsRecordFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.flink.util; import com.google.common.math.Stats; import org.apache.avro.specific.SpecificRecord; diff --git a/theodolite-benchmarks/uc3-kstreams/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-kstreams/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc3-kstreams/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc3-kstreams/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc3-kstreams/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-kstreams/build.gradle b/theodolite-benchmarks/uc3-kstreams/build.gradle index d588d85ae88e3efd2b687e44e9eb9561a45cd8c0..ee92f636476cc5ee12f32c5e3f78d5a71c298a29 100644 --- a/theodolite-benchmarks/uc3-kstreams/build.gradle +++ b/theodolite-benchmarks/uc3-kstreams/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.kstreams' } -mainClassName = "theodolite.uc3.application.HistoryService" +mainClassName = "rocks.theodolite.benchmarks.uc3.kstreams.HistoryService" diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/application/HistoryService.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HistoryService.java similarity index 91% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/application/HistoryService.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HistoryService.java index 84fb29969d2ce37a1d443752790379b1af634df5..a327d2ecfa4c0727e7a29a69e7ab8910afdfd3d2 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/application/HistoryService.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HistoryService.java @@ -1,11 +1,10 @@ -package theodolite.uc3.application; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.time.Duration; import java.util.concurrent.CompletableFuture; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.KafkaStreams; -import theodolite.commons.kafkastreams.ConfigurationKeys; -import theodolite.uc3.streamprocessing.Uc3KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.ConfigurationKeys; import titan.ccp.common.configuration.ServiceConfigurations; /** diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKey.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKey.java similarity index 95% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKey.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKey.java index 549674f9f546a26d38491195edc2139aeadd785b..4e4d97986662f4777fc6ff8dafc28860ed49dc85 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKey.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKey.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.util.Objects; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeyFactory.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeyFactory.java similarity index 90% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeyFactory.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeyFactory.java index 837ca9d32e1a353917adcd3f70eb1af51d801613..02fdbaf56d0f2d1e3e317ecc3cd17710f8a3ea5c 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/HourOfDayKeyFactory.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeyFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeySerde.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeySerde.java similarity index 95% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeySerde.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeySerde.java index a0f8e0bbaf959154bfbab69d83da56c81d55802a..4014e5e30dee36a737ab582e527fc8fb4b8a32a9 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/HourOfDayKeySerde.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayKeySerde.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.kstreams; import org.apache.kafka.common.serialization.Serde; import titan.ccp.common.kafka.simpleserdes.BufferSerde; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayRecordFactory.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayRecordFactory.java similarity index 94% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayRecordFactory.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayRecordFactory.java index d8a42b74e5ca1cc55f9f21de62a5d8f877223e62..3d67a6ebe86eb33378fe0711b6b8ca1ab1f5c6a9 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/HourOfDayRecordFactory.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/HourOfDayRecordFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.kstreams; import com.google.common.math.Stats; import org.apache.kafka.streams.kstream.Windowed; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/RecordDatabaseAdapter.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/RecordDatabaseAdapter.java similarity index 98% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/RecordDatabaseAdapter.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/RecordDatabaseAdapter.java index 342cb3e04cd632fc4e8129de0bad6f12e8119dfa..111e262289ba25b6a41c65d0144119342efa2c52 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/RecordDatabaseAdapter.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/RecordDatabaseAdapter.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.util.Collection; import java.util.List; diff --git a/theodolite-benchmarks/uc3-beam/src/main/java/application/StatsKeyFactory.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsKeyFactory.java similarity index 86% rename from theodolite-benchmarks/uc3-beam/src/main/java/application/StatsKeyFactory.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsKeyFactory.java index 820168058f88ca21f8efcf61c7ebed60c08aa200..2473665a35fc0bda13bcbd462bfa98c0ebc00d9b 100644 --- a/theodolite-benchmarks/uc3-beam/src/main/java/application/StatsKeyFactory.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsKeyFactory.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.time.LocalDateTime; diff --git a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsRecordFactory.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsRecordFactory.java similarity index 93% rename from theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsRecordFactory.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsRecordFactory.java index 61333c99966b1ffea608d225f17d8460eac9ada1..1cbf031bde6744f1013220998241c4896fda504b 100644 --- a/theodolite-benchmarks/uc3-flink/src/main/java/theodolite/uc3/application/util/StatsRecordFactory.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/StatsRecordFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.application.util; +package rocks.theodolite.benchmarks.uc3.kstreams; import com.google.common.math.Stats; import org.apache.avro.specific.SpecificRecord; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/TopologyBuilder.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/TopologyBuilder.java similarity index 96% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/TopologyBuilder.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/TopologyBuilder.java index 4c63e21f3d9f1af6c9ef0363d7d01939faae9aef..b956959c5680c3c23eb35c0548004bb55de09a20 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/TopologyBuilder.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/TopologyBuilder.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.kstreams; import com.google.common.math.Stats; import java.time.Duration; @@ -16,7 +16,7 @@ import org.apache.kafka.streams.kstream.Grouped; import org.apache.kafka.streams.kstream.Materialized; import org.apache.kafka.streams.kstream.Produced; import org.apache.kafka.streams.kstream.TimeWindows; -import theodolite.uc3.streamprocessing.util.StatsFactory; +import rocks.theodolite.benchmarks.uc3.kstreams.util.StatsFactory; import titan.ccp.common.kafka.GenericSerde; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/Uc3KafkaStreamsBuilder.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/Uc3KafkaStreamsBuilder.java similarity index 93% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/Uc3KafkaStreamsBuilder.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/Uc3KafkaStreamsBuilder.java index ea9b064602b1aa7cf7350826da18990ae3191d43..3c80e5eedef0c9dda8ac3c729f158d0872b5769b 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/Uc3KafkaStreamsBuilder.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/Uc3KafkaStreamsBuilder.java @@ -1,11 +1,11 @@ -package theodolite.uc3.streamprocessing; +package rocks.theodolite.benchmarks.uc3.kstreams; import java.time.Duration; import java.util.Objects; import java.util.Properties; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.Topology; -import theodolite.commons.kafkastreams.KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.KafkaStreamsBuilder; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; /** diff --git a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/util/StatsFactory.java b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/util/StatsFactory.java similarity index 90% rename from theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/util/StatsFactory.java rename to theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/util/StatsFactory.java index 8099c85d652e57d30fe38e9d598783e2dc45ecb9..f2017073fbf3e240b5952f3f729f97e5ab5d1be5 100644 --- a/theodolite-benchmarks/uc3-kstreams/src/main/java/theodolite/uc3/streamprocessing/util/StatsFactory.java +++ b/theodolite-benchmarks/uc3-kstreams/src/main/java/rocks/theodolite/benchmarks/uc3/kstreams/util/StatsFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc3.streamprocessing.util; +package rocks.theodolite.benchmarks.uc3.kstreams.util; import com.google.common.math.Stats; import com.google.common.math.StatsAccumulator; diff --git a/theodolite-benchmarks/uc3-load-generator/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-load-generator/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc3-load-generator/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc3-load-generator/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc3-load-generator/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc3-load-generator/build.gradle b/theodolite-benchmarks/uc3-load-generator/build.gradle index fddc53ae8273a44d178e8828a38a503196af9208..b78846dd6ab4aee98755fd582acb2648a7319cd6 100644 --- a/theodolite-benchmarks/uc3-load-generator/build.gradle +++ b/theodolite-benchmarks/uc3-load-generator/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.load-generator' } -mainClassName = "theodolite.uc3.workloadgenerator.LoadGenerator" +mainClassName = "rocks.theodolite.benchmarks.uc3.loadgenerator.LoadGenerator" diff --git a/theodolite-benchmarks/uc3-load-generator/src/main/java/theodolite/uc3/workloadgenerator/LoadGenerator.java b/theodolite-benchmarks/uc3-load-generator/src/main/java/rocks/theodolite/benchmarks/uc3/loadgenerator/LoadGenerator.java similarity index 75% rename from theodolite-benchmarks/uc3-load-generator/src/main/java/theodolite/uc3/workloadgenerator/LoadGenerator.java rename to theodolite-benchmarks/uc3-load-generator/src/main/java/rocks/theodolite/benchmarks/uc3/loadgenerator/LoadGenerator.java index 97527abfdd86f5ea39c20c3da31cd7cd26b674e5..cac88e54a8a6d811946e3e021576f1049561b344 100644 --- a/theodolite-benchmarks/uc3-load-generator/src/main/java/theodolite/uc3/workloadgenerator/LoadGenerator.java +++ b/theodolite-benchmarks/uc3-load-generator/src/main/java/rocks/theodolite/benchmarks/uc3/loadgenerator/LoadGenerator.java @@ -1,4 +1,4 @@ -package theodolite.uc3.workloadgenerator; +package rocks.theodolite.benchmarks.uc3.loadgenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,7 +16,7 @@ public final class LoadGenerator { public static void main(final String[] args) { LOGGER.info("Start workload generator for use case UC3"); - theodolite.commons.workloadgeneration.LoadGenerator.fromEnvironment().run(); + rocks.theodolite.benchmarks.loadgenerator.LoadGenerator.fromEnvironment().run(); } } diff --git a/theodolite-benchmarks/uc4-beam-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-beam-flink/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-flink/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-beam-flink/build.gradle b/theodolite-benchmarks/uc4-beam-flink/build.gradle index 7ace89a2275e29e22186f7b67dcb7816cc7a85d0..8ccf18a2df2198ebd9749b0af095dffff12bd380 100644 --- a/theodolite-benchmarks/uc4-beam-flink/build.gradle +++ b/theodolite-benchmarks/uc4-beam-flink/build.gradle @@ -2,9 +2,18 @@ plugins { id 'theodolite.beam.flink' } - dependencies { implementation project(':uc4-beam') } -mainClassName = 'application.Uc4BeamFlink' \ No newline at end of file +sourceSets { + main { + resources { + srcDirs += [ + project(':uc4-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = 'rocks.theodolite.benchmarks.uc4.beam.flink.Uc4BeamFlink' diff --git a/theodolite-benchmarks/uc4-beam-flink/src/main/java/application/Uc4BeamFlink.java b/theodolite-benchmarks/uc4-beam-flink/src/main/java/application/Uc4BeamFlink.java deleted file mode 100644 index 90f9a4a292e99526fa94c7dd512bdcec548fbb4f..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc4-beam-flink/src/main/java/application/Uc4BeamFlink.java +++ /dev/null @@ -1,34 +0,0 @@ -package application; - -import org.apache.beam.runners.flink.FlinkRunner; -import org.apache.beam.sdk.Pipeline; -import theodolite.commons.beam.AbstractBeamService; - -/** - * Implementation of the use case Hierarchical Aggregation using Apache Beam with the Flink - * Runner. - **/ -public final class Uc4BeamFlink extends AbstractBeamService { - - - /** - * Private constructor setting specific options for this use case. - */ - private Uc4BeamFlink(final String[] args) { //NOPMD - super(args); - this.options.setRunner(FlinkRunner.class); - } - - /** - * Start running this microservice. - */ - public static void main(final String[] args) { - - final Uc4BeamFlink uc4BeamFlink = new Uc4BeamFlink(args); - - final Pipeline pipeline = new Uc4BeamPipeline(uc4BeamFlink.options, uc4BeamFlink.getConfig()); - - pipeline.run().waitUntilFinish(); - } - -} diff --git a/theodolite-benchmarks/uc4-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc4/beam/flink/Uc4BeamFlink.java b/theodolite-benchmarks/uc4-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc4/beam/flink/Uc4BeamFlink.java new file mode 100644 index 0000000000000000000000000000000000000000..5d398d610a12890e3fb9c85804a4b59a69163b4f --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-flink/src/main/java/rocks/theodolite/benchmarks/uc4/beam/flink/Uc4BeamFlink.java @@ -0,0 +1,21 @@ +package rocks.theodolite.benchmarks.uc4.beam.flink; + +import org.apache.beam.runners.flink.FlinkRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc4.beam.PipelineFactory; + +/** + * Implementation of the use case Hierarchical Aggregation using Apache Beam with the Flink Runner. + **/ +public final class Uc4BeamFlink { + + private Uc4BeamFlink() {} + + /** + * Start running this microservice. + */ + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), FlinkRunner.class, args).run(); + } + +} diff --git a/theodolite-benchmarks/uc4-beam-samza/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-beam-samza/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-samza/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,286 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=true +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_CAU-SE-Style +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CAU-SE-Style +formatter_settings_version=21 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder= +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-samza/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-beam-samza/build.gradle b/theodolite-benchmarks/uc4-beam-samza/build.gradle index 90dcc76b0cae5aeca61f76d0cb73347b2407408b..38e21bfd271587d6ef957d0b8ad0ed32c0ab4940 100644 --- a/theodolite-benchmarks/uc4-beam-samza/build.gradle +++ b/theodolite-benchmarks/uc4-beam-samza/build.gradle @@ -6,5 +6,14 @@ dependencies { implementation project(':uc4-beam') } +sourceSets { + main { + resources { + srcDirs += [ + project(':uc4-beam').sourceSets.main.resources + ] + } + } +} -mainClassName = "application.Uc4BeamSamza" +mainClassName = "rocks.theodolite.benchmarks.uc4.beam.samza.Uc4BeamSamza" diff --git a/theodolite-benchmarks/uc4-beam-samza/src/main/java/application/Uc4BeamSamza.java b/theodolite-benchmarks/uc4-beam-samza/src/main/java/application/Uc4BeamSamza.java deleted file mode 100644 index 3894fa95f16253e0a165dde70bf25d4a4bee96cb..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc4-beam-samza/src/main/java/application/Uc4BeamSamza.java +++ /dev/null @@ -1,40 +0,0 @@ -package application; - -import org.apache.beam.runners.samza.SamzaRunner; -import org.apache.beam.sdk.Pipeline; -import theodolite.commons.beam.AbstractBeamService; - -/** - * Implementation of the use case Hierarchical Aggregation using Apache Beam with the Samza - * Runner. To run locally in standalone start Kafka, Zookeeper, the schema-registry and the - * workload generator using the delayed_startup.sh script. Add - * --configFactory=org.apache.samza.config.factories.PropertiesConfigFactory - * --configFilePath=${workspace_loc:uc4-application-samza}/config/standalone_local.properties - * --samzaExecutionEnvironment=STANDALONE --maxSourceParallelism=1024 --as program arguments. To - * persist logs add ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File - * under Standard Input Output in Common in the Run Configuration Start via Eclipse Run. - */ -public final class Uc4BeamSamza extends AbstractBeamService { - - - /** - * Private constructor setting specific options for this use case. - */ - private Uc4BeamSamza(final String[] args) { //NOPMD - super(args); - this.options.setRunner(SamzaRunner.class); - } - - /** - * Start running this microservice. - */ - public static void main(final String[] args) { - - final Uc4BeamSamza uc4BeamSamza = new Uc4BeamSamza(args); - - final Pipeline pipeline = new Uc4BeamPipeline(uc4BeamSamza.options, uc4BeamSamza.getConfig()); - - pipeline.run().waitUntilFinish(); - } - -} diff --git a/theodolite-benchmarks/uc4-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc4/beam/samza/Uc4BeamSamza.java b/theodolite-benchmarks/uc4-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc4/beam/samza/Uc4BeamSamza.java new file mode 100644 index 0000000000000000000000000000000000000000..044b3dc4b647dffa02a62d17c9fcdaf15b0a0869 --- /dev/null +++ b/theodolite-benchmarks/uc4-beam-samza/src/main/java/rocks/theodolite/benchmarks/uc4/beam/samza/Uc4BeamSamza.java @@ -0,0 +1,28 @@ +package rocks.theodolite.benchmarks.uc4.beam.samza; + +import org.apache.beam.runners.samza.SamzaRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc4.beam.PipelineFactory; + +/** + * Implementation of the use case Hierarchical Aggregation using Apache Beam with the Samza Runner. + * To run locally in standalone start Kafka, Zookeeper, the schema-registry and the workload + * generator using the delayed_startup.sh script. Add + * --configFactory=org.apache.samza.config.factories.PropertiesConfigFactory + * --configFilePath=${workspace_loc:uc4-application-samza}/config/standalone_local.properties + * --samzaExecutionEnvironment=STANDALONE --maxSourceParallelism=1024 --as program arguments. To + * persist logs add ${workspace_loc:/uc4-application-samza/eclipseConsoleLogs.log} as Output File + * under Standard Input Output in Common in the Run Configuration Start via Eclipse Run. + */ +public final class Uc4BeamSamza { + + private Uc4BeamSamza() {} + + /** + * Start running this microservice. + */ + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), SamzaRunner.class, args).run(); + } + +} diff --git a/theodolite-benchmarks/uc4-beam-samza/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc4-beam-samza/src/main/resources/META-INF/application.properties deleted file mode 100644 index bc679580dadf969e181b6787e8287066426be7e2..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/uc4-beam-samza/src/main/resources/META-INF/application.properties +++ /dev/null @@ -1,25 +0,0 @@ -application.name=theodolite-uc4-application -application.version=0.0.1 - -kafka.bootstrap.servers=localhost:9092 -kafka.input.topic=input -kafka.output.topic=output -kafka.configuration.topic=configuration -kafka.feedback.topic=aggregation-feedback -kafka.window.duration.minutes=1 - -schema.registry.url=http://localhost:8081 - -aggregation.duration.days=30 -aggregation.advance.days=1 - -trigger.interval=15 -grace.period.ms=270 - -num.threads=1 -commit.interval.ms=1000 -cache.max.bytes.buffering=-1 - -specific.avro.reader=True -enable.auto.commit.config=True -auto.offset.reset.config=earliest \ No newline at end of file diff --git a/theodolite-benchmarks/uc4-beam/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-beam/.settings/org.eclipse.jdt.ui.prefs index 32e18c393f53a0b0b3207bb896ec0e4211b27bf0..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc4-beam/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc4-beam/.settings/org.eclipse.jdt.ui.prefs @@ -105,6 +105,7 @@ cleanup.strictly_equal_or_different=false cleanup.stringbuffer_to_stringbuilder=false cleanup.stringbuilder=false cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false cleanup.substring=false cleanup.switch=false cleanup.system_property=false @@ -166,11 +167,11 @@ sp_cleanup.boolean_literal=false sp_cleanup.boolean_value_rather_than_comparison=false sp_cleanup.break_loop=false sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparing_on_criteria=true sp_cleanup.comparison_statement=false sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false -sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.convert_to_enhanced_for_loop=true sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true @@ -191,7 +192,7 @@ sp_cleanup.invert_equals=false sp_cleanup.join=false sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false +sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true @@ -235,7 +236,7 @@ sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true sp_cleanup.remove_unused_local_variables=false sp_cleanup.remove_unused_private_fields=true @@ -252,7 +253,8 @@ sp_cleanup.static_inner_class=false sp_cleanup.strictly_equal_or_different=false sp_cleanup.stringbuffer_to_stringbuilder=false sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false sp_cleanup.substring=false sp_cleanup.switch=false sp_cleanup.system_property=false @@ -279,6 +281,6 @@ sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false sp_cleanup.use_unboxing=false sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.checkstyle.prefs new file mode 100644 index 0000000000000000000000000000000000000000..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 --- /dev/null +++ b/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -0,0 +1,4 @@ +configFilePath=../config/checkstyle.xml +customModulesJarPaths= +eclipse.preferences.version=1 +enabled=false diff --git a/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.pmd.prefs new file mode 100644 index 0000000000000000000000000000000000000000..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a --- /dev/null +++ b/theodolite-benchmarks/uc4-beam/.settings/qa.eclipse.plugin.pmd.prefs @@ -0,0 +1,4 @@ +customRulesJars= +eclipse.preferences.version=1 +enabled=false +ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedActivePowerRecordEventTimePolicy.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedActivePowerRecordEventTimePolicy.java similarity index 96% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedActivePowerRecordEventTimePolicy.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedActivePowerRecordEventTimePolicy.java index dad9eca7d8d50d1b85932ddaa7ffc99418a4b759..3af4957aa210a5f6a184bf4b513202dd4087567f 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedActivePowerRecordEventTimePolicy.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedActivePowerRecordEventTimePolicy.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import java.util.Optional; import org.apache.beam.sdk.io.kafka.KafkaRecord; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedToActive.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedToActive.java similarity index 94% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedToActive.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedToActive.java index bddd43e1e09c54bcfc85e5cbb65d1a6487f53438..63f914dca0e6536d52ce225e791d2e3b89107394 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/AggregatedToActive.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/AggregatedToActive.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import org.apache.beam.sdk.transforms.SimpleFunction; import org.apache.beam.sdk.values.KV; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/DuplicateAsFlatMap.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/DuplicateAsFlatMap.java similarity index 98% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/DuplicateAsFlatMap.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/DuplicateAsFlatMap.java index 347d76dfb3d1d1f09f1091296a322a23bba67ec0..1b430c99bb127f0746772571443f625ae69be54d 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/DuplicateAsFlatMap.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/DuplicateAsFlatMap.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import com.google.common.base.MoreObjects; import java.util.Collections; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/FilterEvents.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterEvents.java similarity index 92% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/FilterEvents.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterEvents.java index 3588443393fdef2e0fd1bf5f1e7c497e5030cf77..6a96d7270640c1cfa3a162e0d506792d577103c5 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/FilterEvents.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterEvents.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import org.apache.beam.sdk.transforms.SerializableFunction; import org.apache.beam.sdk.values.KV; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/FilterNullValues.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterNullValues.java similarity index 91% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/FilterNullValues.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterNullValues.java index 143294f1ff2bfeea77c40ce38cd10ce3eb44be49..9aa48d7b8f6fdc64aad205821ec4db25f606156b 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/FilterNullValues.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/FilterNullValues.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import org.apache.beam.sdk.transforms.SerializableFunction; import org.apache.beam.sdk.values.KV; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/GenerateParentsFn.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/GenerateParentsFn.java similarity index 94% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/GenerateParentsFn.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/GenerateParentsFn.java index 68cf551af9c681c586ebc6026c043ae8c9befbc5..e6f01c3d59c5c92f5d0c51ac807a76f0a37612b1 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/GenerateParentsFn.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/GenerateParentsFn.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import java.util.Collections; import java.util.Iterator; @@ -8,8 +8,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.values.KV; -// import theodolite.uc2.streamprocessing.KeyValue; -// import theodolite.uc2.streamprocessing.KeyValueIterator; import titan.ccp.configuration.events.Event; import titan.ccp.model.sensorregistry.AggregatedSensor; import titan.ccp.model.sensorregistry.Sensor; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/Uc4BeamPipeline.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/PipelineFactory.java similarity index 61% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/Uc4BeamPipeline.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/PipelineFactory.java index 0c63e6f9322e5f70f1ad010de168f1a5292a45a4..4cb707017ff90236df4546b87e472b86eb495e10 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/Uc4BeamPipeline.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/PipelineFactory.java @@ -1,9 +1,13 @@ -package application; // NOPMD +package rocks.theodolite.benchmarks.uc4.beam; // NOPMD import com.google.common.math.StatsAccumulator; +import io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig; +import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig; import java.util.HashMap; import java.util.Map; import java.util.Set; +import java.util.function.Function; +import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.coders.AvroCoder; import org.apache.beam.sdk.coders.CoderRegistry; import org.apache.beam.sdk.coders.SetCoder; @@ -31,83 +35,82 @@ import org.apache.commons.configuration2.Configuration; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.common.serialization.StringDeserializer; import org.joda.time.Duration; -import serialization.AggregatedActivePowerRecordCoder; -import serialization.AggregatedActivePowerRecordDeserializer; -import serialization.AggregatedActivePowerRecordSerializer; -import serialization.EventCoder; -import serialization.EventDeserializer; -import serialization.SensorParentKeyCoder; -import theodolite.commons.beam.AbstractPipeline; -import theodolite.commons.beam.ConfigurationKeys; -import theodolite.commons.beam.kafka.KafkaActivePowerTimestampReader; -import theodolite.commons.beam.kafka.KafkaGenericReader; -import theodolite.commons.beam.kafka.KafkaWriterTransformation; +import rocks.theodolite.benchmarks.commons.beam.AbstractPipelineFactory; +import rocks.theodolite.benchmarks.commons.beam.ConfigurationKeys; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaActivePowerTimestampReader; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaGenericReader; +import rocks.theodolite.benchmarks.commons.beam.kafka.KafkaWriterTransformation; +import rocks.theodolite.benchmarks.uc4.beam.serialization.AggregatedActivePowerRecordCoder; +import rocks.theodolite.benchmarks.uc4.beam.serialization.AggregatedActivePowerRecordDeserializer; +import rocks.theodolite.benchmarks.uc4.beam.serialization.AggregatedActivePowerRecordSerializer; +import rocks.theodolite.benchmarks.uc4.beam.serialization.EventCoder; +import rocks.theodolite.benchmarks.uc4.beam.serialization.EventDeserializer; +import rocks.theodolite.benchmarks.uc4.beam.serialization.SensorParentKeyCoder; import titan.ccp.configuration.events.Event; import titan.ccp.model.records.ActivePowerRecord; import titan.ccp.model.records.AggregatedActivePowerRecord; /** - * Implementation of the use case Hierarchical Aggregation using Apache Beam. + * {@link AbstractPipelineFactory} for UC4. */ -public final class Uc4BeamPipeline extends AbstractPipeline { +public class PipelineFactory extends AbstractPipelineFactory { - protected Uc4BeamPipeline(final PipelineOptions options, final Configuration config) { // NOPMD - super(options, config); - - // Additional needed variables - final String feedbackTopic = config.getString(ConfigurationKeys.KAFKA_FEEDBACK_TOPIC); - final String outputTopic = config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); - final String configurationTopic = config.getString(ConfigurationKeys.KAFKA_CONFIGURATION_TOPIC); + public PipelineFactory(final Configuration configuration) { + super(configuration); + } - final Duration duration = - Duration.standardSeconds(config.getInt(ConfigurationKeys.KAFKA_WINDOW_DURATION_MINUTES)); - final Duration triggerDelay = - Duration.standardSeconds(config.getInt(ConfigurationKeys.TRIGGER_INTERVAL)); - final Duration gracePeriod = - Duration.standardSeconds(config.getInt(ConfigurationKeys.GRACE_PERIOD_MS)); + @Override + protected void expandOptions(final PipelineOptions options) { + // No options to set + } - // Build Kafka configuration - final Map<String, Object> consumerConfig = super.buildConsumerConfig(); - final Map<String, Object> configurationConfig = this.configurationConfig(config); + @Override + protected void constructPipeline(final Pipeline pipeline) { // NOPMD + // Additional needed variables + final String feedbackTopic = this.config.getString(ConfigurationKeys.KAFKA_FEEDBACK_TOPIC); + final String outputTopic = this.config.getString(ConfigurationKeys.KAFKA_OUTPUT_TOPIC); + final String configurationTopic = + this.config.getString(ConfigurationKeys.KAFKA_CONFIGURATION_TOPIC); - // Set Coders for Classes that will be distributed - final CoderRegistry cr = this.getCoderRegistry(); - registerCoders(cr); + final Duration duration = Duration.standardSeconds( + this.config.getInt(ConfigurationKeys.KAFKA_WINDOW_DURATION_MINUTES)); + final Duration triggerDelay = Duration.standardSeconds( + this.config.getInt(ConfigurationKeys.TRIGGER_INTERVAL)); + final Duration gracePeriod = Duration.standardSeconds( + this.config.getInt(ConfigurationKeys.GRACE_PERIOD_MS)); // Read from Kafka + final String bootstrapServer = this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS); + // ActivePowerRecords - final KafkaActivePowerTimestampReader kafkaActivePowerRecordReader = - new KafkaActivePowerTimestampReader( - this.bootstrapServer, - this.inputTopic, - consumerConfig); + final KafkaActivePowerTimestampReader kafkaActivePowerRecordReader = super.buildKafkaReader(); // Configuration Events final KafkaGenericReader<Event, String> kafkaConfigurationReader = new KafkaGenericReader<>( - this.bootstrapServer, + bootstrapServer, configurationTopic, - configurationConfig, + this.configurationConfig(), EventDeserializer.class, StringDeserializer.class); // Write to Kafka final KafkaWriterTransformation<AggregatedActivePowerRecord> kafkaOutput = new KafkaWriterTransformation<>( - this.bootstrapServer, + bootstrapServer, outputTopic, AggregatedActivePowerRecordSerializer.class, - super.buildProducerConfig()); + this.buildProducerConfig()); final KafkaWriterTransformation<AggregatedActivePowerRecord> kafkaFeedback = new KafkaWriterTransformation<>( - this.bootstrapServer, + bootstrapServer, feedbackTopic, AggregatedActivePowerRecordSerializer.class, - super.buildProducerConfig()); + this.buildProducerConfig()); // Apply pipeline transformations - final PCollection<KV<String, ActivePowerRecord>> values = this + final PCollection<KV<String, ActivePowerRecord>> values = pipeline .apply("Read from Kafka", kafkaActivePowerRecordReader) .apply("Read Windows", Window.into(FixedWindows.of(duration))) .apply("Set trigger for input", Window @@ -119,15 +122,15 @@ public final class Uc4BeamPipeline extends AbstractPipeline { .discardingFiredPanes()); // Read the results of earlier aggregations. - final PCollection<KV<String, ActivePowerRecord>> aggregationsInput = this + final PCollection<KV<String, ActivePowerRecord>> aggregationsInput = pipeline .apply("Read aggregation results", KafkaIO.<String, AggregatedActivePowerRecord>read() - .withBootstrapServers(this.bootstrapServer) + .withBootstrapServers(bootstrapServer) .withTopic(feedbackTopic) .withKeyDeserializer(StringDeserializer.class) .withValueDeserializerAndCoder( AggregatedActivePowerRecordDeserializer.class, AvroCoder.of(AggregatedActivePowerRecord.class)) - .withConsumerConfigUpdates(consumerConfig) + .withConsumerConfigUpdates(this.buildConsumerConfig()) .withTimestampPolicyFactory( (tp, previousWaterMark) -> new AggregatedActivePowerRecordEventTimePolicy( previousWaterMark)) @@ -155,7 +158,7 @@ public final class Uc4BeamPipeline extends AbstractPipeline { Flatten.pCollections()); // Build the configuration stream from a changelog. - final PCollection<KV<String, Set<String>>> configurationStream = this + final PCollection<KV<String, Set<String>>> configurationStream = pipeline .apply("Read sensor groups", kafkaConfigurationReader) // Only forward relevant changes in the hierarchy .apply("Filter changed and status events", @@ -214,7 +217,28 @@ public final class Uc4BeamPipeline extends AbstractPipeline { aggregations.apply("Write to aggregation results", kafkaOutput); aggregations.apply("Write to feedback topic", kafkaFeedback); + } + @Override + protected void registerCoders(final CoderRegistry registry) { + registry.registerCoderForClass( + ActivePowerRecord.class, + AvroCoder.of(ActivePowerRecord.class)); + registry.registerCoderForClass( + AggregatedActivePowerRecord.class, + new AggregatedActivePowerRecordCoder()); + registry.registerCoderForClass( + Set.class, + SetCoder.of(StringUtf8Coder.of())); + registry.registerCoderForClass( + Event.class, + new EventCoder()); + registry.registerCoderForClass( + SensorParentKey.class, + new SensorParentKeyCoder()); + registry.registerCoderForClass( + StatsAccumulator.class, + AvroCoder.of(StatsAccumulator.class)); } @@ -223,35 +247,58 @@ public final class Uc4BeamPipeline extends AbstractPipeline { * * @return the build configuration. */ - public Map<String, Object> configurationConfig(final Configuration config) { + private Map<String, Object> configurationConfig() { final Map<String, Object> consumerConfig = new HashMap<>(); consumerConfig.put( ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, - config.getString(ConfigurationKeys.ENABLE_AUTO_COMMIT_CONFIG)); + this.config.getString(ConfigurationKeys.ENABLE_AUTO_COMMIT_CONFIG)); consumerConfig.put( ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, - config.getString(ConfigurationKeys.AUTO_OFFSET_RESET_CONFIG)); + this.config.getString(ConfigurationKeys.AUTO_OFFSET_RESET_CONFIG)); consumerConfig.put( - ConsumerConfig.GROUP_ID_CONFIG, config + ConsumerConfig.GROUP_ID_CONFIG, this.config .getString(ConfigurationKeys.APPLICATION_NAME) + "-configuration"); return consumerConfig; } + private Map<String, Object> buildConsumerConfig() { + final Map<String, Object> consumerConfig = new HashMap<>(); + consumerConfig.put( + ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, + this.config.getString(ConfigurationKeys.ENABLE_AUTO_COMMIT_CONFIG)); + consumerConfig.put( + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, + this.config.getString(ConfigurationKeys.AUTO_OFFSET_RESET_CONFIG)); + consumerConfig.put( + AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, + this.config.getString(ConfigurationKeys.SCHEMA_REGISTRY_URL)); + consumerConfig.put( + KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG, + this.config.getString(ConfigurationKeys.SPECIFIC_AVRO_READER)); + consumerConfig.put( + ConsumerConfig.GROUP_ID_CONFIG, + this.config.getString(ConfigurationKeys.APPLICATION_NAME)); + return consumerConfig; + } /** - * Registers all Coders for all needed Coders. + * Builds a simple configuration for a Kafka producer transformation. * - * @param cr CoderRegistry. + * @return the build configuration. */ - private static void registerCoders(final CoderRegistry cr) { - cr.registerCoderForClass(ActivePowerRecord.class, - AvroCoder.of(ActivePowerRecord.class)); - cr.registerCoderForClass(AggregatedActivePowerRecord.class, - new AggregatedActivePowerRecordCoder()); - cr.registerCoderForClass(Set.class, SetCoder.of(StringUtf8Coder.of())); - cr.registerCoderForClass(Event.class, new EventCoder()); - cr.registerCoderForClass(SensorParentKey.class, new SensorParentKeyCoder()); - cr.registerCoderForClass(StatsAccumulator.class, AvroCoder.of(StatsAccumulator.class)); + private Map<String, Object> buildProducerConfig() { + final Map<String, Object> config = new HashMap<>(); + config.put( + AbstractKafkaAvroSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, + this.config.getString(ConfigurationKeys.SCHEMA_REGISTRY_URL)); + config.put( + KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG, + this.config.getString(ConfigurationKeys.SPECIFIC_AVRO_READER)); + return config; } -} + public static Function<Configuration, AbstractPipelineFactory> factory() { + return config -> new PipelineFactory(config); + } + +} diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/RecordAggregation.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/RecordAggregation.java similarity index 97% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/RecordAggregation.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/RecordAggregation.java index 16fd411b44cc1f955b255be870215ac120bce193..6fbf6ff3f3abcdfd4f5ca0de93d68c2532655b4d 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/RecordAggregation.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/RecordAggregation.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import java.io.Serializable; import org.apache.beam.sdk.coders.AvroCoder; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/SensorParentKey.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SensorParentKey.java similarity index 93% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/SensorParentKey.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SensorParentKey.java index 546fc04c2de089a28d8f0fba86a7fbcd5c1cc0a8..28efd63f2cecbc40f9e9fcb3f59301fd86c5909a 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/SensorParentKey.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SensorParentKey.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; /** * A key consisting of the identifier of a sensor and an identifier of parent sensor. diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/SetIdForAggregated.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetIdForAggregated.java similarity index 94% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/SetIdForAggregated.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetIdForAggregated.java index 0279a26ed925408b5383be50a202f5c88cea53aa..23ebb6d0104ef3992b4e2a4763dd23e722fe30f9 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/SetIdForAggregated.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetIdForAggregated.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import org.apache.beam.sdk.transforms.SimpleFunction; import org.apache.beam.sdk.values.KV; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/SetKeyToGroup.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetKeyToGroup.java similarity index 92% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/SetKeyToGroup.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetKeyToGroup.java index 7d8dc70583fb45e02a5a8091b92d724bb22b4a78..3ffba12823aca2da88250eb601615de1ac5177e2 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/SetKeyToGroup.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/SetKeyToGroup.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import org.apache.beam.sdk.transforms.SimpleFunction; import org.apache.beam.sdk.values.KV; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/application/UpdateChildParentPairs.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/UpdateChildParentPairs.java similarity index 96% rename from theodolite-benchmarks/uc4-beam/src/main/java/application/UpdateChildParentPairs.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/UpdateChildParentPairs.java index cff04e132a93f6c8098c3039232dd48084e6d264..190bb074d4430f23aeabcd123d1f1c4bc937cd0d 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/application/UpdateChildParentPairs.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/UpdateChildParentPairs.java @@ -1,4 +1,4 @@ -package application; +package rocks.theodolite.benchmarks.uc4.beam; import java.util.Set; import org.apache.beam.sdk.state.StateSpec; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordCoder.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordCoder.java similarity index 96% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordCoder.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordCoder.java index 3e0be0fa456efa3ec67504ea9d0e285ae8b3b913..f460d42de2042064952434f6bf044920f217138a 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordCoder.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordCoder.java @@ -1,4 +1,4 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; import java.io.IOException; import java.io.InputStream; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordDeserializer.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordDeserializer.java similarity index 86% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordDeserializer.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordDeserializer.java index 3076861a53dac031afd9e8eb913b5a0bafe480c0..2c481f8e6f68a3a0decbcb73c3751f464646b7cf 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordDeserializer.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordDeserializer.java @@ -1,4 +1,4 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; import io.confluent.kafka.streams.serdes.avro.SpecificAvroDeserializer; import org.apache.kafka.common.serialization.Deserializer; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordSerializer.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordSerializer.java similarity index 86% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordSerializer.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordSerializer.java index 26801d8a28b9756214c65c4e8190e15d04bb3e68..073c3d0f94c24872460ae58c6236a0c4e19e0d5d 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/AggregatedActivePowerRecordSerializer.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/AggregatedActivePowerRecordSerializer.java @@ -1,4 +1,4 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; import io.confluent.kafka.streams.serdes.avro.SpecificAvroSerializer; import org.apache.kafka.common.serialization.Serializer; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventCoder.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventCoder.java similarity index 97% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventCoder.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventCoder.java index 710beb71dc8776e6309028327b05307aa590a7f6..b96398398e61f3db0f0632f8384d11f30ccc7aca 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventCoder.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventCoder.java @@ -1,4 +1,4 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; import java.io.IOException; import java.io.InputStream; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventDeserializer.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventDeserializer.java similarity index 94% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventDeserializer.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventDeserializer.java index 34e31a3059d0749848a30979f32e6df6651c1b47..ae9c480e1c76949f8cfa5d27c73282e270232d0a 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/EventDeserializer.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/EventDeserializer.java @@ -1,4 +1,4 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; import java.util.Map; import org.apache.kafka.common.serialization.ByteBufferDeserializer; diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeyCoder.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeyCoder.java similarity index 94% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeyCoder.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeyCoder.java index 3e85c3242fb854bef514787c92bb58ad76526cb4..b75037bce24b5b5ab07c9ef6818c0739f68544b2 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeyCoder.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeyCoder.java @@ -1,6 +1,5 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; -import application.SensorParentKey; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -11,6 +10,7 @@ import java.util.List; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.CoderException; import org.apache.kafka.common.serialization.Serde; +import rocks.theodolite.benchmarks.uc4.beam.SensorParentKey; /** * Wrapper Class that encapsulates a SensorParentKey Serde in a org.apache.beam.sdk.coders.Coder. diff --git a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeySerde.java b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeySerde.java similarity index 88% rename from theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeySerde.java rename to theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeySerde.java index 468adb3947439c11c4fd9b289f41b68e606bdb1d..64242b3fd2618b154e47cc46ce2fe6f9375be209 100644 --- a/theodolite-benchmarks/uc4-beam/src/main/java/serialization/SensorParentKeySerde.java +++ b/theodolite-benchmarks/uc4-beam/src/main/java/rocks/theodolite/benchmarks/uc4/beam/serialization/SensorParentKeySerde.java @@ -1,7 +1,7 @@ -package serialization; +package rocks.theodolite.benchmarks.uc4.beam.serialization; -import application.SensorParentKey; import org.apache.kafka.common.serialization.Serde; +import rocks.theodolite.benchmarks.uc4.beam.SensorParentKey; import titan.ccp.common.kafka.simpleserdes.BufferSerde; import titan.ccp.common.kafka.simpleserdes.ReadBuffer; import titan.ccp.common.kafka.simpleserdes.SimpleSerdes; diff --git a/theodolite-benchmarks/uc4-beam-flink/src/main/resources/META-INF/application.properties b/theodolite-benchmarks/uc4-beam/src/main/resources/META-INF/application.properties similarity index 100% rename from theodolite-benchmarks/uc4-beam-flink/src/main/resources/META-INF/application.properties rename to theodolite-benchmarks/uc4-beam/src/main/resources/META-INF/application.properties diff --git a/theodolite-benchmarks/uc4-flink/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-flink/.settings/org.eclipse.jdt.ui.prefs index 08fcb07933ca19165976bffd5e7fdfdaf64ee1d2..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc4-flink/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc4-flink/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_redundant_modifiers=true -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc4-flink/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-flink/build.gradle b/theodolite-benchmarks/uc4-flink/build.gradle index ebc7ca5f30a668fd161bb22f95133452b5061441..c095c4126bfae6556e51596a2d53ade601cf321f 100644 --- a/theodolite-benchmarks/uc4-flink/build.gradle +++ b/theodolite-benchmarks/uc4-flink/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.flink' } -mainClassName = "theodolite.uc4.application.AggregationServiceFlinkJob" +mainClassName = "rocks.theodolite.benchmarks.uc2.flink.AggregationServiceFlinkJob" diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/AggregationServiceFlinkJob.java similarity index 94% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/AggregationServiceFlinkJob.java index 48eadff101905b746ab239f6030decb728c12475..726a7f590aaa5be4ccb6e817076da5ede21cf272 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/AggregationServiceFlinkJob.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/AggregationServiceFlinkJob.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application; // NOPMD Imports required +package rocks.theodolite.benchmarks.uc4.flink; // NOPMD Imports required import java.time.Duration; import java.util.Set; @@ -19,13 +19,13 @@ import org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer; import org.apache.kafka.common.serialization.Serdes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import theodolite.commons.flink.KafkaConnectorFactory; -import theodolite.commons.flink.StateBackends; -import theodolite.commons.flink.TupleType; -import theodolite.uc4.application.util.ImmutableSensorRegistrySerializer; -import theodolite.uc4.application.util.ImmutableSetSerializer; -import theodolite.uc4.application.util.SensorParentKey; -import theodolite.uc4.application.util.SensorParentKeySerializer; +import rocks.theodolite.benchmarks.commons.flink.KafkaConnectorFactory; +import rocks.theodolite.benchmarks.commons.flink.StateBackends; +import rocks.theodolite.benchmarks.commons.flink.TupleType; +import rocks.theodolite.benchmarks.uc4.flink.util.ImmutableSensorRegistrySerializer; +import rocks.theodolite.benchmarks.uc4.flink.util.ImmutableSetSerializer; +import rocks.theodolite.benchmarks.uc4.flink.util.SensorParentKey; +import rocks.theodolite.benchmarks.uc4.flink.util.SensorParentKeySerializer; import titan.ccp.common.configuration.ServiceConfigurations; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; import titan.ccp.configuration.events.Event; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ChildParentsFlatMapFunction.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ChildParentsFlatMapFunction.java similarity index 98% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ChildParentsFlatMapFunction.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ChildParentsFlatMapFunction.java index 910dc359fa9b5b0810f7f9b6e67bfceaa68cc798..c439df1e49381f8779a64814ae056635bd408c64 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ChildParentsFlatMapFunction.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ChildParentsFlatMapFunction.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application; +package rocks.theodolite.benchmarks.uc4.flink; import java.util.Iterator; import java.util.Map; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ConfigurationKeys.java similarity index 96% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ConfigurationKeys.java index 448e8b095ef15c434655ca3c76a9e2de21244054..290f4341958dd133926234219017cbb9149dd3f8 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/ConfigurationKeys.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/ConfigurationKeys.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application; +package rocks.theodolite.benchmarks.uc4.flink; /** * Keys to access configuration parameters. diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/JoinAndDuplicateCoFlatMapFunction.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/JoinAndDuplicateCoFlatMapFunction.java similarity index 95% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/JoinAndDuplicateCoFlatMapFunction.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/JoinAndDuplicateCoFlatMapFunction.java index 6ef9a72e9695cfccba0bbcca1238f7ebc94fc505..624327a69feb8bce2f1b85af3e57cf5db9511e74 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/JoinAndDuplicateCoFlatMapFunction.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/JoinAndDuplicateCoFlatMapFunction.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application; +package rocks.theodolite.benchmarks.uc4.flink; import java.util.Set; import org.apache.flink.api.common.state.MapState; @@ -9,7 +9,7 @@ import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.configuration.Configuration; import org.apache.flink.streaming.api.functions.co.RichCoFlatMapFunction; import org.apache.flink.util.Collector; -import theodolite.uc4.application.util.SensorParentKey; +import rocks.theodolite.benchmarks.uc4.flink.util.SensorParentKey; import titan.ccp.model.records.ActivePowerRecord; /** diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/RecordAggregationProcessWindowFunction.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/RecordAggregationProcessWindowFunction.java similarity index 97% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/RecordAggregationProcessWindowFunction.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/RecordAggregationProcessWindowFunction.java index 45d4a09d153881572c949d2af7542f9cffb5622d..29e1ea32235ae0789e72f4931932b2697c60759b 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/RecordAggregationProcessWindowFunction.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/RecordAggregationProcessWindowFunction.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application; +package rocks.theodolite.benchmarks.uc4.flink; import org.apache.flink.api.common.state.MapState; import org.apache.flink.api.common.state.MapStateDescriptor; @@ -11,7 +11,7 @@ import org.apache.flink.configuration.Configuration; import org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction; import org.apache.flink.streaming.api.windowing.windows.TimeWindow; import org.apache.flink.util.Collector; -import theodolite.uc4.application.util.SensorParentKey; +import rocks.theodolite.benchmarks.uc4.flink.util.SensorParentKey; import titan.ccp.model.records.ActivePowerRecord; import titan.ccp.model.records.AggregatedActivePowerRecord; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSensorRegistrySerializer.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSensorRegistrySerializer.java similarity index 94% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSensorRegistrySerializer.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSensorRegistrySerializer.java index e157f35c8a052d2d4a28526a0d98d56515d586d6..54d8826900cc70a5eb86d71df7fcf9c4a4da4a7f 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSensorRegistrySerializer.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSensorRegistrySerializer.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application.util; +package rocks.theodolite.benchmarks.uc4.flink.util; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSetSerializer.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSetSerializer.java similarity index 96% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSetSerializer.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSetSerializer.java index 6b2dbcdfb403705b39815dd31112deab7947d83d..4c23ffefc7e2715c68aa450a235a87bd914a5ed5 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/ImmutableSetSerializer.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/ImmutableSetSerializer.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application.util; +package rocks.theodolite.benchmarks.uc4.flink.util; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKey.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKey.java similarity index 95% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKey.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKey.java index 903b66dd12a2864d522fde7eb7cf3fdc2ec73bcd..af67c35cefb20abc0bb5d96c3940db71c786f586 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKey.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKey.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application.util; +package rocks.theodolite.benchmarks.uc4.flink.util; import java.util.Objects; diff --git a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKeySerializer.java b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKeySerializer.java similarity index 94% rename from theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKeySerializer.java rename to theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKeySerializer.java index bdd403a05de8f54f636568e839f5f48effd43d58..c18709436eec4f34113d0737821a9fab319ee9c1 100644 --- a/theodolite-benchmarks/uc4-flink/src/main/java/theodolite/uc4/application/util/SensorParentKeySerializer.java +++ b/theodolite-benchmarks/uc4-flink/src/main/java/rocks/theodolite/benchmarks/uc4/flink/util/SensorParentKeySerializer.java @@ -1,4 +1,4 @@ -package theodolite.uc4.application.util; +package rocks.theodolite.benchmarks.uc4.flink.util; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; diff --git a/theodolite-benchmarks/uc4-kstreams/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-kstreams/.settings/org.eclipse.jdt.ui.prefs index a375cb792eeb842ecfd1f789fbf6a716df43e9c8..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc4-kstreams/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc4-kstreams/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,9 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc4-kstreams/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-kstreams/build.gradle b/theodolite-benchmarks/uc4-kstreams/build.gradle index 83212a499ae344ea44beb3c2b98aec147dda8488..52d201783364d72d2fda9aeeb39f9e2dba708ce7 100644 --- a/theodolite-benchmarks/uc4-kstreams/build.gradle +++ b/theodolite-benchmarks/uc4-kstreams/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.kstreams' } -mainClassName = "theodolite.uc4.application.AggregationService" +mainClassName = "rocks.theodolite.benchmarks.uc4.kstreams.AggregationService" diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/application/AggregationService.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/AggregationService.java similarity index 92% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/application/AggregationService.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/AggregationService.java index 5c9d0910e7fbc60e58b13fc838f7ef2407de2aa3..341c37bc086dabb3a93dcd3b0f221dd91007b8b3 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/application/AggregationService.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/AggregationService.java @@ -1,11 +1,10 @@ -package theodolite.uc4.application; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.time.Duration; import java.util.concurrent.CompletableFuture; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.KafkaStreams; -import theodolite.commons.kafkastreams.ConfigurationKeys; -import theodolite.uc4.streamprocessing.Uc4KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.ConfigurationKeys; import titan.ccp.common.configuration.ServiceConfigurations; /** diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformer.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformer.java similarity index 98% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformer.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformer.java index db28c86bce79caa4345a3a2bc7914c3e2bbd1a32..bdc8fc7d4267fbdb427d8dc217ef296c0553da1b 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformer.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformer.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Map; import java.util.Optional; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformerSupplier.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformerSupplier.java similarity index 96% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformerSupplier.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformerSupplier.java index d17757d6800890eaf5260af9c25914344ca4a625..538643f0cdb119988e446f3eae793e2efcccadd6 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ChildParentsTransformerSupplier.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ChildParentsTransformerSupplier.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Map; import java.util.Optional; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformer.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformer.java similarity index 98% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformer.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformer.java index d3500adff664cba8f3f92707a0adba34534404b7..38cbca81d664ca72494525263d8a7ab3a7523bfc 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformer.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformer.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import com.google.common.base.MoreObjects; import java.util.ArrayList; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformerSupplier.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformerSupplier.java similarity index 96% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformerSupplier.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformerSupplier.java index 51c7ce1f6cb144c88356ef1b32bdfce400e1ffb4..2e635ec368bca87bdb882580b51f763abba8f32a 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointFlatTransformerSupplier.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointFlatTransformerSupplier.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Map; import java.util.Set; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointRecordParents.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointRecordParents.java similarity index 96% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointRecordParents.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointRecordParents.java index e9a5a824e43dfbab83151da5c2a8f18f9105f494..5892c6d3ac84c6d1ff56cfb440186e07fd9d9eb0 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/JointRecordParents.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/JointRecordParents.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Objects; import java.util.Set; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/OptionalParentsSerde.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerde.java similarity index 96% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/OptionalParentsSerde.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerde.java index a1e9767da047951e04d4c3914c2d1b36bd18626b..3738fadd52b22abb8e13f20ae6066017112f0455 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/OptionalParentsSerde.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerde.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.HashSet; import java.util.Optional; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ParentsSerde.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerde.java similarity index 95% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ParentsSerde.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerde.java index df6f848b5dfde10a96aceaf4d4a293364d52b982..dac58c84bc1914b4e54fe5eb6da0930204e34eb5 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/ParentsSerde.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerde.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.HashSet; import java.util.Set; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/RecordAggregator.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/RecordAggregator.java similarity index 96% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/RecordAggregator.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/RecordAggregator.java index 34ef3762d6a3219958329762ce6e39844684068a..d107dedbfdb58489a6f00e2baf248f15bb823db9 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/RecordAggregator.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/RecordAggregator.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import org.apache.kafka.streams.kstream.Windowed; import titan.ccp.model.records.ActivePowerRecord; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKey.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKey.java similarity index 95% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKey.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKey.java index 667cc6d5ee83a41f7c04fc8074a18ef1a9422b0e..8c700f8075a67d7e8ffb40e4b3c92f23109e1cc1 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKey.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKey.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Objects; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKeySerde.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerde.java similarity index 95% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKeySerde.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerde.java index 63b9e44b5a7bde8f47fe7620b286aefa7fc60841..80fd16f64c6f08e32a89bb3558b61d3f560be890 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/SensorParentKeySerde.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerde.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import org.apache.kafka.common.serialization.Serde; import titan.ccp.common.kafka.simpleserdes.BufferSerde; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/TopologyBuilder.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/TopologyBuilder.java similarity index 99% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/TopologyBuilder.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/TopologyBuilder.java index 712b20cb63c2d9f6b77321eaf18eafe4b16854d2..fbd3ed109965b103e4f1cdeb4324581bc6c82e8b 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/TopologyBuilder.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/TopologyBuilder.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.time.Duration; import java.util.Properties; diff --git a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/Uc4KafkaStreamsBuilder.java b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/Uc4KafkaStreamsBuilder.java similarity index 95% rename from theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/Uc4KafkaStreamsBuilder.java rename to theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/Uc4KafkaStreamsBuilder.java index 9f1af3ba066bcdfef7f8e9073947d570a1327515..4d2b96ccb751dbb804eab0806303312a88702dc0 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/main/java/theodolite/uc4/streamprocessing/Uc4KafkaStreamsBuilder.java +++ b/theodolite-benchmarks/uc4-kstreams/src/main/java/rocks/theodolite/benchmarks/uc4/kstreams/Uc4KafkaStreamsBuilder.java @@ -1,11 +1,11 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.time.Duration; import java.util.Objects; import java.util.Properties; import org.apache.commons.configuration2.Configuration; import org.apache.kafka.streams.Topology; -import theodolite.commons.kafkastreams.KafkaStreamsBuilder; +import rocks.theodolite.benchmarks.commons.kstreams.KafkaStreamsBuilder; import titan.ccp.common.kafka.avro.SchemaRegistryAvroSerdeFactory; /** diff --git a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/OptionalParentsSerdeTest.java b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerdeTest.java similarity index 94% rename from theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/OptionalParentsSerdeTest.java rename to theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerdeTest.java index 600fc0b15ccc3ac3d902565fba1d073e37d98d0f..65ab88e7167f34ff94d7e011ae2ee9707a5ddad4 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/OptionalParentsSerdeTest.java +++ b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/OptionalParentsSerdeTest.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Optional; import java.util.Set; diff --git a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/ParentsSerdeTest.java b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerdeTest.java similarity index 89% rename from theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/ParentsSerdeTest.java rename to theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerdeTest.java index 994593e27914af2ad56693e4b08b8143b27000b7..65e9bd7c32e6b9bb6cfb6bd54fb29ab32cfb7f3a 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/ParentsSerdeTest.java +++ b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/ParentsSerdeTest.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import java.util.Set; import org.junit.Test; diff --git a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SensorParentKeySerdeTest.java b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerdeTest.java similarity index 90% rename from theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SensorParentKeySerdeTest.java rename to theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerdeTest.java index 34f87fa98ca7de7d6ca24a49a73729e5ecc2e74b..b71a0188020b74c5a21b4d70a762a818d2c8f23b 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SensorParentKeySerdeTest.java +++ b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SensorParentKeySerdeTest.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import org.junit.Test; diff --git a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTester.java b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTester.java similarity index 92% rename from theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTester.java rename to theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTester.java index b5d5f942dac068379fe90a7462545adb7a11e7df..bf893c04f447ea70f62ed5fc15e1fc19a4be22a3 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTester.java +++ b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTester.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import static org.junit.Assert.assertEquals; import java.util.function.Function; diff --git a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTesterFactory.java b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTesterFactory.java similarity index 92% rename from theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTesterFactory.java rename to theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTesterFactory.java index e8083ed778c450ef6717ca7b9c73daa3d96a7af3..ade3763fc55dd409a4e321570418f5629fb52959 100644 --- a/theodolite-benchmarks/uc4-kstreams/src/test/java/theodolite/uc4/streamprocessing/SerdeTesterFactory.java +++ b/theodolite-benchmarks/uc4-kstreams/src/test/java/rocks/theodolite/benchmarks/uc4/kstreams/SerdeTesterFactory.java @@ -1,4 +1,4 @@ -package theodolite.uc4.streamprocessing; +package rocks.theodolite.benchmarks.uc4.kstreams; import org.apache.kafka.common.serialization.Serde; diff --git a/theodolite-benchmarks/uc4-load-generator/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-load-generator/.settings/org.eclipse.jdt.ui.prefs index ac23341bf71ac68df4183361493261758fd5dafb..b2a15f439cf1844efe56f1ac0d82a2884e66cb9d 100644 --- a/theodolite-benchmarks/uc4-load-generator/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc4-load-generator/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +cleanup.add_all=false cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=true @@ -11,25 +12,72 @@ cleanup.always_use_blocks=true cleanup.always_use_parentheses_in_expressions=false cleanup.always_use_this_for_non_static_field_access=true cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false cleanup.convert_functional_interfaces=false cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false cleanup.make_local_variable_final=true cleanup.make_parameters_final=true cleanup.make_private_fields_final=true cleanup.make_type_abstract_if_missing_method=false cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false cleanup.never_use_blocks=false cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false cleanup.qualify_static_field_accesses_with_declaring_class=false cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false cleanup.remove_private_constructors=true cleanup.remove_redundant_modifiers=false cleanup.remove_redundant_semicolons=true @@ -37,6 +85,7 @@ cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=true cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false cleanup.remove_unnecessary_casts=true cleanup.remove_unnecessary_nls_tags=true cleanup.remove_unused_imports=true @@ -45,17 +94,47 @@ cleanup.remove_unused_private_fields=true cleanup.remove_unused_private_members=false cleanup.remove_unused_private_methods=true cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false cleanup.sort_members=false cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false cleanup.use_blocks=true cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false cleanup.use_lambda=true cleanup.use_parentheses_in_expressions=true +cleanup.use_string_is_blank=false cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=false cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false cleanup_profile=_CAU-SE-Style cleanup_settings_version=2 eclipse.preferences.version=1 @@ -63,10 +142,11 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_CAU-SE-Style formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.importorder= org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.staticondemandthreshold=99 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -80,33 +160,81 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=true +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=true +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=false sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=false sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -115,14 +243,44 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=true +sp_cleanup.useless_return=true +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs b/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs index 87860c815222845c1d264d7d0ce498d3397f8280..4fa4266c755f4ff8da465ab7341cd70ffb24ecf7 100644 --- a/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs +++ b/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.checkstyle.prefs @@ -1,4 +1,4 @@ configFilePath=../config/checkstyle.xml customModulesJarPaths= eclipse.preferences.version=1 -enabled=true +enabled=false diff --git a/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.pmd.prefs b/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.pmd.prefs index efbcb8c9e5d449194a48ca1ea42b7d807b573db9..40bfd0ecdbbe324bb54e4b9f9f32ba95cf5b0c2a 100644 --- a/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.pmd.prefs +++ b/theodolite-benchmarks/uc4-load-generator/.settings/qa.eclipse.plugin.pmd.prefs @@ -1,4 +1,4 @@ customRulesJars= eclipse.preferences.version=1 -enabled=true +enabled=false ruleSetFilePath=../config/pmd.xml diff --git a/theodolite-benchmarks/uc4-load-generator/build.gradle b/theodolite-benchmarks/uc4-load-generator/build.gradle index 9785718056fa1a14d687a75237cd23b941ce7365..60d1c3bafd12580d6948d5a378be37a940332b72 100644 --- a/theodolite-benchmarks/uc4-load-generator/build.gradle +++ b/theodolite-benchmarks/uc4-load-generator/build.gradle @@ -2,4 +2,4 @@ plugins { id 'theodolite.load-generator' } -mainClassName = "theodolite.uc4.workloadgenerator.LoadGenerator" +mainClassName = "rocks.theodolite.benchmarks.uc4.loadgenerator.LoadGenerator" diff --git a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/ConfigPublisher.java b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/ConfigPublisher.java similarity index 97% rename from theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/ConfigPublisher.java rename to theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/ConfigPublisher.java index ad0ee7082da9116f9ccb66a79d48b36bfb30da2e..98f470b0df1873766c3bf56fb7e6a8eae0019ce4 100644 --- a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/ConfigPublisher.java +++ b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/ConfigPublisher.java @@ -1,4 +1,4 @@ -package theodolite.uc4.workloadgenerator; +package rocks.theodolite.benchmarks.uc4.loadgenerator; import java.util.Properties; import java.util.concurrent.ExecutionException; diff --git a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/LoadGenerator.java b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/LoadGenerator.java similarity index 91% rename from theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/LoadGenerator.java rename to theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/LoadGenerator.java index 8320d16b98fa1d253064d08397d5df1bb8e17b79..2077de2d9918d46a7a3e671ae9820a7c7abadbfc 100644 --- a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/LoadGenerator.java +++ b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/LoadGenerator.java @@ -1,9 +1,9 @@ -package theodolite.uc4.workloadgenerator; +package rocks.theodolite.benchmarks.uc4.loadgenerator; import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import theodolite.commons.workloadgeneration.KeySpace; +import rocks.theodolite.benchmarks.loadgenerator.KeySpace; import titan.ccp.configuration.events.Event; import titan.ccp.model.sensorregistry.SensorRegistry; @@ -40,7 +40,7 @@ public final class LoadGenerator { new SensorRegistryBuilder(numNestedGroups, numSensors).build(); LOGGER.info("Start workload generator for use case UC4"); - theodolite.commons.workloadgeneration.LoadGenerator.fromEnvironment() + rocks.theodolite.benchmarks.loadgenerator.LoadGenerator.fromEnvironment() .withKeySpace(new KeySpace("s_", sensorRegistry.getMachineSensors().size())) .withBeforeAction(() -> { if (sendRegistry) { diff --git a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilder.java b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilder.java similarity index 96% rename from theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilder.java rename to theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilder.java index 60303056a01466b908b73e51377427f5d8347441..c69dffb6093f914111b8c74bc25f3ca3a0a34ae6 100644 --- a/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilder.java +++ b/theodolite-benchmarks/uc4-load-generator/src/main/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilder.java @@ -1,4 +1,4 @@ -package theodolite.uc4.workloadgenerator; +package rocks.theodolite.benchmarks.uc4.loadgenerator; import titan.ccp.model.sensorregistry.MutableAggregatedSensor; import titan.ccp.model.sensorregistry.MutableSensorRegistry; diff --git a/theodolite-benchmarks/uc4-load-generator/src/test/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilderTest.java b/theodolite-benchmarks/uc4-load-generator/src/test/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilderTest.java similarity index 96% rename from theodolite-benchmarks/uc4-load-generator/src/test/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilderTest.java rename to theodolite-benchmarks/uc4-load-generator/src/test/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilderTest.java index 424c84ec96cdd90077fb7934686cd021b040e732..a169eddb10ac34b91b814a657bf327a79ae00ac4 100644 --- a/theodolite-benchmarks/uc4-load-generator/src/test/java/theodolite/uc4/workloadgenerator/SensorRegistryBuilderTest.java +++ b/theodolite-benchmarks/uc4-load-generator/src/test/java/rocks/theodolite/benchmarks/uc4/loadgenerator/SensorRegistryBuilderTest.java @@ -1,5 +1,4 @@ -package theodolite.uc4.workloadgenerator; - +package rocks.theodolite.benchmarks.uc4.loadgenerator; import java.util.Collection; import java.util.Set; diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt index 3331444a17b4c2a1aa4411c1e27b3d1e087f8841..2b3cf0fa13d894424e6a0546993e2fd9998b8620 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt @@ -38,7 +38,7 @@ class KubernetesBenchmarkDeployment( private val kafkaController = TopicManager(this.kafkaConfig) private val kubernetesManager = K8sManager(client) private val LAG_EXPORTER_POD_LABEL_NAME = "app.kubernetes.io/name" - private val LAG_EXPORTER_POD_LABEL_VALUE = "kafka-lag-exporter" + private val LAG_EXPORTER_POD_LABEL_VALUE = "kafka-exporter" /** * Setup a [KubernetesBenchmark] using the [TopicManager] and the [K8sManager]: