Class NewTableConfiguration
java.lang.Object
org.apache.accumulo.core.client.admin.NewTableConfiguration
This object stores table creation parameters. Currently includes:
TimeType
, whether to
include default iterators, and user-specified initial properties- Since:
- 1.7.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattachIterator
(IteratorSetting setting) Configure iterator settings for a table prior to its creation.attachIterator
(IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) Configure iterator settings for a table prior to its creation.Create the new table in an offline state.enableSampling
(SamplerConfiguration samplerConfiguration) Enable building a sample data set on the new table using the given sampler configuration.enableSummarization
(SummarizerConfiguration... configs) Enables creating summary statistics usingSummarizer
's for the new table.Return value indicating whether table is to be created in offline or online mode.Retrieves the complete set of currently configured table properties to be applied to a table when this configuration object is used.Collection<org.apache.hadoop.io.Text>
Return Collection of split values.Retrieve the time type currently configured.setLocalityGroups
(Map<String, Set<org.apache.hadoop.io.Text>> groups) Configures a table's locality groups prior to initial table creation.setProperties
(Map<String, String> props) Sets additional properties to be applied to tables created with this configuration.setTimeType
(TimeType tt) Configure logical or millisecond time for tables created with this configuration.Currently the only default iterator is theVersioningIterator
.withSplits
(SortedSet<org.apache.hadoop.io.Text> splits) Create a new table with pre-configured splits from the provided input collection.
-
Constructor Details
-
NewTableConfiguration
public NewTableConfiguration()
-
-
Method Details
-
setTimeType
Configure logical or millisecond time for tables created with this configuration.- Parameters:
tt
- the time type to use; defaults to milliseconds- Returns:
- this
-
getTimeType
Retrieve the time type currently configured.- Returns:
- the time type
-
withoutDefaultIterators
Currently the only default iterator is theVersioningIterator
. This method will cause the table to be created without that iterator, or any others which may become defaults in the future.- Returns:
- this
-
createOffline
Create the new table in an offline state.- Returns:
- this
- Since:
- 2.0.0
-
getInitialTableState
Return value indicating whether table is to be created in offline or online mode.- Since:
- 2.0.0
-
setProperties
Sets additional properties to be applied to tables created with this configuration. Additional calls to this method replace properties set by previous calls.- Parameters:
props
- additional properties to add to the table when it is created- Returns:
- this
-
getProperties
Retrieves the complete set of currently configured table properties to be applied to a table when this configuration object is used.- Returns:
- the current properties configured
-
getSplits
Return Collection of split values.- Returns:
- Collection containing splits associated with this NewTableConfiguration object.
- Since:
- 2.0.0
-
enableSampling
Enable building a sample data set on the new table using the given sampler configuration.- Returns:
- this
- Since:
- 1.8.0
-
enableSummarization
Enables creating summary statistics usingSummarizer
's for the new table.- Returns:
- this
- Since:
- 2.0.0
-
setLocalityGroups
Configures a table's locality groups prior to initial table creation. Allows locality groups to be set prior to table creation. Additional calls to this method prior to table creation will overwrite previous locality group mappings.- Parameters:
groups
- mapping of locality group names to column families in the locality group- Since:
- 2.0.0
- See Also:
-
withSplits
Create a new table with pre-configured splits from the provided input collection.- Parameters:
splits
- A SortedSet of String values to be used as split points in a newly created table.- Returns:
- this
- Since:
- 2.0.0
-
attachIterator
Configure iterator settings for a table prior to its creation. Additional calls to this method before table creation will overwrite previous iterator settings.- Parameters:
setting
- object specifying the properties of the iterator- Returns:
- this
- Since:
- 2.0.0
- See Also:
-
attachIterator
public NewTableConfiguration attachIterator(IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) Configure iterator settings for a table prior to its creation.- Parameters:
setting
- object specifying the properties of the iteratorscopes
- enumerated set of iterator scopes- Returns:
- this
- Since:
- 2.0.0
- See Also:
-