public class DefaultDatasetProvider extends Object implements DatasetProvider
Dataset instances using DatasetFramework. Default implementation.| Constructor and Description |
|---|
DefaultDatasetProvider(DatasetFramework framework) |
| Modifier and Type | Method and Description |
|---|---|
<T extends co.cask.cdap.api.dataset.Dataset> |
get(Id.DatasetInstance instance,
ClassLoader classLoader,
Map<String,String> arguments)
Gets a dataset.
|
<T extends co.cask.cdap.api.dataset.Dataset> |
getOrCreate(Id.DatasetInstance instance,
String type,
co.cask.cdap.api.dataset.DatasetProperties creationProps,
ClassLoader classLoader,
Map<String,String> arguments)
Gets a dataset, and creates it first if it doesn't yet exist.
|
@Inject public DefaultDatasetProvider(DatasetFramework framework)
public <T extends co.cask.cdap.api.dataset.Dataset> T get(Id.DatasetInstance instance, @Nullable ClassLoader classLoader, @Nullable Map<String,String> arguments) throws Exception
DatasetProviderget in interface DatasetProviderT - the type of datasetinstance - the dataset IDclassLoader - the classloader to usearguments - the runtime arguments for the datasetExceptionpublic <T extends co.cask.cdap.api.dataset.Dataset> T getOrCreate(Id.DatasetInstance instance, String type, co.cask.cdap.api.dataset.DatasetProperties creationProps, @Nullable ClassLoader classLoader, @Nullable Map<String,String> arguments) throws Exception
DatasetProvidergetOrCreate in interface DatasetProviderT - the type of datasetinstance - the dataset IDtype - the type of datasetcreationProps - the creation propertiesclassLoader - the classloader to usearguments - the runtime arguments for the datasetExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.