public class ClassLoaderSafeConnectorMetadata extends Object implements ConnectorMetadata
| Constructor and Description |
|---|
ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
ConnectorOutputTableHandle |
beginCreateTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Begin the atomic creation of a table with data.
|
ConnectorInsertTableHandle |
beginInsert(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin insert query
|
boolean |
canCreateSampledTables(ConnectorSession session)
Returns true if this catalog supports creation of sampled tables
|
void |
commitCreateTable(ConnectorOutputTableHandle tableHandle,
Collection<String> fragments)
Commit a table creation with data after the data is written.
|
void |
commitInsert(ConnectorInsertTableHandle insertHandle,
Collection<String> fragments)
Commit insert query
|
ConnectorTableHandle |
createTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Creates a table using the specified table metadata.
|
void |
createView(ConnectorSession session,
SchemaTableName viewName,
String viewData,
boolean replace)
Create the specified view.
|
void |
dropTable(ConnectorTableHandle tableHandle)
Drops the specified table
|
void |
dropView(ConnectorSession session,
SchemaTableName viewName)
Drop the specified view.
|
Map<String,ConnectorColumnHandle> |
getColumnHandles(ConnectorTableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.
|
ColumnMetadata |
getColumnMetadata(ConnectorTableHandle tableHandle,
ConnectorColumnHandle columnHandle)
Gets the metadata for the specified table column.
|
ConnectorColumnHandle |
getSampleWeightColumnHandle(ConnectorTableHandle tableHandle)
Returns the handle for the sample weight column, or null if the table does not contain sampled data.
|
ConnectorTableHandle |
getTableHandle(ConnectorSession session,
SchemaTableName tableName)
Returns a table handle for the specified table name, or null if the connector does not contain the table.
|
ConnectorTableMetadata |
getTableMetadata(ConnectorTableHandle table)
Return the metadata for the specified table handle.
|
Map<SchemaTableName,String> |
getViews(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the view data for views that match the specified table prefix.
|
List<String> |
listSchemaNames(ConnectorSession session)
Returns the schemas provided by this connector.
|
Map<SchemaTableName,List<ColumnMetadata>> |
listTableColumns(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
|
List<SchemaTableName> |
listTables(ConnectorSession session,
String schemaNameOrNull)
List table names, possibly filtered by schema.
|
List<SchemaTableName> |
listViews(ConnectorSession session,
String schemaNameOrNull)
List view names, possibly filtered by schema.
|
void |
renameTable(ConnectorTableHandle tableHandle,
SchemaTableName newTableName)
Rename the specified table
|
String |
toString() |
public ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate, ClassLoader classLoader)
public List<String> listSchemaNames(ConnectorSession session)
ConnectorMetadatalistSchemaNames in interface ConnectorMetadatapublic ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
ConnectorMetadatagetTableHandle in interface ConnectorMetadatapublic ConnectorTableMetadata getTableMetadata(ConnectorTableHandle table)
ConnectorMetadatagetTableMetadata in interface ConnectorMetadatapublic List<SchemaTableName> listTables(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistTables in interface ConnectorMetadatapublic ConnectorColumnHandle getSampleWeightColumnHandle(ConnectorTableHandle tableHandle)
ConnectorMetadatagetSampleWeightColumnHandle in interface ConnectorMetadatapublic boolean canCreateSampledTables(ConnectorSession session)
ConnectorMetadatacanCreateSampledTables in interface ConnectorMetadatapublic Map<String,ConnectorColumnHandle> getColumnHandles(ConnectorTableHandle tableHandle)
ConnectorMetadatagetColumnHandles in interface ConnectorMetadatapublic ColumnMetadata getColumnMetadata(ConnectorTableHandle tableHandle, ConnectorColumnHandle columnHandle)
ConnectorMetadatagetColumnMetadata in interface ConnectorMetadatapublic Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatalistTableColumns in interface ConnectorMetadatapublic ConnectorTableHandle createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatacreateTable in interface ConnectorMetadatapublic void dropTable(ConnectorTableHandle tableHandle)
ConnectorMetadatadropTable in interface ConnectorMetadatapublic void renameTable(ConnectorTableHandle tableHandle, SchemaTableName newTableName)
ConnectorMetadatarenameTable in interface ConnectorMetadatapublic ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatabeginCreateTable in interface ConnectorMetadatapublic void commitCreateTable(ConnectorOutputTableHandle tableHandle, Collection<String> fragments)
ConnectorMetadatacommitCreateTable in interface ConnectorMetadatapublic ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginInsert in interface ConnectorMetadatapublic void commitInsert(ConnectorInsertTableHandle insertHandle, Collection<String> fragments)
ConnectorMetadatacommitInsert in interface ConnectorMetadatapublic void createView(ConnectorSession session, SchemaTableName viewName, String viewData, boolean replace)
ConnectorMetadatacreateView in interface ConnectorMetadatapublic void dropView(ConnectorSession session, SchemaTableName viewName)
ConnectorMetadatadropView in interface ConnectorMetadatapublic List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistViews in interface ConnectorMetadatapublic Map<SchemaTableName,String> getViews(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatagetViews in interface ConnectorMetadataCopyright © 2012-2014. All Rights Reserved.