the-other-tim-brown commented on code in PR #599:
URL: https://github.com/apache/incubator-xtable/pull/599#discussion_r1899861727
##########
xtable-core/src/main/java/org/apache/xtable/catalog/ExternalCatalogConfigFactory.java:
##########
@@ -20,16 +20,27 @@
import java.util.Map;
+import org.apache.xtable.catalog.glue.GlueCatalogConversionSource;
+import org.apache.xtable.catalog.glue.GlueCatalogSyncClient;
import org.apache.xtable.conversion.ExternalCatalogConfig;
+import org.apache.xtable.exception.NotSupportedException;
+import org.apache.xtable.model.storage.CatalogType;
/** A factory class which returns {@link ExternalCatalogConfig} based on
catalogType. */
public class ExternalCatalogConfigFactory {
public static ExternalCatalogConfig fromCatalogType(
String catalogType, String catalogId, Map<String, String> properties) {
- // TODO: Choose existing implementation based on catalogType.
- String catalogSyncClientImpl = "";
- String catalogConversionSourceImpl = "";
+ String catalogSyncClientImpl;
+ String catalogConversionSourceImpl;
+ switch (catalogType) {
+ case CatalogType.GLUE:
+ catalogSyncClientImpl = GlueCatalogSyncClient.class.getName();
Review Comment:
We won't have these classes on the path once the code is broken out into
modules, we'll want to adopt a similar pattern using the service loader like we
did for the conversion targets
--
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]