mosche commented on code in PR #25611:
URL: https://github.com/apache/beam/pull/25611#discussion_r1116057032
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/io/Providers.java:
##########
@@ -44,19 +48,19 @@ public static <T extends Identifyable> Map<String, T>
loadProviders(Class<T> kla
for (T provider : ServiceLoader.load(klass)) {
// Avro provider is treated as a special case since two Avro providers
may want to be loaded -
// from "core" (deprecated) and from "extensions/avro" (actual) - but
only one must succeed.
- // TODO: this check should be removed once once
AvroPayloadSerializerProvider from "core" is
+ // TODO: we won't need this check once all Avro providers from "core"
will be
// removed
if (provider.identifier().equals("avro")) {
// Avro provider from "extensions/avro" must have a priority.
- if (provider
- .getClass()
- .getName()
- .equals(
-
"org.apache.beam.sdk.extensions.avro.schemas.io.payloads.AvroPayloadSerializerProvider"))
{
- // Use AvroPayloadSerializerProvider from extensions/avro by any
case.
+ if
(provider.getClass().getName().startsWith("org.apache.beam.sdk.extensions.avro"))
{
+ // Load Avro provider from "extensions/avro" by any case.
providers.put(provider.identifier(), provider);
} else {
// Load Avro provider from "core" if it was not loaded from Avro
extension before.
+ LOG.warn(
Review Comment:
Unfortunately this is generating noise and might warn users even if the Avro
extension is on the classpath depending on the order :/
I think it's better to keep this as a separate task @aromanenko-dev. Adding
warning logs isn't urgent at all.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]