@PublicEvolving public interface CatalogFactory extends TableFactory, Factory
Factory
for more information.
Note that this interface supports the TableFactory
stack for compatibility purposes.
This is deprecated, however, and new implementations should implement the Factory
stack
instead.
Modifier and Type | Interface and Description |
---|---|
static interface |
CatalogFactory.Context
Context provided when a catalog is created.
|
Modifier and Type | Method and Description |
---|---|
default Catalog |
createCatalog(CatalogFactory.Context context)
Creates and configures a
Catalog using the given context. |
default Catalog |
createCatalog(String name,
Map<String,String> properties)
Deprecated.
Use
this#createCatalog(Context) instead and implement Factory
instead of TableFactory . |
default String |
factoryIdentifier()
Returns a unique identifier among same factory interfaces.
|
default Set<ConfigOption<?>> |
optionalOptions()
Returns a set of
ConfigOption that an implementation of this factory consumes in
addition to Factory.requiredOptions() . |
default Map<String,String> |
requiredContext()
Deprecated.
Implement the
Factory based stack instead. |
default Set<ConfigOption<?>> |
requiredOptions()
Returns a set of
ConfigOption that an implementation of this factory requires in
addition to Factory.optionalOptions() . |
default List<String> |
supportedProperties()
Deprecated.
Implement the
Factory based stack instead. |
@Deprecated default Catalog createCatalog(String name, Map<String,String> properties)
this#createCatalog(Context)
instead and implement Factory
instead of TableFactory
.Catalog
using the given properties.properties
- normalized properties describing an external catalog.default Catalog createCatalog(CatalogFactory.Context context)
Catalog
using the given context.
An implementation should perform validation and the discovery of further (nested) factories in this method.
default String factoryIdentifier()
Factory
For consistency, an identifier should be declared as one lower case word (e.g. kafka
). If multiple factories exist for different versions, a version should be appended
using "-" (e.g. elasticsearch-7
).
factoryIdentifier
in interface Factory
default Set<ConfigOption<?>> requiredOptions()
Factory
ConfigOption
that an implementation of this factory requires in
addition to Factory.optionalOptions()
.
See the documentation of Factory
for more information.
requiredOptions
in interface Factory
default Set<ConfigOption<?>> optionalOptions()
Factory
ConfigOption
that an implementation of this factory consumes in
addition to Factory.requiredOptions()
.
See the documentation of Factory
for more information.
optionalOptions
in interface Factory
@Deprecated default Map<String,String> requiredContext()
Factory
based stack instead.TableFactory
Typical properties might be: - connector.type - format.type
Specified property versions allow the framework to provide backwards compatible properties in case of string format changes: - connector.property-version - format.property-version
An empty context means that the factory matches for all requests.
requiredContext
in interface TableFactory
@Deprecated default List<String> supportedProperties()
Factory
based stack instead.TableFactory
Example properties might be: - schema.#.type - schema.#.name - connector.topic - format.line-delimiter - format.ignore-parse-errors - format.fields.#.type - format.fields.#.name
Note: Use "#" to denote an array of values where "#" represents one or more digits. Property versions like "format.property-version" must not be part of the supported properties.
In some cases it might be useful to declare wildcards "*". Wildcards can only be declared at the end of a property key.
For example, if an arbitrary format should be supported: - format.*
Note: Wildcards should be used with caution as they might swallow unsupported properties and thus might lead to undesired behavior.
supportedProperties
in interface TableFactory
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.