-
Notifications
You must be signed in to change notification settings - Fork 42
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
415 issue complete the funcionality of value schema file serializer #416
Conversation
There was a problem hiding this 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!
This pull request hasn't been labeled as |
…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
There was a problem hiding this 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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English please. Check documentation.
No description provided.