diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java index 82639bb3..895f20e4 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.Properties; import com.sngular.kloadgen.common.SchemaRegistryEnum; @@ -21,11 +20,11 @@ import org.apache.jmeter.threads.JMeterContextService; public final class ExtractorFactory { - private static final AvroExtractor avroExtractor = new AvroExtractor(); + private static final AvroExtractor Avroextractor = new AvroExtractor(); - private static final JsonExtractor jsonExtractor = new JsonExtractor(); + private static final JsonExtractor Jsonextractor = new JsonExtractor(); - private static final ProtobuffExtractor protobuffExtractor = new ProtobuffExtractor(); + private static final ProtobuffExtractor Protobuffextractor = new ProtobuffExtractor(); private ExtractorFactory() { } @@ -36,13 +35,12 @@ public static ExtractorRegistry getExtractor(final String schemaType) { final ExtractorRegistry response; switch (SchemaTypeEnum.valueOf(schemaType.toUpperCase())) { case JSON: - response = jsonExtractor; - break; - case AVRO: - response = avroExtractor; + response = Jsonextractor; + break; case AVRO: + response = Avroextractor; break; case PROTOBUF: - response = protobuffExtractor; + response = Protobuffextractor; break; default: throw new KLoadGenException(String.format("Schema type not supported %s", schemaType)); diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java index 4c4e57b5..3162d194 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java @@ -22,7 +22,7 @@ public final List processSchema(final Object schema, SchemaRe return schemaRegistryMap.get(registryEnum).processSchema(schema); } - public final ParsedSchema processSchema(String fileContent) { + public final ParsedSchema processSchema(final String fileContent) { return new AvroSchema(fileContent); } diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonExtractor.java index 54b89956..4bf7cd60 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonExtractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonExtractor.java @@ -23,7 +23,7 @@ public final List processSchema(final Object schemaReceived, return schemaRegistryMap.get(registryEnum).processSchema(schemaReceived); } - public final ParsedSchema processSchema(String fileContent) { + public final ParsedSchema processSchema(final String fileContent) { return new JsonSchema(fileContent); } diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/protobuff/ProtobuffExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/protobuff/ProtobuffExtractor.java index 7d426fcc..fc34d573 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/protobuff/ProtobuffExtractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/protobuff/ProtobuffExtractor.java @@ -26,7 +26,7 @@ public final List processSchema(final Object schemaReceived, return schemaRegistryMap.get(registryEnum).processSchema(schemaReceived); } - public final ParsedSchema processSchema(String fileContent) { + public final ParsedSchema processSchema(final String fileContent) { return new ProtobufSchema(fileContent); } diff --git a/src/main/java/com/sngular/kloadgen/property/editor/FileSubjectPropertyEditor.java b/src/main/java/com/sngular/kloadgen/property/editor/FileSubjectPropertyEditor.java index 8ed9adb0..3db7340f 100644 --- a/src/main/java/com/sngular/kloadgen/property/editor/FileSubjectPropertyEditor.java +++ b/src/main/java/com/sngular/kloadgen/property/editor/FileSubjectPropertyEditor.java @@ -28,6 +28,7 @@ import com.sngular.kloadgen.model.FieldValueMapping; import com.sngular.kloadgen.util.PropsKeysHelper; import io.confluent.kafka.schemaregistry.ParsedSchema; + import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFileChooser; diff --git a/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java b/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java index 85113a8d..d13adec1 100644 --- a/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java +++ b/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java @@ -14,7 +14,6 @@ import com.sngular.kloadgen.randomtool.random.RandomObject; import com.sngular.kloadgen.randomtool.random.RandomSequence; import org.apache.commons.lang3.RandomUtils; - import static com.sngular.kloadgen.randomtool.util.ValueUtils.replaceValuesContext; public class ProtoBufGeneratorTool { diff --git a/src/main/java/com/sngular/kloadgen/sampler/KafkaProducerSampler.java b/src/main/java/com/sngular/kloadgen/sampler/KafkaProducerSampler.java index a347d182..c711cdea 100644 --- a/src/main/java/com/sngular/kloadgen/sampler/KafkaProducerSampler.java +++ b/src/main/java/com/sngular/kloadgen/sampler/KafkaProducerSampler.java @@ -207,7 +207,8 @@ private Boolean enrichedValueFlag() { } private void fillSamplerResult(final ProducerRecord producerRecord, final SampleResult sampleResult) { - String result = "key: " + producerRecord.key() + + final String result = "key: " + + producerRecord.key() + ", payload: " + producerRecord.value(); sampleResult.setSamplerData(result); } diff --git a/src/main/java/com/sngular/kloadgen/util/JMeterHelper.java b/src/main/java/com/sngular/kloadgen/util/JMeterHelper.java index 9cf408fa..b4ec4ac7 100644 --- a/src/main/java/com/sngular/kloadgen/util/JMeterHelper.java +++ b/src/main/java/com/sngular/kloadgen/util/JMeterHelper.java @@ -8,7 +8,6 @@ import java.util.Properties; -import com.sngular.kloadgen.exception.KLoadGenException; import com.sngular.kloadgen.schemaregistry.SchemaRegistryAdapter; import com.sngular.kloadgen.schemaregistry.SchemaRegistryManagerFactory; import com.sngular.kloadgen.schemaregistry.adapter.impl.BaseParsedSchema;