Package io.trino.plugin.accumulo
Class AccumuloMetadata
- java.lang.Object
-
- io.trino.plugin.accumulo.AccumuloMetadata
-
- All Implemented Interfaces:
ConnectorMetadata
public class AccumuloMetadata extends Object implements ConnectorMetadata
Trino metadata provider for Accumulo. Responsible for creating/dropping/listing tables, schemas, columns, all sorts of goodness. Heavily leveragesAccumuloClient.
-
-
Constructor Summary
Constructors Constructor Description AccumuloMetadata(AccumuloClient client)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.spi.connector.ConnectorMetadata
addColumn, applyAggregation, applyDelete, applyJoin, applyLimit, applyProjection, applySample, applyTableScanRedirect, applyTopN, beginDelete, beginInsert, beginQuery, beginRefreshMaterializedView, beginStatisticsCollection, beginTableExecute, beginUpdate, cleanupQuery, createMaterializedView, createRole, createSchema, delegateMaterializedViewRefreshToConnector, denySchemaPrivileges, denyTablePrivileges, dropColumn, dropMaterializedView, dropRole, dropSchema, executeDelete, finishDelete, finishRefreshMaterializedView, finishStatisticsCollection, finishTableExecute, finishUpdate, getCommonPartitioningHandle, getDeleteRowIdColumnHandle, getInfo, getInfo, getInsertLayout, getLayoutForTableExecute, getMaterializedView, getMaterializedViewFreshness, getMaterializedViews, getNewTableLayout, getSchemaOwner, getSchemaProperties, getStatisticsCollectionMetadata, getStatisticsCollectionMetadataForWrite, getSystemTable, getTableHandle, getTableHandleForExecute, getTableHandleForStatisticsCollection, getTableLayout, getTableLayouts, getTableSchema, getTableStatistics, getUpdateRowIdColumnHandle, getViews, grantRoles, grantSchemaPrivileges, grantTablePrivileges, isSupportedVersionType, listAllRoleGrants, listApplicableRoles, listEnabledRoles, listMaterializedViews, listRoleGrants, listRoles, listTablePrivileges, makeCompatiblePartitioning, makeCompatiblePartitioning, metadataDelete, redirectTable, refreshMaterializedView, renameMaterializedView, renameSchema, renameView, resolveIndex, revokeRoles, revokeSchemaPrivileges, revokeTablePrivileges, roleExists, schemaExists, setColumnComment, setSchemaAuthorization, setTableAuthorization, setTableComment, setTableProperties, setViewAuthorization, streamTableColumns, supportsMetadataDelete, supportsMissingColumnsOnInsert, truncateTable, validateScan
-
-
-
-
Constructor Detail
-
AccumuloMetadata
@Inject public AccumuloMetadata(AccumuloClient client)
-
-
Method Detail
-
beginCreateTable
public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)
- Specified by:
beginCreateTablein interfaceConnectorMetadata
-
finishCreateTable
public Optional<ConnectorOutputMetadata> finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishCreateTablein interfaceConnectorMetadata
-
createTable
public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
- Specified by:
createTablein interfaceConnectorMetadata
-
dropTable
public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
dropTablein interfaceConnectorMetadata
-
renameTable
public void renameTable(ConnectorSession session, ConnectorTableHandle tableHandle, SchemaTableName newTableName)
- Specified by:
renameTablein interfaceConnectorMetadata
-
createView
public void createView(ConnectorSession session, SchemaTableName viewName, ConnectorViewDefinition definition, boolean replace)
- Specified by:
createViewin interfaceConnectorMetadata
-
dropView
public void dropView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
dropViewin interfaceConnectorMetadata
-
getView
public Optional<ConnectorViewDefinition> getView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
getViewin interfaceConnectorMetadata
-
listViews
public List<SchemaTableName> listViews(ConnectorSession session, Optional<String> schemaName)
- Specified by:
listViewsin interfaceConnectorMetadata
-
beginInsert
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
beginInsertin interfaceConnectorMetadata
-
finishInsert
public Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishInsertin interfaceConnectorMetadata
-
getTableHandle
public ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
- Specified by:
getTableHandlein interfaceConnectorMetadata
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTableMetadatain interfaceConnectorMetadata
-
getColumnHandles
public Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getColumnHandlesin interfaceConnectorMetadata
-
getColumnMetadata
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
- Specified by:
getColumnMetadatain interfaceConnectorMetadata
-
renameColumn
public void renameColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle source, String target)
- Specified by:
renameColumnin interfaceConnectorMetadata
-
listSchemaNames
public List<String> listSchemaNames(ConnectorSession session)
- Specified by:
listSchemaNamesin interfaceConnectorMetadata
-
listTables
public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> filterSchema)
- Specified by:
listTablesin interfaceConnectorMetadata
-
listTableColumns
public Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTableColumnsin interfaceConnectorMetadata
-
usesLegacyTableLayouts
public boolean usesLegacyTableLayouts()
- Specified by:
usesLegacyTableLayoutsin interfaceConnectorMetadata
-
applyFilter
public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle table, Constraint constraint)
- Specified by:
applyFilterin interfaceConnectorMetadata
-
getTableProperties
public ConnectorTableProperties getTableProperties(ConnectorSession session, ConnectorTableHandle handle)
- Specified by:
getTablePropertiesin interfaceConnectorMetadata
-
rollback
public void rollback()
-
-