pratyakshsharma commented on a change in pull request #1566:
URL: https://github.com/apache/incubator-hudi/pull/1566#discussion_r426185251
##########
File path:
hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/SchemaRegistryProvider.java
##########
@@ -81,11 +66,22 @@ private static Schema getSchema(String registryUrl) throws
IOException {
@Override
public Schema getSourceSchema() {
- return schema;
+ String registryUrl = config.getString(Config.SRC_SCHEMA_REGISTRY_URL_PROP);
+ try {
+ return getSchema(registryUrl);
+ } catch (IOException ioe) {
+ throw new HoodieIOException("Error reading source schema from registry
:" + registryUrl, ioe);
+ }
}
@Override
public Schema getTargetSchema() {
- return targetSchema;
+ String registryUrl = config.getString(Config.SRC_SCHEMA_REGISTRY_URL_PROP);
+ String targetRegistryUrl =
config.getString(Config.TARGET_SCHEMA_REGISTRY_URL_PROP, registryUrl);
+ try {
+ return getSchema(targetRegistryUrl);
Review comment:
Should not be a problem I believe since sourceSchema is used for reading
while targetSchema is used for writing. Any issues if at all should be handled
in HoodieAvroUtils when we try to rewrite the record with targetSchema.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]