public class StaticDatasetFramework extends InMemoryDatasetFramework implements DatasetFramework
DatasetFramework implementation that has fixed set of DatasetModules.
The modules cannot be changed after the creation of the DatasetFramework.
Since the modules are fixed, this implementation has better performance than InMemoryDatasetFramework.| Constructor and Description |
|---|
StaticDatasetFramework(DatasetDefinitionRegistryFactory registryFactory,
Map<String,co.cask.cdap.api.dataset.module.DatasetModule> modules,
CConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModule(Id.DatasetModule moduleId,
co.cask.cdap.api.dataset.module.DatasetModule module)
Adds dataset types by adding dataset module to the system.
|
void |
addModule(Id.DatasetModule moduleId,
co.cask.cdap.api.dataset.module.DatasetModule module,
Location jarLocation)
Adds dataset types by adding dataset module to the system with a jar location containing all dataset classes
needed by the module.
|
void |
createNamespace(Id.Namespace namespaceId)
Creates a namespace in the Storage Providers - HBase/LevelDB, Hive and HDFS/Local File System.
|
protected co.cask.cdap.api.dataset.module.DatasetDefinitionRegistry |
createRegistry(LinkedHashSet<String> availableModuleClasses,
ClassLoader classLoader) |
void |
deleteAllModules(Id.Namespace namespaceId)
Deletes dataset modules and its types in the specified namespace.
|
void |
deleteModule(Id.DatasetModule moduleId)
Deletes dataset module and its types from the system.
|
void |
deleteNamespace(Id.Namespace namespaceId)
Deletes a namespace in the Storage Providers - HBase/LevelDB, Hive and HDFS/Local File System.
|
protected LinkedHashSet<String> |
getAvailableModuleClasses(Id.Namespace namespace) |
addInstance, deleteAllInstances, deleteInstance, getAdmin, getAdmin, getDataset, getDataset, getDataset, getDatasetSpec, getInstances, hasInstance, hasSystemType, hasType, updateInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddInstance, deleteAllInstances, deleteInstance, getAdmin, getAdmin, getDataset, getDataset, getDataset, getDatasetSpec, getInstances, hasInstance, hasSystemType, hasType, updateInstancepublic StaticDatasetFramework(DatasetDefinitionRegistryFactory registryFactory, Map<String,co.cask.cdap.api.dataset.module.DatasetModule> modules, CConfiguration configuration)
protected co.cask.cdap.api.dataset.module.DatasetDefinitionRegistry createRegistry(LinkedHashSet<String> availableModuleClasses, @Nullable ClassLoader classLoader)
createRegistry in class InMemoryDatasetFrameworkprotected LinkedHashSet<String> getAvailableModuleClasses(Id.Namespace namespace)
getAvailableModuleClasses in class InMemoryDatasetFrameworkpublic void addModule(Id.DatasetModule moduleId, co.cask.cdap.api.dataset.module.DatasetModule module)
DatasetFrameworkDatasetModule may
result in tracing class dependencies if the DatasetModule is not a system dataset, which can takes
couple seconds for the tracing. If the jar Location containing the DatasetModule is known, it's
better to call DatasetFramework.addModule(Id.DatasetModule, DatasetModule, Location) instead.addModule in interface DatasetFrameworkaddModule in class InMemoryDatasetFrameworkmoduleId - dataset module idmodule - dataset modulepublic void addModule(Id.DatasetModule moduleId, co.cask.cdap.api.dataset.module.DatasetModule module, Location jarLocation) throws DatasetManagementException
DatasetFrameworkaddModule in interface DatasetFrameworkaddModule in class InMemoryDatasetFrameworkmoduleId - dataset module idmodule - dataset modulejarLocation - location of the jar file that contains the dataset classes needed by the moduleModuleConflictException - when module with same name is already registered or this module registers a type
with a same name as one of the already registered by another module typesDatasetManagementException - in case of problemspublic void deleteModule(Id.DatasetModule moduleId)
DatasetFrameworkdeleteModule in interface DatasetFrameworkdeleteModule in class InMemoryDatasetFrameworkmoduleId - dataset module idpublic void deleteAllModules(Id.Namespace namespaceId)
DatasetFrameworkdeleteAllModules in interface DatasetFrameworkdeleteAllModules in class InMemoryDatasetFrameworknamespaceId - the Id.Namespace to delete all modules from.public void createNamespace(Id.Namespace namespaceId) throws DatasetManagementException
DatasetFrameworkcreateNamespace in interface DatasetFrameworkcreateNamespace in class InMemoryDatasetFrameworknamespaceId - the Id.Namespace to createDatasetManagementExceptionpublic void deleteNamespace(Id.Namespace namespaceId) throws DatasetManagementException
DatasetFrameworkdeleteNamespace in interface DatasetFrameworkdeleteNamespace in class InMemoryDatasetFrameworknamespaceId - the Id.Namespace to createDatasetManagementExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.