MarkLogic Server 11.0 Product Documentation
tieredstorage.queryPartitionCreatetieredstorage.queryPartitionCreate(
database-id as (Number|String),
partition-name as String,
partition-number as Number?,
forests-per-host as Number,
host-ids as (Number|String)[],
[data-directory as String?],
[large-data-directory as String?],
[fast-data-directory as String?],
[options as String[]]
) as null
Summary
This function creates forests on specified hosts and forms a partition with the specified
partition number. All of the forests will share the partition name as their prefix and the
same partition number. The query for the partition is set separately by the
tieredstorage:partition-set-query function.
Parameters |
database-id |
ID of the database in which the query partition will reside.
|
partition-name |
Name of the query partition.
|
partition-number |
The number of the query partition.
|
forests-per-host |
Number of forests per host in the partition to be created.
|
host-ids |
Ids of hosts on which to create the partition forests.
|
data-directory |
The optional data directory of the forests. If no directory is specified, then
the forests will be private.
|
large-data-directory |
The optional directory where large objects are stored. If no directory is specified, then
large objects will be stored in DATA_DIR/Forests/FOREST_NAME/Large.
|
fast-data-directory |
The optional directory for the fast data directory for the forests. The fast data directory
is typically located on a fast storage device, such as an SSD.
|
options |
Valid option values include:
failover =[none, local, shared] -
If failover is
local and multiple hosts are specified, new
replica(s) will be created.
Shared disk failover will be set up if failover is
shared and multiple hosts are specified. The failover hosts
will be chosen to cover as many different zones as possible.
If failover is none , neither will be set up.
If failover is left unspecified, it will be local unless data
directories are on shared platforms such as HDFS and S3.
replicas=N -
Specifies the number of replicas/failover forests to configure for local-disk or
shared-disk failover.
|
Example
// Creates a Query Partition, named "Default," identified as partition number
// "1" and consisting of two forests for the "Documents" database.
const ts = require('/MarkLogic/tieredstorage');
declareUpdate();
ts.queryPartitionCreate(
xdmp.database('Documents'),
'Default',
1,
2,
xdmp.host('host-1.marklogic.com')
);
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.