public class WorkspaceSchemaFactory.WorkspaceSchema extends AbstractSchema implements ExpandingConcurrentMap.MapValueFactory<org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.TableInstance,DrillTable>
name, schemaPath| Constructor and Description |
|---|
WorkspaceSchemaFactory.WorkspaceSchema(List<String> parentSchemaPath,
String wsName,
SchemaConfig schemaConfig,
DrillFileSystem fs) |
| Modifier and Type | Method and Description |
|---|---|
DrillTable |
create(org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.TableInstance key) |
CreateTableEntry |
createNewTable(String tableName,
List<String> partitionColumns,
StorageStrategy storageStrategy)
Creates table entry using table name, list of partition columns
and storage strategy used to create table folder and files
|
boolean |
createView(View view)
Create a new view given definition.
|
void |
destroy(DrillTable value) |
void |
dropTable(String table)
We check if the table contains homogeneous file formats that Drill can read.
|
void |
dropView(String viewName)
Drop the view with given name.
|
String |
getDefaultLocation() |
DrillFileSystem |
getFS() |
Set<String> |
getFunctionNames() |
List<org.apache.calcite.schema.Function> |
getFunctions(String name) |
Iterable<String> |
getSubPartitions(String table,
List<String> partitionColumns,
List<String> partitionValues)
Get a list of sub-partitions of a particular table and the partitions
specified by partition columns and values.
|
org.apache.calcite.schema.Table |
getTable(String tableName) |
Set<String> |
getTableNames() |
List<org.apache.commons.lang3.tuple.Pair<String,org.apache.calcite.schema.Schema.TableType>> |
getTableNamesAndTypes(boolean bulkLoad,
int bulkSize) |
String |
getTypeName() |
boolean |
isMutable() |
close, contentsHaveChangedSince, createNewTable, getDefaultSchema, getExpression, getFullSchemaName, getName, getSchemaPath, getSubSchema, getSubSchemaNames, getTablesByNames, getTablesByNamesByBulkLoad, showInInformationSchemapublic WorkspaceSchemaFactory.WorkspaceSchema(List<String> parentSchemaPath, String wsName, SchemaConfig schemaConfig, DrillFileSystem fs) throws IOException
IOExceptionpublic boolean createView(View view) throws IOException
AbstractSchemacreateView in class AbstractSchemaview - View info including name, definition etc.IOExceptionpublic Iterable<String> getSubPartitions(String table, List<String> partitionColumns, List<String> partitionValues) throws PartitionNotFoundException
SchemaPartitionExplorerPartitionExplorer.getSubPartitions in interface SchemaPartitionExplorergetSubPartitions in class AbstractSchemapartitionColumns - a list of partitions to matchpartitionValues - list of values of each partition (corresponding
to the partition column list)PartitionNotFoundException - when the partition does not exist in
the given workspacepublic void dropView(String viewName) throws IOException
AbstractSchemadropView in class AbstractSchemaIOExceptionpublic Set<String> getTableNames()
getTableNames in interface org.apache.calcite.schema.SchemagetTableNames in class AbstractSchemapublic Set<String> getFunctionNames()
getFunctionNames in interface org.apache.calcite.schema.SchemagetFunctionNames in class AbstractSchemapublic List<org.apache.calcite.schema.Function> getFunctions(String name)
getFunctions in interface org.apache.calcite.schema.SchemagetFunctions in class AbstractSchemapublic org.apache.calcite.schema.Table getTable(String tableName)
getTable in interface org.apache.calcite.schema.SchemagetTable in class AbstractSchemapublic boolean isMutable()
isMutable in interface org.apache.calcite.schema.SchemaisMutable in class AbstractSchemapublic DrillFileSystem getFS()
public String getDefaultLocation()
public CreateTableEntry createNewTable(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy)
AbstractSchemacreateNewTable in class AbstractSchematableName - : new table name.partitionColumns - : list of partition columns. Empty list if there is no partition columns.storageStrategy - : storage strategy used to create table folder and filespublic String getTypeName()
getTypeName in class AbstractSchemapublic DrillTable create(org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.TableInstance key)
create in interface ExpandingConcurrentMap.MapValueFactory<org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.TableInstance,DrillTable>public void destroy(DrillTable value)
destroy in interface ExpandingConcurrentMap.MapValueFactory<org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.TableInstance,DrillTable>public void dropTable(String table)
dropTable in class AbstractSchematable - - Path of table to be droppedpublic List<org.apache.commons.lang3.tuple.Pair<String,org.apache.calcite.schema.Schema.TableType>> getTableNamesAndTypes(boolean bulkLoad, int bulkSize)
getTableNamesAndTypes in class AbstractSchemaCopyright © 2017 The Apache Software Foundation. All rights reserved.