You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/21 07:23:11 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14102: PIP-144: Making SchemaRegistry implementation configurable

codelipenghui commented on a change in pull request #14102:
URL: https://github.com/apache/pulsar/pull/14102#discussion_r830803268



##########
File path: conf/standalone.conf
##########
@@ -184,6 +184,10 @@ maxTopicsPerNamespace=0
 # 'is_allow_auto_update_schema' of namespace policy.
 isAllowAutoUpdateSchemaEnabled=true
 
+# Override the schema registry used by pulsar with a custom implementation. If this config is not provided,
+# the default schema registry will be used.
+schemaRegistryClassName=

Review comment:
       ```suggestion
   schemaRegistryClassName=org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl
   ```
   
   And please also help add the config option to broker.conf

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -1266,6 +1267,12 @@ private SchemaStorage createAndStartSchemaStorage() throws Exception {
         return schemaStorage;
     }
 
+    private void setSchemaRegistryName(SchemaStorage schemaStorage) {
+        if (schemaStorage == null) {
+            this.config.setSchemaRegistryClassName("org.apache.pulsar.broker.service.schema.DefaultSchemaRegistryService");
+        }
+    }

Review comment:
       Hmmm, looks like `DefaultSchemaRegistryService` is not a reasonable name, it should be `SchemaRegistryServiceDisabled`.

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/DefaultSchemaRegistryService.java
##########
@@ -71,17 +75,17 @@
     }
 
     @Override
-    public CompletableFuture<SchemaVersion> deleteSchema(String schemaId, String user, boolean force) {
+    public CompletableFuture<SchemaVersion> putEmptySchema(String schemaId, String user, boolean force) {

Review comment:
       Why do we need to change it to `putEmptySchema`? 




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org