pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #3876: Add the multi version schema support
Date Thu, 21 Mar 2019 09:54:07 GMT
sijie commented on a change in pull request #3876: Add the multi version schema support
URL: https://github.com/apache/pulsar/pull/3876#discussion_r267674612
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -152,6 +155,17 @@
     static <T> ConsumerImpl<T> newConsumerImpl(PulsarClientImpl client, String
topic, ConsumerConfigurationData<T> conf,
                  ExecutorService listenerExecutor, int partitionIndex, CompletableFuture<Consumer<T>>
subscribeFuture,
                  SubscriptionMode subscriptionMode, MessageId startMessageId, Schema<T>
schema, ConsumerInterceptors<T> interceptors) {
+        if(schema instanceof AvroSchema && schema.supportSchemaVersioning()){
+            Map<String, MultiVersionSchema> multiVersionSchemaCatch = client.getMultiVersionSchemaCatch();
+            if(multiVersionSchemaCatch.get(topic) != null){
 
 Review comment:
   ```suggestion
               MultiVersionSchema schema = multiVersionSchemaCache.get(topic);
               if(schema == null) {
                  ...
               }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message