@Beta public class IndexedTableDefinition extends CompositeDatasetDefinition<IndexedTable>
IndexedTable
.NO_ARGUMENTS
Constructor and Description |
---|
IndexedTableDefinition(String name,
DatasetDefinition<? extends Table,?> tableDef) |
Modifier and Type | Method and Description |
---|---|
DatasetSpecification |
configure(String instanceName,
DatasetProperties properties)
Configures new instance of the dataset.
|
IndexedTable |
getDataset(DatasetContext datasetContext,
DatasetSpecification spec,
Map<String,String> arguments,
ClassLoader classLoader)
Provides dataset to be used to perform data operations on the dataset instance data defined by passed
DatasetSpecification and the given arguments. |
DatasetSpecification |
reconfigure(String instanceName,
DatasetProperties newProperties,
DatasetSpecification currentSpec)
Validates the new properties, including a compatibility check with the existing spec, and returns a
new dataset specification for the dataset instance.
|
getAdmin, getDataset, getDelegate
getName, reconfigure
public IndexedTableDefinition(String name, DatasetDefinition<? extends Table,?> tableDef)
public DatasetSpecification configure(String instanceName, DatasetProperties properties)
DatasetDefinition
configure
in interface DatasetDefinition<IndexedTable,DatasetAdmin>
configure
in class CompositeDatasetDefinition<IndexedTable>
instanceName
- name of the instanceproperties
- instance configuration propertiesDatasetSpecification
that fully describes dataset instance.
The DatasetSpecification
can be used to create DatasetAdmin
and Dataset
to perform
administrative and data operations respectively, see DatasetDefinition.getAdmin(DatasetContext,
DatasetSpecification, ClassLoader)
and DatasetDefinition.getDataset(DatasetContext, DatasetSpecification, Map, ClassLoader)
.public DatasetSpecification reconfigure(String instanceName, DatasetProperties newProperties, DatasetSpecification currentSpec) throws IncompatibleUpdateException
Reconfigurable
reconfigure
in interface Reconfigurable
reconfigure
in class CompositeDatasetDefinition<IndexedTable>
newProperties
- the updated dataset properties, to be validated by this methodcurrentSpec
- the current specification of the datasetIncompatibleUpdateException
- if the new properties are not compatible with the existing datasetpublic IndexedTable getDataset(DatasetContext datasetContext, DatasetSpecification spec, Map<String,String> arguments, ClassLoader classLoader) throws IOException
DatasetDefinition
DatasetSpecification
and the given arguments.datasetContext
- context for the datasetspec
- specification of the dataset instance.arguments
- arguments for this instance of the dataset. Should not be null - provide an empty map for no
arguments.classLoader
- classloader to use when executing dataset operationsIOException
Copyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.