public interface DatasetFramework
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(String datasetTypeName,
Id.DatasetInstance datasetInstanceId,
co.cask.cdap.api.dataset.DatasetProperties props)
Adds information about dataset instance to the system.
|
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.
|
void |
deleteAllInstances(Id.Namespace namespaceId)
Deletes all dataset instances in the specified namespace.
|
void |
deleteAllModules(Id.Namespace namespaceId)
Deletes dataset modules and its types in the specified namespace.
|
void |
deleteInstance(Id.DatasetInstance datasetInstanceId)
Deletes dataset instance from the system.
|
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.
|
<T extends co.cask.cdap.api.dataset.DatasetAdmin> |
getAdmin(Id.DatasetInstance datasetInstanceId,
ClassLoader classLoader)
Gets dataset instance admin to be used to perform administrative operations.
|
<T extends co.cask.cdap.api.dataset.DatasetAdmin> |
getAdmin(Id.DatasetInstance datasetInstanceId,
ClassLoader classLoader,
DatasetClassLoaderProvider classLoaderProvider)
Gets dataset instance admin to be used to perform administrative operations.
|
<T extends co.cask.cdap.api.dataset.Dataset> |
getDataset(Id.DatasetInstance datasetInstanceId,
Map<String,String> arguments,
ClassLoader classLoader)
Gets dataset to be used to perform data operations.
|
<T extends co.cask.cdap.api.dataset.Dataset> |
getDataset(Id.DatasetInstance datasetInstanceId,
Map<String,String> arguments,
ClassLoader classLoader,
DatasetClassLoaderProvider classLoaderProvider,
Iterable<? extends Id> owners)
Gets dataset to be used to perform data operations.
|
<T extends co.cask.cdap.api.dataset.Dataset> |
getDataset(Id.DatasetInstance datasetInstanceId,
Map<String,String> arguments,
ClassLoader classLoader,
Iterable<? extends Id> owners)
Gets dataset to be used to perform data operations.
|
co.cask.cdap.api.dataset.DatasetSpecification |
getDatasetSpec(Id.DatasetInstance datasetInstanceId)
Gets the
DatasetSpecification for the specified dataset instance id |
Collection<DatasetSpecificationSummary> |
getInstances(Id.Namespace namespaceId)
Get all dataset instances in the specified namespace
|
boolean |
hasInstance(Id.DatasetInstance datasetInstanceId) |
boolean |
hasSystemType(String typeName)
Checks if the specified type exists in the 'system' namespace
|
boolean |
hasType(Id.DatasetType datasetTypeId)
Checks if the specified type exists in the specified namespace
|
void |
updateInstance(Id.DatasetInstance datasetInstanceId,
co.cask.cdap.api.dataset.DatasetProperties props)
Updates the existing dataset instance in the system.
|
void addModule(Id.DatasetModule moduleId, co.cask.cdap.api.dataset.module.DatasetModule module) throws DatasetManagementException
DatasetModule 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 addModule(Id.DatasetModule, DatasetModule, Location) instead.moduleId - dataset module idmodule - dataset 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 problemsServiceUnavailableException - when the dataset service is not runningvoid addModule(Id.DatasetModule moduleId, co.cask.cdap.api.dataset.module.DatasetModule module, Location jarLocation) throws DatasetManagementException
moduleId - 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 problemsServiceUnavailableException - when the dataset service is not runningvoid deleteModule(Id.DatasetModule moduleId) throws DatasetManagementException
moduleId - dataset module idModuleConflictException - when module cannot be deleted because of its dependant modules or instancesDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningvoid deleteAllModules(Id.Namespace namespaceId) throws DatasetManagementException
namespaceId - the Id.Namespace to delete all modules from.ModuleConflictException - when some of modules can't be deleted because of its dependant modules or instancesDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningvoid addInstance(String datasetTypeName, Id.DatasetInstance datasetInstanceId, co.cask.cdap.api.dataset.DatasetProperties props) throws DatasetManagementException, IOException
DatasetDefinition.configure(String, DatasetProperties)
method to build DatasetSpecification which describes dataset instance
and later used to initialize DatasetAdmin and Dataset for the dataset instance.datasetTypeName - dataset instance type namedatasetInstanceId - dataset instance nameprops - dataset instance propertiesInstanceConflictException - if dataset instance with this name already existsIOException - when creation of dataset instance using its admin failsDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningvoid updateInstance(Id.DatasetInstance datasetInstanceId, co.cask.cdap.api.dataset.DatasetProperties props) throws DatasetManagementException, IOException
DatasetDefinition.configure(String, DatasetProperties)
method to build DatasetSpecification with new properties,
which describes dataset instance and DatasetAdmin is used to upgrade
Dataset for the dataset instance.datasetInstanceId - dataset instance nameprops - dataset instance propertiesIOException - when creation of dataset instance using its admin failsDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningCollection<DatasetSpecificationSummary> getInstances(Id.Namespace namespaceId) throws DatasetManagementException
namespaceId - the specified namespace idDatasetSpecifications for all datasets in the specified namespaceDatasetManagementException@Nullable co.cask.cdap.api.dataset.DatasetSpecification getDatasetSpec(Id.DatasetInstance datasetInstanceId) throws DatasetManagementException
DatasetSpecification for the specified dataset instance iddatasetInstanceId - the Id.DatasetInstance for which the DatasetSpecification is desiredDatasetSpecification of the dataset or null if dataset not not existDatasetManagementExceptionboolean hasInstance(Id.DatasetInstance datasetInstanceId) throws DatasetManagementException
datasetInstanceId - the Id.DatasetInstance to check for existenceDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningboolean hasSystemType(String typeName) throws DatasetManagementException
DatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningboolean hasType(Id.DatasetType datasetTypeId) throws DatasetManagementException
DatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningvoid deleteInstance(Id.DatasetInstance datasetInstanceId) throws DatasetManagementException, IOException
datasetInstanceId - dataset instance nameInstanceConflictException - if dataset instance cannot be deleted because of its dependenciesIOException - when deletion of dataset instance using its admin failsDatasetManagementExceptionServiceUnavailableException - when the dataset service is not runningvoid deleteAllInstances(Id.Namespace namespaceId) throws DatasetManagementException, IOException
namespaceId - the specified namespace idIOException - when deletion of dataset instance using its admin failsDatasetManagementExceptionServiceUnavailableException - when the dataset service is not running@Nullable <T extends co.cask.cdap.api.dataset.DatasetAdmin> T getAdmin(Id.DatasetInstance datasetInstanceId, @Nullable ClassLoader classLoader) throws DatasetManagementException, IOException
T - dataset admin typedatasetInstanceId - dataset instance nameclassLoader - classLoader to be used to load classes or null to use system classLoadernull if dataset instance of this name doesn't exist.DatasetManagementException - when there's trouble getting dataset meta infoIOException - when there's trouble to instantiate DatasetAdminServiceUnavailableException - when the dataset service is not running@Nullable <T extends co.cask.cdap.api.dataset.DatasetAdmin> T getAdmin(Id.DatasetInstance datasetInstanceId, @Nullable ClassLoader classLoader, DatasetClassLoaderProvider classLoaderProvider) throws DatasetManagementException, IOException
T - dataset admin typedatasetInstanceId - dataset instance nameclassLoader - parent classLoader to be used to load classes or null to use system classLoaderclassLoaderProvider - provider to get classloaders for different dataset modulesnull if dataset instance of this name doesn't exist.DatasetManagementException - when there's trouble getting dataset meta infoIOException - when there's trouble to instantiate DatasetAdminServiceUnavailableException - when the dataset service is not running@Nullable <T extends co.cask.cdap.api.dataset.Dataset> T getDataset(Id.DatasetInstance datasetInstanceId, @Nullable Map<String,String> arguments, @Nullable ClassLoader classLoader, @Nullable Iterable<? extends Id> owners) throws DatasetManagementException, IOException
T - dataset type to be returneddatasetInstanceId - dataset instance idarguments - runtime arguments for the dataset instanceclassLoader - classLoader to be used to load classes or null to use system classLoaderowners - owners of the datasetnull if dataset instance of this name doesn't exist.DatasetManagementException - when there's trouble getting dataset meta infoIOException - when there's trouble to instantiate DatasetServiceUnavailableException - when the dataset service is not running@Nullable <T extends co.cask.cdap.api.dataset.Dataset> T getDataset(Id.DatasetInstance datasetInstanceId, @Nullable Map<String,String> arguments, @Nullable ClassLoader classLoader) throws DatasetManagementException, IOException
T - dataset type to be returneddatasetInstanceId - dataset instance idarguments - runtime arguments for the dataset instanceclassLoader - classLoader to be used to load classes or null to use system classLoadernull if dataset instance of this name doesn't exist.DatasetManagementException - when there's trouble getting dataset meta infoIOException - when there's trouble to instantiate DatasetServiceUnavailableException - when the dataset service is not running@Nullable <T extends co.cask.cdap.api.dataset.Dataset> T getDataset(Id.DatasetInstance datasetInstanceId, @Nullable Map<String,String> arguments, @Nullable ClassLoader classLoader, DatasetClassLoaderProvider classLoaderProvider, @Nullable Iterable<? extends Id> owners) throws DatasetManagementException, IOException
T - dataset type to be returneddatasetInstanceId - dataset instance idarguments - runtime arguments for the dataset instanceclassLoader - parent classLoader to be used to load classes or null to use system classLoaderclassLoaderProvider - provider to get classloaders for different dataset modulesowners - owners of the datasetnull if dataset instance of this name doesn't exist.DatasetManagementException - when there's trouble getting dataset meta infoIOException - when there's trouble to instantiate DatasetServiceUnavailableException - when the dataset service is not runningvoid createNamespace(Id.Namespace namespaceId) throws DatasetManagementException
namespaceId - the Id.Namespace to createDatasetManagementExceptionvoid deleteNamespace(Id.Namespace namespaceId) throws DatasetManagementException
namespaceId - the Id.Namespace to createDatasetManagementExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.