Class FlussMetadataAccessor
- java.lang.Object
-
- org.apache.flink.cdc.connectors.fluss.source.FlussMetadataAccessor
-
- All Implemented Interfaces:
MetadataAccessor
public class FlussMetadataAccessor extends Object implements MetadataAccessor
AMetadataAccessorimplementation that uses the Fluss Admin API to list databases, tables, and retrieve table schemas from a Fluss cluster.
-
-
Constructor Summary
Constructors Constructor Description FlussMetadataAccessor(org.apache.fluss.config.Configuration flussConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemagetTableSchema(TableId tableId)Get theSchemaof the given table.List<String>listNamespaces()List all namespaces from external systems.List<String>listSchemas(String namespace)List all schemas from external systems.List<TableId>listTables(String namespace, String schemaName)List tables by namespace and schema from external systems.
-
-
-
Method Detail
-
listNamespaces
public List<String> listNamespaces()
Description copied from interface:MetadataAccessorList all namespaces from external systems.- Specified by:
listNamespacesin interfaceMetadataAccessor- Returns:
- The list of namespaces
-
listSchemas
public List<String> listSchemas(@Nullable String namespace)
Description copied from interface:MetadataAccessorList all schemas from external systems.- Specified by:
listSchemasin interfaceMetadataAccessor- Parameters:
namespace- The namespace to list schemas from. If null, list schemas from all namespaces.- Returns:
- The list of schemas
-
listTables
public List<TableId> listTables(@Nullable String namespace, @Nullable String schemaName)
Description copied from interface:MetadataAccessorList tables by namespace and schema from external systems.- Specified by:
listTablesin interfaceMetadataAccessor- Parameters:
namespace- The namespace to list tables from. If null, list tables from all namespaces.schemaName- The schema to list tables from. If null, list tables from all schemas.- Returns:
- The list of
TableIds.
-
getTableSchema
public Schema getTableSchema(TableId tableId)
Description copied from interface:MetadataAccessorGet theSchemaof the given table.- Specified by:
getTableSchemain interfaceMetadataAccessor- Parameters:
tableId- TheTableIdof the given table.- Returns:
- The
Schemaof the table.
-
-