WIP - Do not Merge: Added support for AWS Glue Schema registry#488
WIP - Do not Merge: Added support for AWS Glue Schema registry#488nicklester wants to merge 1 commit intoobsidiandynamics:masterfrom
Conversation
|
Thank you @nicklester ! |
Bert-R
left a comment
There was a problem hiding this comment.
I've added a few small comments.
I agree with @davideicardi that a bit more isolation and genericity would be helpful.
What about this:
- Add a property
schemaregistry.type, with possible valuesgenericandaws-glue. Default isgeneric. - Extend
SchemaRegistryPropertieswith a check: iftype != 'generic', then the propertiesconnectandauthshould not be set. - Enhance
GlueSchemaRegistryPropertiesin a similar way and removeisConfigured. Als add a validation that the mandatory properties are set if this registry type is configured. - Extend
AvroMessageDeserializerwith a map of deserializer factories, keyed by the registry type.
With that, we're prepared for a future PR that adds support for Microsoft's SchemaRegistryApacheAvroSerializer
| this.messageFormatProperties = messageFormatProperties; | ||
| this.schemaRegistryProperties = schemaRegistryProperties; | ||
| this.protobufProperties = protobufProperties; | ||
| this.glueSchemaRegistryProperties = glueSchemaRegistryProperties; |
There was a problem hiding this comment.
Move this one down, to maintain the same order as the parameter list
|
|
||
| or, if you are using the AWS Glue Schema Registry | ||
| ``` | ||
| --schemaregistry.glue.region=us-east-1 --schemaregistry.glue.registryName=demo-registry |
There was a problem hiding this comment.
| --schemaregistry.glue.region=us-east-1 --schemaregistry.glue.registryName=demo-registry | |
| --schemaregistry.glue.region=us-east-1 | |
| --schemaregistry.glue.registryName=demo-registry |
Besides this, also document the other (apparently optional) properties.
| if(StringUtils.isNotEmpty(awsEndpoint)) | ||
| config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); |
There was a problem hiding this comment.
| if(StringUtils.isNotEmpty(awsEndpoint)) | |
| config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); | |
| if (StringUtils.isNotEmpty(awsEndpoint)) { | |
| config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); | |
| } |
We'll need to establish and publish a code style, but from what I see, curly braces are used around all blocks.
There was a problem hiding this comment.
good suggestiosn - sorry slow response. Busy work wise. Will take a look shortly
Was just a quick question - (as Java is not my 1st or even 2nd language!). Isn't using a factory going to mean we need to pass the same types as arguments, but the generic and glue configs are different, and in different hierarchies). Apologies if I've missed something obvious :) |
|
No problem! As always, there are multiple ways to approach it. I'd do a slightly bigger refactor as you find in |
Added support to enable the AWS Glue Schema Registry