Class MySqlMetadataAccessor
- java.lang.Object
-
- org.apache.flink.cdc.connectors.mysql.source.MySqlMetadataAccessor
-
- All Implemented Interfaces:
MetadataAccessor
@Internal public class MySqlMetadataAccessor extends Object implements MetadataAccessor
-
-
Constructor Summary
Constructors Constructor Description MySqlMetadataAccessor(MySqlSourceConfig sourceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemagetTableSchema(TableId tableId)Get theSchemaof the given table.List<String>listNamespaces()Always throwUnsupportedOperationExceptionbecause MySQL does not support namespace.List<String>listSchemas(String namespace)List all database from MySQL.List<TableId>listTables(String namespace, String dbName)List tables from MySQL.
-
-
-
Constructor Detail
-
MySqlMetadataAccessor
public MySqlMetadataAccessor(MySqlSourceConfig sourceConfig)
-
-
Method Detail
-
listNamespaces
public List<String> listNamespaces()
Always throwUnsupportedOperationExceptionbecause MySQL does not support namespace.- Specified by:
listNamespacesin interfaceMetadataAccessor- Returns:
- The list of namespaces
-
listSchemas
public List<String> listSchemas(@Nullable String namespace)
List all database from MySQL.- Specified by:
listSchemasin interfaceMetadataAccessor- Parameters:
namespace- This parameter is ignored because MySQL does not support namespace.- Returns:
- The list of database
-
listTables
public List<TableId> listTables(@Nullable String namespace, @Nullable String dbName)
List tables from MySQL.- Specified by:
listTablesin interfaceMetadataAccessor- Parameters:
namespace- This parameter is ignored because MySQL does not support namespace.dbName- The database to list tables from. If null, list tables from all databases.- Returns:
- The list of
TableIds.
-
getTableSchema
public Schema getTableSchema(TableId tableId)
Get theSchemaof the given table.- Specified by:
getTableSchemain interfaceMetadataAccessor- Parameters:
tableId- TheTableIdof the given table.- Returns:
- The
Schemaof the table.
-
-