@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.
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
CatalogFactory.Context
Context provided when a catalog is created.
|
| 限定符和类型 | 方法和说明 |
|---|---|
default Catalog |
createCatalog(CatalogFactory.Context context)
Creates and configures a
Catalog using the given context. |
default Catalog |
createCatalog(String name,
Map<String,String> properties)
已过时。
Use
this#createCatalog(Context) instead and implement Factory
instead of TableFactory. |
default String |
factoryIdentifier()
Returns a unique identifier among same factory interfaces.
|
default Set<org.apache.flink.configuration.ConfigOption<?>> |
optionalOptions()
Returns a set of
ConfigOption that an implementation of this factory consumes in
addition to Factory.requiredOptions(). |
default Map<String,String> |
requiredContext()
已过时。
Implement the
Factory based stack instead. |
default Set<org.apache.flink.configuration.ConfigOption<?>> |
requiredOptions()
Returns a set of
ConfigOption that an implementation of this factory requires in
addition to Factory.optionalOptions(). |
default List<String> |
supportedProperties()
已过时。
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()
FactoryFor 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 在接口中 Factorydefault Set<org.apache.flink.configuration.ConfigOption<?>> requiredOptions()
FactoryConfigOption that an implementation of this factory requires in
addition to Factory.optionalOptions().
See the documentation of Factory for more information.
requiredOptions 在接口中 Factorydefault Set<org.apache.flink.configuration.ConfigOption<?>> optionalOptions()
FactoryConfigOption that an implementation of this factory consumes in
addition to Factory.requiredOptions().
See the documentation of Factory for more information.
optionalOptions 在接口中 Factory@Deprecated default Map<String,String> requiredContext()
Factory based stack instead.TableFactoryTypical 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 在接口中 TableFactory@Deprecated default List<String> supportedProperties()
Factory based stack instead.TableFactoryExample 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 在接口中 TableFactoryCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.