[ 
https://issues.apache.org/jira/browse/PHOENIX-6227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17438202#comment-17438202
 ] 

ASF GitHub Bot commented on PHOENIX-6227:
-----------------------------------------

gjacoby126 commented on a change in pull request #1341:
URL: https://github.com/apache/phoenix/pull/1341#discussion_r742157554



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/schema/export/SchemaRegistryRepositoryFactory.java
##########
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.phoenix.schema.export;
+
+import org.apache.hadoop.conf.Configuration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public final class SchemaRegistryRepositoryFactory {
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(SchemaRegistryRepository.class);
+    private static SchemaRegistryRepository exporter;
+
+    public synchronized static SchemaRegistryRepository 
getSchemaRegistryRepository(Configuration conf)
+            throws IOException {
+        if (exporter != null) {
+            return exporter;
+        }
+        try {
+            String className = 
conf.get(SchemaRegistryRepository.SCHEMA_REGISTRY_IMPL_KEY);
+            if (className == null) {
+                exporter = new DefaultSchemaRegistryRepository();

Review comment:
       Added the factory close method as I described




-- 
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]


> Option for DDL changes to export to external schema repository
> --------------------------------------------------------------
>
>                 Key: PHOENIX-6227
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6227
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Major
>             Fix For: 4.17.0, 5.2.0
>
>
> When a user creates or drops a table or view, or adds/removes a column from 
> one, there should be the option for Phoenix to notify an external schema 
> repository. This should be a configurable plugin so that core Phoenix is not 
> coupled to any particular repository implementation. 
> This will also store a schema id generated by the external schema registry in 
> a new field in System.Catalog so that a future JIRA can switch to using the 
> schema id in change detection WAL annotations. Because of this this JIRA will 
> not be able to be backported to 5.1.x or 4.16.x



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to