diff --git a/theodolite-benchmarks/uc1-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc1-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs index fa98ca63d77bdee891150bd6713f70197a75cefc..44513a0672790e89edb7d38868bc832e61ef5ad3 100644 --- a/theodolite-benchmarks/uc1-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs +++ b/theodolite-benchmarks/uc1-hazelcastjet/.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,27 +94,58 @@ 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.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=15 +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 @@ -79,26 +159,73 @@ 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=false +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 @@ -106,6 +233,7 @@ sp_cleanup.remove_redundant_type_arguments=true 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 +242,43 @@ 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.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=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc1-hazelcastjet/src/main/java/theodolite/uc1/application/Uc1PipelineBuilder.java b/theodolite-benchmarks/uc1-hazelcastjet/src/main/java/theodolite/uc1/application/Uc1PipelineBuilder.java index 3135f24bf05146b3b1de96528df6bfa71544e10f..5643747a218385ac73f540970932505ea4165eaf 100644 --- a/theodolite-benchmarks/uc1-hazelcastjet/src/main/java/theodolite/uc1/application/Uc1PipelineBuilder.java +++ b/theodolite-benchmarks/uc1-hazelcastjet/src/main/java/theodolite/uc1/application/Uc1PipelineBuilder.java @@ -45,8 +45,9 @@ public class Uc1PipelineBuilder { /** * Extends to a blank Hazelcast Jet Pipeline the UC1 topology defines by theodolite. - * - * <p>UC1 takes {@code Entry<String,ActivePowerRecord>} objects and turns them into Json strings + * + * <p> + * UC1 takes {@code Entry<String,ActivePowerRecord>} objects and turns them into Json strings * using GSON. * * @param pipe The blank hazelcast jet pipeline to extend the logic to. diff --git a/theodolite-benchmarks/uc2-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc2-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..d2f3610059b05c3cd4d86756dd506e0d06dc5b60 --- /dev/null +++ b/theodolite-benchmarks/uc2-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,284 @@ +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.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=false +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=false +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=true +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_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=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=true +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=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2HazelcastJetFactory.java b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2HazelcastJetFactory.java index 46f9b1e54cb2938bf4e1a5ced1e2fcedc11b96cb..a3c3d624fbd85d7fd3fb9427cddd6e135be83fb6 100644 --- a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2HazelcastJetFactory.java +++ b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2HazelcastJetFactory.java @@ -92,9 +92,9 @@ public class Uc2HazelcastJetFactory { * @throws Exception If the input topic or the kafka properties are not defined, the pipeline * cannot be built. */ - public Uc2HazelcastJetFactory buildUc2Pipeline() throws IllegalStateException { //NOPMD + public Uc2HazelcastJetFactory buildUc2Pipeline() throws IllegalStateException { // NOPMD - final String defaultPipelineWarning = "Cannot build pipeline."; //NOPMD + final String defaultPipelineWarning = "Cannot build pipeline."; // NOPMD // Check if Properties for the Kafka Input are set. if (this.kafkaReadPropsForPipeline == null) { @@ -260,7 +260,7 @@ public class Uc2HazelcastJetFactory { /** * Sets the downsample interval for the pipeline used in this builder. - * + * * @param downsampleInterval the downsample interval to be used for this pipeline. * @return A Uc2HazelcastJetFactory with a set downsampleInterval. */ @@ -272,14 +272,14 @@ public class Uc2HazelcastJetFactory { /** * Sets the downsample interval for the pipeline used in this builder from the environment. - * + * * @param defaultDownsampleInterval the default downsample interval to be used for this pipeline * when none is set in the environment. * @return A Uc2HazelcastJetFactory with a set downsampleInterval. */ public Uc2HazelcastJetFactory setDownsampleIntervalFromEnv(// NOPMD final String defaultDownsampleInterval) { - final String downsampleInterval = (String) Objects.requireNonNullElse( + final String downsampleInterval = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.DOWNSAMPLE_INTERVAL), defaultDownsampleInterval); final int downsampleIntervalNumber = Integer.parseInt(downsampleInterval); diff --git a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2KafkaPropertiesBuilder.java b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2KafkaPropertiesBuilder.java index ff34a61e0ba9fdefaf1d4b91c967b49fadcda215..db5499536f23129a160a4c7ed433aafc7f67d704 100644 --- a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2KafkaPropertiesBuilder.java +++ b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2KafkaPropertiesBuilder.java @@ -49,7 +49,7 @@ public class Uc2KafkaPropertiesBuilder { /** * Builds Kafka Properties used for the UC2 Benchmark pipeline. - * + * * @param kafkaBootstrapServerDefault Default bootstrap server if not set by environment. * @return A Kafka Properties Object containing the values needed for a Hazelcast Jet UC2 * Pipeline. diff --git a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2PipelineBuilder.java b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2PipelineBuilder.java index df7a78706c7dca3b177cab4bb69e50948261a1f9..dea01a1bed648171374db8568e22e87ad1904f28 100644 --- a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2PipelineBuilder.java +++ b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/Uc2PipelineBuilder.java @@ -51,7 +51,7 @@ public class Uc2PipelineBuilder { // Extend UC2 topology to the pipeline final StreamStage<Map.Entry<String, String>> uc2TopologyProduct = - extendUc2Topology(pipe, kafkaSource, downsampleIntervalInMs); + this.extendUc2Topology(pipe, kafkaSource, downsampleIntervalInMs); // Add Sink1: Logger uc2TopologyProduct.writeTo(Sinks.logger()); @@ -64,12 +64,13 @@ public class Uc2PipelineBuilder { /** * Extends to a blank Hazelcast Jet Pipeline the UC2 topology defined by theodolite. - * - * <p>UC2 takes {@code ActivePowerRecord} objects, groups them by keys, windows them in a tumbling + * + * <p> + * UC2 takes {@code ActivePowerRecord} objects, groups them by keys, windows them in a tumbling * window and aggregates them into {@code Stats} objects. The final map returns an * {@code Entry<String,String>} where the key is the key of the group and the String is the * {@code .toString()} representation of the {@code Stats} object. - * + * * @param pipe The blank hazelcast jet pipeline to extend the logic to. * @param source A streaming source to fetch data from. * @param downsampleIntervalInMs The size of the tumbling window. @@ -86,7 +87,7 @@ public class Uc2PipelineBuilder { .setLocalParallelism(1) .groupingKey(record -> record.getValue().getIdentifier()) .window(WindowDefinition.tumbling(downsampleIntervalInMs)) - .aggregate(uc2AggregateOperation()) + .aggregate(this.uc2AggregateOperation()) .map(agg -> { final String theKey = agg.key(); final String theValue = agg.getValue().toString(); @@ -97,10 +98,11 @@ public class Uc2PipelineBuilder { /** * Defines an AggregateOperation1 for Hazelcast Jet which is used in the Pipeline of the Hazelcast * Jet implementation of UC2. - * - * <p>Takes a windowed and keyed {@code Entry<String,ActivePowerRecord>} elements and returns a + * + * <p> + * Takes a windowed and keyed {@code Entry<String,ActivePowerRecord>} elements and returns a * {@Stats} Object. - * + * * @return An AggregateOperation used by Hazelcast Jet in a streaming stage which aggregates * ActivePowerRecord Objects into Stats Objects. */ @@ -114,7 +116,7 @@ public class Uc2PipelineBuilder { .withCreate(new StatsAccumulatorSupplier()) // Defines the accumulation .andAccumulate((accumulator, item) -> { - final Entry<String, ActivePowerRecord> castedEntry = + final Entry<String, ActivePowerRecord> castedEntry = (Entry<String, ActivePowerRecord>) item; accumulator.add(castedEntry.getValue().getValueInW()); }) diff --git a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/uc2specifics/StatsAccumulatorSupplier.java b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/uc2specifics/StatsAccumulatorSupplier.java index 6a5c1a5169f150254e5eadfb1112a15c5533c467..050cdc667d27825dfe4d023356de32045c2f296b 100644 --- a/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/uc2specifics/StatsAccumulatorSupplier.java +++ b/theodolite-benchmarks/uc2-hazelcastjet/src/main/java/theodolite/uc2/application/uc2specifics/StatsAccumulatorSupplier.java @@ -9,7 +9,7 @@ import com.hazelcast.function.SupplierEx; */ public class StatsAccumulatorSupplier implements SupplierEx<StatsAccumulator> { - private static final long serialVersionUID = -656395626316842910L;//NOPMD + private static final long serialVersionUID = -656395626316842910L; // NOPMD /** * Gets a StatsAccumulator. diff --git a/theodolite-benchmarks/uc3-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc3-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..097311d0823beb5995435877e44a641eb12abef3 --- /dev/null +++ b/theodolite-benchmarks/uc3-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,284 @@ +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.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=false +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=false +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_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=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=true +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=true +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=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/HistoryService.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/HistoryService.java index 222088b2b6523d5c677fc759a306d2029be478ab..9b5435f065abbca70f270273a44332c96097a81e 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/HistoryService.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/HistoryService.java @@ -24,7 +24,6 @@ public class HistoryService { // -- (default) job name for this history serivce private static final String JOB_NAME = "uc3-hazelcastjet"; - /** * Entrypoint for UC3 using Gradle Run. */ diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3HazelcastJetFactory.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3HazelcastJetFactory.java index 8c6e12bbe0f8c91b0d77b8bbbc2503b0e24b8bd5..ca21acca747b17b2d5457e971cc8a68f553a353b 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3HazelcastJetFactory.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3HazelcastJetFactory.java @@ -272,7 +272,7 @@ public class Uc3HazelcastJetFactory { // NOPMD /** * Sets the window size in seconds for the pipeline used in this builder. - * + * * @param windowSizeInSeconds the windowSizeInSeconds to be used for this pipeline. * @return A Uc3HazelcastJetFactory with a set windowSizeInSeconds. */ @@ -284,14 +284,14 @@ public class Uc3HazelcastJetFactory { // NOPMD /** * Sets the window size in seconds for the pipeline used in this builder from the environment. - * + * * @param defaultWindowSizeInSeconds the default window size in seconds to be used for this * pipeline when none is set in the environment. * @return A Uc3HazelcastJetFactory with a set windowSizeInSeconds. */ public Uc3HazelcastJetFactory setWindowSizeInSecondsFromEnv(// NOPMD final String defaultWindowSizeInSeconds) { - final String windowSizeInSeconds = (String) Objects.requireNonNullElse( + final String windowSizeInSeconds = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.WINDOW_SIZE_IN_SECONDS), defaultWindowSizeInSeconds); final int windowSizeInSecondsNumber = Integer.parseInt(windowSizeInSeconds); @@ -301,7 +301,7 @@ public class Uc3HazelcastJetFactory { // NOPMD /** * Sets the hopping size in seconds for the pipeline used in this builder. - * + * * @param hoppingSizeInSeconds the hoppingSizeInSeconds to be used for this pipeline. * @return A Uc3HazelcastJetFactory with a set hoppingSizeInSeconds. */ @@ -313,14 +313,14 @@ public class Uc3HazelcastJetFactory { // NOPMD /** * Sets the hopping size in seconds for the pipeline used in this builder from the environment. - * + * * @param defaultHoppingSizeInSeconds the default hopping size in seconds to be used for this * pipeline when none is set in the environment. * @return A Uc3HazelcastJetFactory with a set hoppingSizeInSeconds. */ public Uc3HazelcastJetFactory setHoppingSizeInSecondsFromEnv(// NOPMD final String defaultHoppingSizeInSeconds) { - final String hoppingSizeInSeconds = (String) Objects.requireNonNullElse( + final String hoppingSizeInSeconds = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.HOPPING_SIZE_IN_SECONDS), defaultHoppingSizeInSeconds); final int hoppingSizeInSecondsNumber = Integer.parseInt(hoppingSizeInSeconds); diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3KafkaPropertiesBuilder.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3KafkaPropertiesBuilder.java index 3d81c3e7678bada8e14d6f18c13b2a84b3acee5b..25aecb2e2ca21152e3ba9f0887978b2a9c7f496a 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3KafkaPropertiesBuilder.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3KafkaPropertiesBuilder.java @@ -47,7 +47,7 @@ public class Uc3KafkaPropertiesBuilder { /** * Builds Kafka Properties used for the UC3 Benchmark pipeline. - * + * * @param kafkaBootstrapServerDefault Default bootstrap server if not set by environment. * @return A Kafka Properties Object containing the values needed for a Hazelcast Jet UC3 * Pipeline. diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3PipelineBuilder.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3PipelineBuilder.java index f0f8cd7cf95d312185d70a5a3b6be1b043878ff2..f987f82b7230d6a2ba2f98a3ba35796802e0320d 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3PipelineBuilder.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/Uc3PipelineBuilder.java @@ -57,8 +57,8 @@ public class Uc3PipelineBuilder { // Extend topology for UC3 final StreamStage<Map.Entry<String, String>> uc3Product = - extendUc3Topology(pipe, kafkaSource, hoppingSizeInSeconds, windowSizeInSeconds); - + this.extendUc3Topology(pipe, kafkaSource, hoppingSizeInSeconds, windowSizeInSeconds); + // Add Sink1: Logger uc3Product.writeTo(Sinks.logger()); // Add Sink2: Write back to kafka for the final benchmark @@ -70,10 +70,11 @@ public class Uc3PipelineBuilder { /** * Extends to a blank Hazelcast Jet Pipeline the UC3 topology defined by theodolite. - * - * <p>UC3 takes {@code ActivePowerRecord} object, groups them by keys and calculates - * average double values for a sliding window and sorts them into the hour of the day. - * + * + * <p> + * UC3 takes {@code ActivePowerRecord} object, groups them by keys and calculates average double + * values for a sliding window and sorts them into the hour of the day. + * * @param pipe The blank hazelcast jet pipeline to extend the logic to. * @param source A streaming source to fetch data from. * @param hoppingSizeInSeconds The jump distance of the "sliding" window. @@ -105,7 +106,7 @@ public class Uc3PipelineBuilder { return Map.entry(newKey, record.getValue()); }) // group by new keys - .groupingKey(newRecord -> newRecord.getKey()) + .groupingKey(Entry::getKey) // Sliding/Hopping Window .window(WindowDefinition.sliding(TimeUnit.SECONDS.toMillis(windowSizeInSeconds), TimeUnit.SECONDS.toMillis(hoppingSizeInSeconds))) diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKey.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKey.java index a619a985beda6cc1d09e59b32d02ad3820dc68bb..c77f502c317293aa80fde535cf28c805e4105066 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKey.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKey.java @@ -2,35 +2,38 @@ package theodolite.uc3.application.uc3specifics; import java.util.Objects; -/** A key consisting of a hour of a day and a sensorID. */ +/** + * A key consisting of a hour of a day and a sensorID. + * + */ public class HourOfDayKey { private final int hourOfDay; private final String sensorId; - + public HourOfDayKey(final int hourOfDay, final String sensorId) { this.hourOfDay = hourOfDay; this.sensorId = sensorId; } - + public int getHourOfDay() { return this.hourOfDay; } - + public String getSensorId() { return this.sensorId; } - + @Override public String toString() { return this.sensorId + ";" + this.hourOfDay; } - + @Override public int hashCode() { return Objects.hash(this.hourOfDay, this.sensorId); } - + @Override public boolean equals(final Object obj) { if (obj == this) { @@ -43,5 +46,5 @@ public class HourOfDayKey { } return false; } - + } diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKeySerializer.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKeySerializer.java index cc75d438f2e1576102e3e12a714d309d9443132b..065061c44b0fc31062a693ca1a01638e7b121603 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKeySerializer.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HourOfDayKeySerializer.java @@ -5,11 +5,14 @@ import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.StreamSerializer; import java.io.IOException; -/** A pipeline serializer for the HourOfDayKey to allow for parallelization. */ +/** + * A pipeline serializer for the HourOfDayKey to allow for parallelization. + * + */ public class HourOfDayKeySerializer implements StreamSerializer<HourOfDayKey> { private static final int TYPE_ID = 1; - + @Override public int getTypeId() { return TYPE_ID; @@ -18,7 +21,7 @@ public class HourOfDayKeySerializer implements StreamSerializer<HourOfDayKey> { @Override public void write(final ObjectDataOutput out, final HourOfDayKey key) throws IOException { out.writeInt(key.getHourOfDay()); - out.writeString(key.getSensorId()); + out.writeString(key.getSensorId()); } @Override diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HoursOfDayKeyFactory.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HoursOfDayKeyFactory.java index 2f9ce999ebc78fcb6fc698af19fa4b94643219ac..5661830e2698e5bb2e3486af4069e544009bc64f 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HoursOfDayKeyFactory.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/HoursOfDayKeyFactory.java @@ -2,7 +2,10 @@ package theodolite.uc3.application.uc3specifics; import java.time.LocalDateTime; -/** A factory class to build a HourOfDayKey. */ +/** + * A factory class to build a {@link HourOfDayKey} + * + */ public class HoursOfDayKeyFactory implements StatsKeyFactory<HourOfDayKey> { @Override diff --git a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/StatsKeyFactory.java b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/StatsKeyFactory.java index eda585c6ed69274ce642c4d016a001a9763368a6..00f7d6e6636ee7e5dae05cf7c772029f01fa72e3 100644 --- a/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/StatsKeyFactory.java +++ b/theodolite-benchmarks/uc3-hazelcastjet/src/main/java/theodolite/uc3/application/uc3specifics/StatsKeyFactory.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; public interface StatsKeyFactory<T> { T createKey(String sensorId, LocalDateTime dateTime); - + String getSensorId(T key); - + } diff --git a/theodolite-benchmarks/uc4-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs b/theodolite-benchmarks/uc4-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..d62cdc4599ab9623f395ee3f9270902ae0c0bbb4 --- /dev/null +++ b/theodolite-benchmarks/uc4-hazelcastjet/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,284 @@ +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.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=false +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=true +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=true +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_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=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=true +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=true +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=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/HistoryService.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/HistoryService.java index f315f49cfd134e88851b942ede2c1ee24ec23b9b..3b0dbbbe021ff5cf22454d712b6ab8db3991c8f6 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/HistoryService.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/HistoryService.java @@ -33,7 +33,7 @@ public class HistoryService { try { uc4HistoryService.run(); } catch (final Exception e) { // NOPMD - e.printStackTrace(); // NOPMD + e.printStackTrace(); // NOPMD LOGGER.error("An Exception occured. "// NOPMD + "No history service is deployed! ABORT MISSION!"); LOGGER.error(e.toString()); @@ -66,7 +66,7 @@ public class HistoryService { .setKafkaFeedbackTopicFromEnv(KAFKA_FEEDBACK_TOPIC_DEFAULT) .setWindowSizeFromEnv(WINDOW_SIZE_DEFAULT_MS) .buildUc4JetInstanceFromEnv(LOGGER, BOOTSTRAP_SERVER_DEFAULT, HZ_KUBERNETES_SERVICE_DNS_KEY) - .buildUc4Pipeline() + .buildUc4Pipeline() .runUc4Job(JOB_NAME); } diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4HazelcastJetFactory.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4HazelcastJetFactory.java index fd4571f68d6500888c90ca1a73faedc4b2debeb5..5b0e07f2449f8b8294b532dce6cde343f64e736d 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4HazelcastJetFactory.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4HazelcastJetFactory.java @@ -283,7 +283,7 @@ public class Uc4HazelcastJetFactory { /** * Sets the window size for the pipeline used in this builder. - * + * * @param windowSize the window size to be used for this pipeline. * @return A Uc4HazelcastJetFactory with a set windowSize. */ @@ -295,14 +295,14 @@ public class Uc4HazelcastJetFactory { /** * Sets the window size for the pipeline used in this builder from the environment. - * + * * @param defaultWindowSize the default window size to be used for this pipeline when none is set * in the environment. * @return A Uc4HazelcastJetFactory with a set windowSize. */ public Uc4HazelcastJetFactory setWindowSizeFromEnv(// NOPMD final String defaultWindowSize) { - final String windowSize = (String) Objects.requireNonNullElse( + final String windowSize = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.WINDOW_SIZE_UC4), defaultWindowSize); final int windowSizeNumber = Integer.parseInt(windowSize); @@ -312,7 +312,7 @@ public class Uc4HazelcastJetFactory { /** * Sets the configuration topic for the pipeline used in this builder. - * + * * @param kafkaConfigurationTopic the configuration topic to be used for this pipeline. * @return A Uc4HazelcastJetFactory with a set configuration topic. */ @@ -324,14 +324,14 @@ public class Uc4HazelcastJetFactory { /** * Sets the configuration topic for the pipeline used in this builder from the environment. - * + * * @param defaultKafkaConfigurationTopic the default configuration topic to be used for this * pipeline when none is set in the environment. * @return A Uc4HazelcastJetFactory with a set kafkaConfigurationTopic. */ public Uc4HazelcastJetFactory setKafkaConfigurationTopicFromEnv(// NOPMD final String defaultKafkaConfigurationTopic) { - this.kafkaConfigurationTopic = (String) Objects.requireNonNullElse( + this.kafkaConfigurationTopic = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.KAFKA_CONFIGURATION_TOPIC), defaultKafkaConfigurationTopic); return this; @@ -339,7 +339,7 @@ public class Uc4HazelcastJetFactory { /** * Sets the Feedback topic for the pipeline used in this builder. - * + * * @param kafkaFeedbackTopic the Feedback topic to be used for this pipeline. * @return A Uc4HazelcastJetFactory with a set Feedback topic. */ @@ -351,14 +351,14 @@ public class Uc4HazelcastJetFactory { /** * Sets the Feedback topic for the pipeline used in this builder from the environment. - * + * * @param defaultKafkaFeedbackTopic the default Feedback topic to be used for this pipeline when * none is set in the environment. * @return A Uc4HazelcastJetFactory with a set kafkaFeedbackTopic. */ public Uc4HazelcastJetFactory setKafkaFeedbackTopicFromEnv(// NOPMD final String defaultKafkaFeedbackTopic) { - this.kafkaFeedbackTopic = (String) Objects.requireNonNullElse( + this.kafkaFeedbackTopic = Objects.requireNonNullElse( System.getenv(ConfigurationKeys.KAFKA_FEEDBACK_TOPIC), defaultKafkaFeedbackTopic); return this; diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4KafkaPropertiesBuilder.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4KafkaPropertiesBuilder.java index de1513b86279a49344abb14c6b91668fabfc5434..be77ab774e6e94065148adf460b100cdfebf3169 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4KafkaPropertiesBuilder.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4KafkaPropertiesBuilder.java @@ -20,7 +20,7 @@ public class Uc4KafkaPropertiesBuilder { private static final String SPECIFIC_AVRO_READER_CONFIG = "specific.avro.reader"; private static final String SCHEMA_REGISTRY_URL_CONFIG = "schema.registry.url"; - + /** * Builds Kafka Properties used for the UC4 Benchmark pipeline. * @@ -112,7 +112,7 @@ public class Uc4KafkaPropertiesBuilder { /** * Builds Kafka Properties used for the UC4 Benchmark pipeline. - * + * * @param kafkaBootstrapServerDefault Default bootstrap server if not set by environment. * @return A Kafka Properties Object containing the values needed for a Hazelcast Jet UC4 * Pipeline. diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4PipelineBuilder.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4PipelineBuilder.java index ef50d99c00542c49f3f9d41870834139b5b3c674..104a59801d1b4e5e5c78b7e2df4c1278686d6b5a 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4PipelineBuilder.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/Uc4PipelineBuilder.java @@ -76,12 +76,13 @@ public class Uc4PipelineBuilder { final StreamSource<Entry<String, ActivePowerRecord>> inputSource = KafkaSources.<String, ActivePowerRecord>kafka( kafkaInputReadPropsForPipeline, kafkaInputTopic); - final StreamSource<Entry<String, Double>> aggregationSource = + final StreamSource<Entry<String, Double>> aggregationSource = KafkaSources.<String, Double>kafka(kafkaFeedbackPropsForPipeline, kafkaFeedbackTopic); // Extend UC4 topology to pipeline final StreamStage<Entry<String, Double>> uc4Product = - extendUc4Topology(uc4Pipeline, inputSource, aggregationSource, configSource, windowSize); + this.extendUc4Topology(uc4Pipeline, inputSource, aggregationSource, configSource, + windowSize); // Add Sink1: Write back to kafka output topic uc4Product.writeTo(KafkaSinks.<String, Double>kafka( @@ -98,20 +99,22 @@ public class Uc4PipelineBuilder { /** * Extends to a blank Hazelcast Jet Pipeline the UC4 topology defines by theodolite. - * - * <p>UC4 takes {@code ActivePowerRecord} events from sensors and a {@code SensorRegistry} - * with maps from keys to groups to map values to their accourding groups. A feedback stream - * allows for group keys to be mapped to values and eventually to be mapped to other top - * level groups defines by the {@code SensorRegistry}. - * - * <p>6 Step topology: - * (1) Inputs (Config, Values, Aggregations) - * (2) Merge Input Values and Aggregations - * (3) Join Configuration with Merged Input Stream - * (4) Duplicate as flatmap per value and group - * (5) Window (preperation for possible last values) + * + * <p> + * UC4 takes {@code ActivePowerRecord} events from sensors and a {@code SensorRegistry} with maps + * from keys to groups to map values to their accourding groups. A feedback stream allows for + * group keys to be mapped to values and eventually to be mapped to other top level groups defines + * by the {@code SensorRegistry}. + * + * <p> + * 6 Step topology: <br> + * (1) Inputs (Config, Values, Aggregations) <br> + * (2) Merge Input Values and Aggregations <br> + * (3) Join Configuration with Merged Input Stream <br> + * (4) Duplicate as flatmap per value and group <br> + * (5) Window (preperation for possible last values) <br> * (6) Aggregate data over the window - * + * * @param pipe The blank pipeline to extend the logic to. * @param inputSource A streaming source with {@code ActivePowerRecord} data. * @param aggregationSource A streaming source with aggregated data. @@ -121,7 +124,7 @@ public class Uc4PipelineBuilder { * according aggregated values. The data can be further modified or directly be linked to * a Hazelcast Jet sink. */ - public StreamStage<Entry<String, Double>> extendUc4Topology(final Pipeline pipe, //NOPMD + public StreamStage<Entry<String, Double>> extendUc4Topology(final Pipeline pipe, // NOPMD final StreamSource<Entry<String, ActivePowerRecord>> inputSource, final StreamSource<Entry<String, Double>> aggregationSource, final StreamSource<Entry<Event, String>> configurationSource, final int windowSize) { @@ -132,19 +135,12 @@ public class Uc4PipelineBuilder { .withNativeTimestamps(0) .filter(entry -> entry.getKey() == Event.SENSOR_REGISTRY_CHANGED || entry.getKey() == Event.SENSOR_REGISTRY_STATUS) - .map(data -> { - return Util.entry(data.getKey(), SensorRegistry.fromJson(data.getValue())); - }) - .flatMapStateful(hashMapSupplier(), configFlatMap()) + .map(data -> Util.entry(data.getKey(), SensorRegistry.fromJson(data.getValue()))) + .flatMapStateful(this.hashMapSupplier(), this.configFlatMap()) .writeTo(Sinks.mapWithUpdating( SENSOR_PARENT_MAP_NAME, // The addressed IMAP - event -> event.getKey(), // The key to look for - (oldValue, newEntry) -> { // the new entry returned (null automatically results in - // deletion of entry) //NOCS - - // Write new set of groups - return newEntry.getValue(); - })); + Entry::getKey, // The key to look for + (oldValue, newEntry) -> newEntry.getValue())); ////////////////////////////////// // (1) Sensor Input Stream @@ -153,8 +149,8 @@ public class Uc4PipelineBuilder { .withNativeTimestamps(0) .map(stream -> { // Build data for next pipeline stage - String sensorId = stream.getValue().getIdentifier(); - Double valueInW = stream.getValue().getValueInW(); + final String sensorId = stream.getValue().getIdentifier(); + final Double valueInW = stream.getValue().getValueInW(); // Return data for next pipeline stage return Util.entry(sensorId, valueInW); }); @@ -169,7 +165,7 @@ public class Uc4PipelineBuilder { // (2) UC4 Merge Input with aggregation stream final StreamStageWithKey<Entry<String, Double>, String> mergedInputAndAggregations = inputStream .merge(aggregations) - .groupingKey(event -> event.getKey()); + .groupingKey(Entry::getKey); ////////////////////////////////// // (3) UC4 Join Configuration and Merges Input/Aggregation Stream @@ -181,13 +177,13 @@ public class Uc4PipelineBuilder { // Check whether a groupset exists for a key or not if (sensorParentsSet == null) { // No group set exists for this key: return valuegroup with default null group set. - Set<String> nullSet = new HashSet<String>(); + final Set<String> nullSet = new HashSet<>(); nullSet.add("NULL-GROUPSET"); return Util.entry(sensorEvent.getKey(), new ValueGroup(sensorEvent.getValue(), nullSet)); } else { // Group set exists for this key: return valuegroup with the groupset. - ValueGroup valueParentsPair = + final ValueGroup valueParentsPair = new ValueGroup(sensorEvent.getValue(), sensorParentsSet); // Return solution return Util.entry(sensorEvent.getKey(), valueParentsPair); @@ -201,14 +197,14 @@ public class Uc4PipelineBuilder { .flatMap(entry -> { // Supplied data - String keyGroupId = entry.getKey(); - Double valueInW = entry.getValue().getValueInW(); - Set<String> groups = entry.getValue().getGroups(); + final String keyGroupId = entry.getKey(); + final Double valueInW = entry.getValue().getValueInW(); + final Set<String> groups = entry.getValue().getGroups(); // Transformed Data - String[] groupList = groups.toArray(String[]::new); - SensorGroupKey[] newKeyList = new SensorGroupKey[groupList.length]; - List<Entry<SensorGroupKey, Double>> newEntryList = new ArrayList<>(); + final String[] groupList = groups.toArray(String[]::new); + final SensorGroupKey[] newKeyList = new SensorGroupKey[groupList.length]; + final List<Entry<SensorGroupKey, Double>> newEntryList = new ArrayList<>(); for (int i = 0; i < groupList.length; i++) { newKeyList[i] = new SensorGroupKey(keyGroupId, groupList[i]); newEntryList.add(Util.entry(newKeyList[i], valueInW)); @@ -229,7 +225,7 @@ public class Uc4PipelineBuilder { // Group using the group out of the sensorGroupKey keys return windowedLastValues .groupingKey(entry -> entry.getKey().getGroup()) - .aggregate(AggregateOperations.summingDouble(entry -> entry.getValue())) + .aggregate(AggregateOperations.summingDouble(Entry::getValue)) .map(agg -> { // Construct data for return pair @@ -246,16 +242,14 @@ public class Uc4PipelineBuilder { * Returns a function which supplies a {@code HashMapy<String, Set<String>>()}. */ private SupplierEx<? extends HashMap<String, Set<String>>> hashMapSupplier() { - return () -> new HashMap<String, Set<String>>(); + return HashMap::new; } /** * Returns a function which supplies the flatMap function used to process the configuration input * for UC4. */ - private BiFunctionEx<? super HashMap<String, Set<String>>, - ? super Entry<Event, SensorRegistry>, - ? extends Traverser<Entry<String, Set<String>>>> configFlatMap() { + private BiFunctionEx<? super HashMap<String, Set<String>>, ? super Entry<Event, SensorRegistry>, ? extends Traverser<Entry<String, Set<String>>>> configFlatMap() { return (flatMapStage, eventItem) -> { // Transform new Input diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ChildParentsTransformer.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ChildParentsTransformer.java index 4939217211622bfeb0f11d4577b5d81dba957e2b..f4ccdcbe361429c9a4caf709f96593d5c6b6bb57 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ChildParentsTransformer.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ChildParentsTransformer.java @@ -20,6 +20,7 @@ import titan.ccp.model.sensorregistry.SensorRegistry; * sensor identifiers. All pairs whose sensor's parents have changed since last iteration are * forwarded. A mapping of an identifier to <code>null</code> means that the corresponding sensor * does not longer exists in the sensor registry. + * */ public class ChildParentsTransformer implements Transformer<Event, SensorRegistry, Iterable<KeyValue<String, Optional<Set<String>>>>> { @@ -64,16 +65,17 @@ public class ChildParentsTransformer implements /** * Constructs a map of keys to their set of parents out of a SensorRegistry. + * * @param registry The SensorRegistry to build the map out of. * @return A map of keys to a set of their parents. */ public Map<String, Set<String>> constructChildParentsPairs(final SensorRegistry registry) { return this.streamAllChildren(registry.getTopLevelSensor()) .collect(Collectors.toMap( - child -> child.getIdentifier(), + Sensor::getIdentifier, child -> child.getParent() .map(p -> Set.of(p.getIdentifier())) - .orElseGet(() -> Set.of()))); + .orElseGet(Set::of))); } private Stream<Sensor> streamAllChildren(final AggregatedSensor sensor) { diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/EventDeserializer.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/EventDeserializer.java index c88b167e1b67ce9e0ff04931b23de206b973fe6f..79ae2508b1283825056fd5d0513a914e3afc5df2 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/EventDeserializer.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/EventDeserializer.java @@ -7,11 +7,12 @@ import titan.ccp.configuration.events.EventSerde; /** * Deserializer for Event Objects. + * */ public class EventDeserializer implements Deserializer<Event> { private final Deserializer<Event> deserializer = EventSerde.serde().deserializer(); - + @Override public void configure(final Map<String, ?> configs, final boolean isKey) { this.deserializer.configure(configs, isKey); @@ -27,5 +28,5 @@ public class EventDeserializer implements Deserializer<Event> { this.deserializer.close(); } - + } diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/HashMapSupplier.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/HashMapSupplier.java index 889379f20aee98c5165a99ae487d88e86a2692f7..f18f8ecd6b4844b07bc587290eed12952c70f717 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/HashMapSupplier.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/HashMapSupplier.java @@ -5,15 +5,15 @@ import java.util.HashMap; import java.util.Set; /** - * Supplies a hashmap and implements supplierEx. + * Supplies a {@link HashMap} and implements {@link SupplierEx} */ -public class HashMapSupplier implements SupplierEx<HashMap<String,Set<String>>> { - - private static final long serialVersionUID = -6247504592403610702L;//NOPMD +public class HashMapSupplier implements SupplierEx<HashMap<String, Set<String>>> { + + private static final long serialVersionUID = -6247504592403610702L; // NOPMD @Override public HashMap<String, Set<String>> get() { - return new HashMap<String, Set<String>>(); + return new HashMap<>(); } @Override @@ -21,6 +21,6 @@ public class HashMapSupplier implements SupplierEx<HashMap<String,Set<String>>> return this.get(); } - - + + } diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ImmutableSensorRegistryUc4Serializer.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ImmutableSensorRegistryUc4Serializer.java index 1e8e4f7603153e0b109574b12d8fcc9ae67f549a..54b3724ebb0c95f9478fe5213d1281baeb922011 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ImmutableSensorRegistryUc4Serializer.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ImmutableSensorRegistryUc4Serializer.java @@ -7,7 +7,8 @@ import java.io.IOException; import titan.ccp.model.sensorregistry.ImmutableSensorRegistry; /** - * StreamSerializer for Hazelcast Jet to serialize and deserialize an ImmutableSensorRegistry. + * {@link StreamSerializer} for Hazelcast Jet to serialize and deserialize an + * {@link ImmutableSensorRegistry}. */ public class ImmutableSensorRegistryUc4Serializer implements StreamSerializer<ImmutableSensorRegistry> { @@ -16,7 +17,6 @@ public class ImmutableSensorRegistryUc4Serializer @Override public int getTypeId() { - // TODO Auto-generated method stub return TYPE_ID; } diff --git a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ValueGroup.java b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ValueGroup.java index cb322ab559a0108095f9f430519fb4ff1d647be3..76430e41e69d23b5b3c4fe588b4c9574e9553015 100644 --- a/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ValueGroup.java +++ b/theodolite-benchmarks/uc4-hazelcastjet/src/main/java/theodolite/uc4/application/uc4specifics/ValueGroup.java @@ -10,34 +10,34 @@ public class ValueGroup { private final Double valueInW; private final Set<String> groups; - + public ValueGroup(final Double valueInW, final Set<String> groups) { this.valueInW = valueInW; this.groups = groups; } - + public Double getValueInW() { return this.valueInW; } - + public Set<String> getGroups() { return this.groups; } - + @Override public String toString() { String groupString = "["; - for (final String group: groups) { - groupString = groupString + group + "/";//NOPMD + for (final String group : this.groups) { + groupString = groupString + group + "/";// NOPMD } return this.valueInW.toString() + ";" + groupString + "]"; } - + @Override public int hashCode() { return Objects.hash(this.valueInW, this.groups); } - + @Override public boolean equals(final Object obj) { if (obj == this) { @@ -50,5 +50,5 @@ public class ValueGroup { } return false; } - + }