/** * Returns the connector database service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector database service for the given <code>name</code> */ public ConnectorDatabaseService getDatabaseService(final QualifiedName name) { return getConnectorFactory(name).getDatabaseService(); }
/** * Returns the connector partition service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector partition service for the given <code>name</code> */ public ConnectorPartitionService getPartitionService(final QualifiedName name) { return getConnectorFactory(name).getPartitionService(); }
/** * Returns the connector table service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector table service for the given <code>name</code> */ public ConnectorTableService getTableService(final QualifiedName name) { return getConnectorFactory(name).getTableService(); }
final ConnectorFactory connectorFactory = connectorPlugin.create(connectorContext); try { databaseServices.add(connectorFactory.getDatabaseService()); } catch (UnsupportedOperationException e) { log.debug("Catalog {}:{} doesn't support getDatabaseService. Ignoring.", catalogName, catalogShardName); tableServices.add(connectorFactory.getTableService()); } catch (UnsupportedOperationException e) { log.debug("Catalog {}:{} doesn't support getTableService. Ignoring.", catalogName, catalogShardName); partitionServices.add(connectorFactory.getPartitionService()); } catch (UnsupportedOperationException e) { log.debug("Catalog {}:{} doesn't support getPartitionService. Ignoring.",
/** * Stop. */ @PreDestroy public void stop() { if (stopped.getAndSet(true)) { return; } catalogs.values().forEach(catalogHolder -> { try { catalogHolder.getConnectorFactory().stop(); } catch (Throwable t) { log.error("Error shutting down connector: {}", catalogHolder.getConnectorFactory().getCatalogName(), t); } }); }