Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

415 issue complete the funcionality of value schema file serializer #416

Conversation

RobertoSngular
Copy link
Contributor

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for collaborating with the project to help us improve!

@github-actions
Copy link

This pull request hasn't been labeled as release nor documentation. Please ensure this is intentional before merging.

…ue-schema-file-serializer

# Conflicts:
#	src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java
#	src/main/java/com/sngular/kloadgen/extractor/SchemaExtractor.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/json/AbstractJsonExtractor.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonDefaultExtractor.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/json/JsonExtractor.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/protobuff/ProtobuffExtractor.java
#	src/main/java/com/sngular/kloadgen/loadgen/impl/ProtobufLoadGenerator.java
#	src/main/java/com/sngular/kloadgen/processor/objectcreatorfactory/impl/JsonObjectCreatorFactory.java
#	src/main/java/com/sngular/kloadgen/processor/util/SchemaProcessorUtils.java
#	src/main/java/com/sngular/kloadgen/property/editor/FileSubjectPropertyEditor.java
#	src/main/java/com/sngular/kloadgen/property/editor/KeyDeserializerPropertyEditor.java
#	src/main/java/com/sngular/kloadgen/property/editor/SchemaRegistryConfigPropertyEditor.java
#	src/main/java/com/sngular/kloadgen/property/editor/SerDesPackageValue.java
#	src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/SchemaRegistryConstants.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/SchemaRegistryManagerFactory.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/adapter/impl/AbstractParsedSchemaAdapter.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/adapter/impl/ApicurioSchemaMetadata.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/adapter/impl/BaseSchemaMetadata.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/adapter/impl/ConfluentAbstractParsedSchemaMetadata.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/adapter/impl/GenericSchemaRegistryAdapter.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/impl/ApicurioSchemaRegistry.java
#	src/main/java/com/sngular/kloadgen/schemaregistry/impl/ConfluentSchemaRegistry.java
#	src/main/java/com/sngular/kloadgen/serializer/AvroDeserializer.java
#	src/test/java/com/sngular/kloadgen/config/valuefileserialized/ValueFileSerializedConfigElementBeanInfoTest.java
#	src/test/java/com/sngular/kloadgen/config/valueserialized/ValueSerializedConfigElementBeanInfoTest.java
#	src/test/java/com/sngular/kloadgen/extractor/SchemaExtractorTest.java
Copy link
Contributor

@jemacineiras jemacineiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rethink the whole task.

final SchemaRegistryEnum schemaRegistryEnum = SchemaRegistryEnum.valueOf(registryName.toUpperCase());

final Object schema;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you want to go back with this change?


public interface ExtractorRegistry<T> {
List<FieldValueMapping> processSchema(final T schema, SchemaRegistryEnum registry);

ParsedSchema processSchema(final String fileContent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not add confluent dependencies here.


public class AvroExtractor implements ExtractorRegistry<Object> {

private static Map<SchemaRegistryEnum, Extractor> schemaRegistryMap = Map.of(SchemaRegistryEnum.CONFLUENT, new AvroConfluentExtractor(), SchemaRegistryEnum.APICURIO,
new AvroApicurioExtractor());
static final Map<SchemaRegistryEnum, Extractor> SCHEMA_REGISTRY_MAP = Map.of(SchemaRegistryEnum.CONFLUENT, new AvroConfluentExtractor(), SchemaRegistryEnum.APICURIO,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the visibility?

@@ -23,10 +23,10 @@

public abstract class AbstractJsonExtractor {

private final JSONSchemaParser jsonSchemaParser = new JSONSchemaParser();
public static final JSONSchemaParser JSON_SCHEMA_PARSER = new JSONSchemaParser();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why make it public?

@@ -182,6 +175,46 @@ public final void actionPerformed(final ActionEvent event) {
}
}

public final void buildTable(final List<FieldValueMapping> attributeList) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this...

@@ -100,7 +100,7 @@ private Object getEnumOrGenerate(final String fieldName, final String fieldType,
final List<String> enumValueList = schema.getEnumSymbols();
value = new GenericData.EnumSymbol(schema, enumValueList.get(RandomUtils.nextInt(0, enumValueList.size())));
} else {
if ("Seq".equalsIgnoreCase(fieldType)) {
if ("Seq".equalsIgnoreCase(fieldType)) { // Este if nunca da true, no se si sobra o está mal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English please. Check documentation.

@jemacineiras jemacineiras added bug Something isn't working release Adding this tag to a PR will cause a release on merge labels Nov 6, 2023
@RobertoSngular RobertoSngular merged commit e985874 into master Nov 6, 2023
11 checks passed
@RobertoSngular RobertoSngular deleted the 415-issue-complete-the-funcionality-of-value-schema-file-serializer branch November 6, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release Adding this tag to a PR will cause a release on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue]: Complete the funcionality of "Value Schema File Serializer"
5 participants