Skip to content
Snippets Groups Projects
Commit 52ba8daf authored by Sören Henning's avatar Sören Henning
Browse files

Fix code style issues

parent d9e49b8d
No related branches found
No related tags found
1 merge request!266Move Titan classes to Theodolite
Pipeline #8571 passed
Showing
with 384 additions and 120 deletions
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
configFilePath=../config/checkstyle.xml
customModulesJarPaths=
eclipse.preferences.version=1
enabled=false
customRulesJars=
eclipse.preferences.version=1
enabled=false
ruleSetFilePath=../config/pmd.xml
......@@ -5,16 +5,14 @@ import com.google.common.collect.ImmutableList.Builder;
import com.google.common.collect.ImmutableMap;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.AggregatedSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.MachineSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.SensorRegistryDeserializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.SensorRegistrySerializer;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
/**
* Implementation of a {@link SensorRegistry} that is immutable.
*/
......
......@@ -2,17 +2,15 @@ package rocks.theodolite.benchmarks.commons.model.sensorregistry;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.AggregatedSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.MachineSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.SensorRegistrySerializer;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.AggregatedSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.MachineSensorSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization.SensorRegistrySerializer;
/**
* A {@link SensorRegistry} to which sensors can be added.
......
......@@ -4,10 +4,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.AggregatedSensor;
import java.lang.reflect.Type;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.AggregatedSensor;
/**
* {@link JsonSerializer} for {@link AggregatedSensor}s.
......
......@@ -4,10 +4,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MachineSensor;
import java.lang.reflect.Type;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MachineSensor;
/**
* {@link JsonSerializer} for {@link MachineSensor}s.
......
......@@ -6,15 +6,13 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import java.lang.reflect.Type;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.AggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.ImmutableSensorRegistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableAggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableSensorRegistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.SensorRegistry;
import java.lang.reflect.Type;
/**
* {@link JsonDeserializer} for {@link AggregatedSensor}s.
*/
......
......@@ -3,10 +3,8 @@ package rocks.theodolite.benchmarks.commons.model.sensorregistry.serialization;
import com.google.gson.JsonElement;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.SensorRegistry;
import java.lang.reflect.Type;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.SensorRegistry;
/**
* {@link JsonSerializer} for {@link SensorRegistry}s.
......
......@@ -2,88 +2,87 @@ package rocks.theodolite.benchmarks.commons.common.configuration;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.apache.commons.configuration2.Configuration;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.EnvironmentVariables;
import rocks.theodolite.benchmarks.commons.commons.configuration.NameResolvingEnvironmentConfiguration;
public class NameResolvingEnvironmentConfigurationTest {
private static final String PROPERTY_FILES_KEY = "my.env.var";
private static final String ENV_VAR_KEY = "MY_ENV_VAR";
private static final String STRING_VALUE = "value";
private static final String STRING_VALUE_2 = "value2";
private static final int INT_VALUE = 7;
private static final String PROPERTY_FILES_KEY = "my.env.var";
private static final String ENV_VAR_KEY = "MY_ENV_VAR";
private static final String STRING_VALUE = "value";
private static final String STRING_VALUE_2 = "value2";
private static final int INT_VALUE = 7;
@Rule
public final EnvironmentVariables environmentVariables = new EnvironmentVariables();
@Rule
public final EnvironmentVariables environmentVariables = new EnvironmentVariables();
@Test
public void testHelperLibrary() {
this.environmentVariables.clear("name");
this.environmentVariables.set("name", STRING_VALUE);
assertEquals("value", System.getenv("name"));
}
@Test
public void testHelperLibrary() {
this.environmentVariables.clear("name");
this.environmentVariables.set("name", STRING_VALUE);
assertEquals("value", System.getenv("name"));
}
@Test
public void testGetUsingEnvVarFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(ENV_VAR_KEY);
assertEquals(STRING_VALUE, result);
}
@Test
public void testGetUsingEnvVarFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(ENV_VAR_KEY);
assertEquals(STRING_VALUE, result);
}
@Test
public void testGetUsingPropertiesFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertEquals(STRING_VALUE, result);
}
@Test
public void testGetUsingPropertiesFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertEquals(STRING_VALUE, result);
}
@Test
public void testGetOfNumber() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, String.valueOf(INT_VALUE));
final Configuration config = new NameResolvingEnvironmentConfiguration();
final int result = config.getInt(PROPERTY_FILES_KEY);
assertEquals(INT_VALUE, result);
}
@Test
public void testGetOfNumber() {
this.environmentVariables.clear(ENV_VAR_KEY);
this.environmentVariables.set(ENV_VAR_KEY, String.valueOf(INT_VALUE));
final Configuration config = new NameResolvingEnvironmentConfiguration();
final int result = config.getInt(PROPERTY_FILES_KEY);
assertEquals(INT_VALUE, result);
}
@Test
public void testGetOfBothExisting() {
this.environmentVariables.clear(ENV_VAR_KEY, PROPERTY_FILES_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
this.environmentVariables.set(PROPERTY_FILES_KEY, STRING_VALUE_2);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertEquals(STRING_VALUE_2, result);
}
@Test
public void testGetOfBothExisting() {
this.environmentVariables.clear(ENV_VAR_KEY, PROPERTY_FILES_KEY);
this.environmentVariables.set(ENV_VAR_KEY, STRING_VALUE);
this.environmentVariables.set(PROPERTY_FILES_KEY, STRING_VALUE_2);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertEquals(STRING_VALUE_2, result);
}
@Test
public void testGetNonExistingUsingEnvVarFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(ENV_VAR_KEY);
assertNull(result);
}
@Test
public void testGetNonExistingUsingEnvVarFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(ENV_VAR_KEY);
assertNull(result);
}
@Test
public void testGetNonExistingUsingPropertiesFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertNull(result);
}
@Test
public void testGetNonExistingUsingPropertiesFormat() {
this.environmentVariables.clear(ENV_VAR_KEY);
final Configuration config = new NameResolvingEnvironmentConfiguration();
final String result = config.getString(PROPERTY_FILES_KEY);
assertNull(result);
}
@Test
public void testFormatKeyAsEnvVariable() {
assertEquals(ENV_VAR_KEY, NameResolvingEnvironmentConfiguration.formatKeyAsEnvVariable(PROPERTY_FILES_KEY));
}
@Test
public void testFormatKeyAsEnvVariable() {
assertEquals(ENV_VAR_KEY,
NameResolvingEnvironmentConfiguration.formatKeyAsEnvVariable(PROPERTY_FILES_KEY));
}
}
......@@ -3,12 +3,6 @@ package rocks.theodolite.benchmarks.commons.model.sensorregistry;
import java.util.List;
import java.util.stream.Collectors;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.ImmutableSensorRegistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MachineSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableAggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableSensorRegistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.SensorRegistry;
public final class ExampleSensors {
private static final SensorRegistry REGISTRY;
......
......@@ -4,10 +4,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.ImmutableSensorRegistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableAggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableSensorRegistry;
public class ImmutableSensorRegistryTest {
@Test
......
package rocks.theodolite.benchmarks.commons.model.sensorregistry;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MachineSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MachineSensorImpl;
/**
* Helper class to allow tests in other packages access {@link MachineSensorImpl} class objects.
*/
......
......@@ -5,10 +5,6 @@ import static org.junit.Assert.assertTrue;
import java.util.Optional;
import org.junit.Test;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.AggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableAggregatedSensor;
import rocks.theodolite.benchmarks.commons.model.sensorregistry.MutableSensorRegistry;
public class MutableSensorRegistryTest {
@Test
......
......@@ -134,8 +134,8 @@ public class Uc1HazelcastJetFactory {
* @return The Uc1HazelcastJetBuilder factory with set kafkaPropertiesForPipeline.
*/
public Uc1HazelcastJetFactory setPropertiesFromEnv(final String bootstrapServersDefault, // NOPMD
final String schemaRegistryUrlDefault,
final String jobName) {
final String schemaRegistryUrlDefault,
final String jobName) {
// Use KafkaPropertiesBuilder to build a properties object used for kafka
final KafkaPropertiesBuilder propsBuilder = new KafkaPropertiesBuilder();
final Properties kafkaProps =
......
package rocks.theodolite.benchmarks.uc1.hazelcastjet;
import static com.hazelcast.jet.pipeline.SinkBuilder.sinkBuilder;
import com.hazelcast.jet.kafka.KafkaSources;
import com.hazelcast.jet.pipeline.Pipeline;
import com.hazelcast.jet.pipeline.Sink;
import com.hazelcast.jet.pipeline.SinkBuilder;
import com.hazelcast.jet.pipeline.StreamSource;
import com.hazelcast.jet.pipeline.StreamStage;
import java.util.Map.Entry;
......@@ -45,10 +45,10 @@ public class Uc1PipelineBuilder {
// Do not refactor this to just use the call
// (There is a problem with static calls in functions in hazelcastjet)
final DatabaseWriter<String> writer = this.databaseAdapter.getDatabaseWriter();
final Sink<String> sink = sinkBuilder(
final Sink<String> sink = SinkBuilder.sinkBuilder(
"Sink into database", x -> writer)
.<String>receiveFn(DatabaseWriter::write)
.build();
.<String>receiveFn(DatabaseWriter::write)
.build();
uc1TopologyProduct.writeTo(sink);
......
......@@ -57,8 +57,8 @@ public class HistoryService {
*/
private void createHazelcastJetApplication() throws Exception { // NOPMD
new Uc2HazelcastJetFactory()
.setReadPropertiesFromEnv(KAFKA_BOOTSTRAP_DEFAULT, SCHEMA_REGISTRY_URL_DEFAULT,JOB_NAME)
.setWritePropertiesFromEnv(KAFKA_BOOTSTRAP_DEFAULT,SCHEMA_REGISTRY_URL_DEFAULT)
.setReadPropertiesFromEnv(KAFKA_BOOTSTRAP_DEFAULT, SCHEMA_REGISTRY_URL_DEFAULT, JOB_NAME)
.setWritePropertiesFromEnv(KAFKA_BOOTSTRAP_DEFAULT, SCHEMA_REGISTRY_URL_DEFAULT)
.setKafkaInputTopicFromEnv(KAFKA_INPUT_TOPIC_DEFAULT)
.setKafkaOutputTopicFromEnv(KAFKA_OUTPUT_TOPIC_DEFAULT)
.setDownsampleIntervalFromEnv(DOWNSAMPLE_INTERVAL_DEFAULT_MS)
......
......@@ -180,9 +180,9 @@ public class Uc2HazelcastJetFactory {
* @return The Uc2HazelcastJetBuilder factory with set kafkaReadPropertiesForPipeline.
*/
public Uc2HazelcastJetFactory setReadPropertiesFromEnv(// NOPMD
final String bootstrapServersDefault,
final String schemaRegistryUrlDefault,
final String jobName) {
final String bootstrapServersDefault,
final String schemaRegistryUrlDefault,
final String jobName) {
// Use KafkaPropertiesBuilder to build a properties object used for kafka
final KafkaPropertiesBuilder propsBuilder = new KafkaPropertiesBuilder();
final Properties kafkaReadProps =
......
......@@ -110,7 +110,7 @@ public class Uc2PipelineBuilder {
* @return An AggregateOperation used by Hazelcast Jet in a streaming stage which aggregates
* ActivePowerRecord Objects into Stats Objects.
*/
public AggregateOperation1<Entry<String, ActivePowerRecord>, StatsAccumulator, Stats> uc2AggregateOperation() {
public AggregateOperation1<Entry<String, ActivePowerRecord>, StatsAccumulator, Stats> uc2AggregateOperation() { // NOCS
// Aggregate Operation to Create a Stats Object from Entry<String,ActivePowerRecord> items using
// the Statsaccumulator.
return AggregateOperation
......
......@@ -192,9 +192,9 @@ public class Uc3HazelcastJetFactory { // NOPMD
* @return The Uc3HazelcastJetBuilder factory with set kafkaReadPropertiesForPipeline.
*/
public Uc3HazelcastJetFactory setReadPropertiesFromEnv(// NOPMD
final String bootstrapServersDefault,
final String schemaRegistryUrlDefault,
final String jobName) {
final String bootstrapServersDefault,
final String schemaRegistryUrlDefault,
final String jobName) {
// Use KafkaPropertiesBuilder to build a properties object used for kafka
final KafkaPropertiesBuilder propsBuilder = new KafkaPropertiesBuilder();
final Properties kafkaReadProps =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment