Interface SchemaProvider
- All Known Implementing Classes:
FsMetastoreSchemaProvider,InlineSchemaProvider,PathSchemaProvider
public interface SchemaProvider
Provides mechanisms to manage schema: store / read / delete.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault schema file name where schema is stored on file system. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes schema.booleanexists()Checks if schema exists.read()Reads schema intoSchemaContainer.voidStores given schema definition and properties.
-
Field Details
-
DEFAULT_SCHEMA_NAME
Default schema file name where schema is stored on file system. File is hidden to avoid including it when reading table data.- See Also:
-
-
Method Details
-
delete
Deletes schema.- Throws:
IOException
-
store
void store(String schema, Map<String, String> properties, StorageProperties storageProperties) throws IOExceptionStores given schema definition and properties.- Parameters:
schema- schema definitionproperties- map of propertiesstorageProperties- storage properties- Throws:
IOException
-
read
Reads schema intoSchemaContainer. Depending on implementation, can read from a file or from the given input.- Returns:
- table schema instance
- Throws:
IOException
-
exists
Checks if schema exists.- Returns:
- true if schema exists, false otherwise
- Throws:
IOException
-