congbobo184 commented on a change in pull request #3876: Add the multi version
schema support
URL: https://github.com/apache/pulsar/pull/3876#discussion_r269874938
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java
##########
@@ -30,26 +33,42 @@
import org.apache.avro.reflect.ReflectDatumWriter;
import org.apache.pulsar.client.api.SchemaSerializationException;
import org.apache.pulsar.client.api.schema.SchemaDefinition;
+import org.apache.pulsar.client.impl.schema.generic.GenericAvroSchema;
+import
org.apache.pulsar.client.impl.schema.generic.MultiVersionGenericSchemaProvider;
import org.apache.pulsar.common.schema.SchemaInfo;
import org.apache.pulsar.common.schema.SchemaType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.util.Map;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
/**
* An AVRO schema implementation.
*/
@Slf4j
public class AvroSchema<T> extends StructSchema<T> {
+ private static final Logger LOG =
LoggerFactory.getLogger(AvroSchema.class);
private ReflectDatumWriter<T> datumWriter;
- private ReflectDatumReader<T> reader;
+ private ReflectDatumReader<T> datumReader;
private BinaryEncoder encoder;
private ByteArrayOutputStream byteArrayOutputStream;
-
private static final ThreadLocal<BinaryDecoder> decoders =
new ThreadLocal<>();
+ private boolean supportSchemaVersioning;
Review comment:
All right, it should push to StructSchema
----------------------------------------------------------------
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]
With regards,
Apache Git Services