@InterfaceAudience.Public @InterfaceStability.Evolving public class CreateTableOptions extends Object
Constructor and Description |
---|
CreateTableOptions() |
Modifier and Type | Method and Description |
---|---|
CreateTableOptions |
addHashPartitions(List<String> columns,
int buckets)
Add a set of hash partitions to the table.
|
CreateTableOptions |
addHashPartitions(List<String> columns,
int buckets,
int seed)
Add a set of hash partitions to the table.
|
CreateTableOptions |
addRangePartition(PartialRow lower,
PartialRow upper)
Add a range partition partition to the table with an inclusive lower bound
and an exclusive upper bound.
|
CreateTableOptions |
addRangePartition(PartialRow lower,
PartialRow upper,
RangePartitionBound lowerBoundType,
RangePartitionBound upperBoundType)
Add a range partition partition to the table with a lower bound and upper
bound.
|
CreateTableOptions |
addSplitRow(PartialRow row)
Add a range partition split.
|
CreateTableOptions |
setNumReplicas(int numReplicas)
Sets the number of replicas that each tablet will have.
|
CreateTableOptions |
setRangePartitionColumns(List<String> columns)
Set the columns on which the table will be range-partitioned.
|
CreateTableOptions |
setWait(boolean wait)
Whether to wait for the table to be fully created before this create
operation is considered to be finished.
|
public CreateTableOptions addHashPartitions(List<String> columns, int buckets)
columns
- the columns to hashbuckets
- the number of buckets to hash intopublic CreateTableOptions addHashPartitions(List<String> columns, int buckets, int seed)
columns
- the columns to hashbuckets
- the number of buckets to hash intoseed
- a hash seedpublic CreateTableOptions setRangePartitionColumns(List<String> columns)
columns
- the range partitioned columnspublic CreateTableOptions addRangePartition(PartialRow lower, PartialRow upper)
lower
- the inclusive lower boundupper
- the exclusive upper boundpublic CreateTableOptions addRangePartition(PartialRow lower, PartialRow upper, RangePartitionBound lowerBoundType, RangePartitionBound upperBoundType)
lower
- the lower boundupper
- the upper boundlowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic CreateTableOptions addSplitRow(PartialRow row)
row
- a key row for the split pointpublic CreateTableOptions setNumReplicas(int numReplicas)
numReplicas
- the number of replicas to usepublic CreateTableOptions setWait(boolean wait)
If false, the create will finish quickly, but subsequent row operations may take longer as they may need to wait for portions of the table to be fully created.
If true, the create will take longer, but the speed of subsequent row operations will not be impacted.
If not provided, defaults to true.
wait
- whether to wait for the table to be fully createdCopyright © 2018 The Apache Software Foundation. All rights reserved.