Cluster and Node Management
Cluster and Node Management commands allow administrators to manage storage clusters, create and manage storage spaces, create and manage nodes, and apply configuration changes to nodes, clusters, or the overall system.
CREATE CLUSTER creates a new cluster in the current database. The cluster name must be distinct from the name of any existing tables in the database.
To create a cluster, the logged-in user must be a system-level user.
For more information on creating clusters, see Ocient Application Configuration.
For Foundation (LTS) clusters, if the system is configured with a single-cluster configuration, when you add a second Foundation cluster, the system automatically changes to a multi-cluster configuration. This change is irreversible and requires a full system restart to fully take effect.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the new cluster to create. |
You must include following configuration settings when creating a new cluster.
Configuration | Data Type | Description |
---|---|---|
TYPE | string | The supported value is: foundation - Processes query operators and handles storage on the system. |
PARTICIPANTS | string | A list of one or more node names that are included in the new cluster. The number of participant nodes in a cluster must be equal to or greater than the storage-space width. For more information, see CREATE STORAGESPACE. Adding more than the minimum number of participants to a cluster overprovisions the cluster and allows replacing or dropping participant nodes. Nodes cannot be assigned as participants to multiple clusters. |
STORAGESPACE | string | The name of the storage space for the cluster. |
Examples
This example creates an LTS cluster named lts_cluster0 using the storage space named my_storage_space with three participant nodes.
DROP CLUSTER removes an existing cluster from the system.
To remove a cluster, you must be a system-level user.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the specified cluster to remove. |
Example
This example removes an existing cluster called lts_cluster0.
ALTER CLUSTER ADD PARTICIPANTS adds the specified nodes to an existing cluster in the system. This operation can overprovision the storage space if necessary.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the specified cluster to alter. |
node_name1, [,...] | string | The name of one or more nodes to add to the cluster. |
Example
This example adds the node node3 to a cluster named example_cluster, which already contains node1 and node2. Following this operation, example_cluster consists of three nodes.
ALTER CLUSTER DROP PARTICIPANTS drops nodes from an existing cluster.
This command fails if the cluster type is LTS. Dropping the specified nodes brings the number of participants below the total width of the storage space associated with that cluster.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the specified cluster to alter. |
node_name1, [,...] | string | The name of one or more nodes to drop from the cluster. |
Example
This example drops participant node node3 from a cluster named example_cluster which contains node1, node2, and node3. Following this operation, the participants in example_cluster consist of the nodes node1 and node2.
ALTER CLUSTER ALTER CONFIG SET sets a configuration override for the configuration at the cluster scope. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
If the specified path to the configuration setting does not exist, the system considers it as a new configuration and appends it to the collection of existing configurations. To reset a configuration override for a specific key, use the RESET keyword.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the specified cluster to alter. |
string_definition | string | The name of a configuration parameter to alter. Contact support for details about altering configuration parameters. |
string_value | string | The new value to set for the specified configuration parameter. |
Examples
This example alters the base configuration for cluster cluster_name and sets the certificate for all nodes to a certificate named cert_name.crt.
This example resets the certificate configuration for cluster cluster_name.
This example alters the configuration at the cluster scope for cluster cluster_name and service role lts.
ALTER CLUSTER cluster_name ALTER LOG LEVEL SET sets the log level for a particular logger for all nodes in the provided cluster. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
Syntax
Parameter | Data Type | Description |
---|---|---|
cluster_name | string | The name of the specified cluster to alter. |
<logger_parameters>
Configuration | Data Type | Description |
---|---|---|
logger_name | string | Use ALL for the root logging configuration. Otherwise, the logger_name parameter can be any string specifying a logger name for all nodes in the provided cluster. |
logger_level | string | The level of severity to be assigned to the logger_name logger_level must be among the following options: 'EDEBUG' | 'DEBUG' | 'VERBOSE' | 'INFO' | 'WARN' | 'ERROR' See the Error Monitoring page for more details on log levels. To reset a logger to the default log level (INFO), use the RESET keyword. |
Examples
The following example alters the log level at the cluster scope. This sets the query log level for all nodes in the cluster to DEBUG.
This example resets the log level for the query logger for the entire cluster.
Rename an existing cluster in the system.
Syntax
Parameter | Data Type | Description |
---|---|---|
old_cluster_name | string | The name of the specified cluster to alter. |
new_cluster_name | string | The new name to assign to the cluster. |
Example
This example renames an existing cluster called lts-cluster-0 to lts-cluster-1.
CREATE STORAGESPACE creates a new storage space. The storage space name must be distinct from the name of any existing storage spaces in the system.
To create a storage space, you must possess the CREATE STORAGESPACE privilege for the current system.
It is recommended that the total width on a production system be smaller than the number of Foundation (LTS) nodes in the cluster so that loading can continue even in the event of a node outage.
Syntax
Parameter | Data Type | Description |
---|---|---|
storage_space_name | string | The name of the new storage space. A storage space name must begin with a letter followed by letters, numbers, and underscores. |
width_integer | integer | The total number of nodes to use in each segment group as it is written to disk. Width cannot be greater than the number of nodes in the storage cluster. |
pw_integer | integer | The number of parity coding bits to use for each segment group. This number must be less than width. The specified storage space can still complete queries even if nodes are disabled as long as the number of disabled nodes does not exceed the parity_width. For example, a storage space with a width = 5 and a parity_width = 2 can have up to two nodes become disabled, and the system still uses the three remaining nodes to execute queries. However, if a third node goes down, the system can no longer process query operations. |
Example
This example creates a new storage space called ocient.
DROP STORAGESPACE removes an existing storage space, along with all associated tables and views. The command will fail if one or more storage clusters are linked to the storage space.
To remove a storage space, you must possess the DROP STORAGESPACE privilege for the storage space. Note that this action cannot be undone.
Syntax
Parameter | Data Type | Description |
---|---|---|
storage_space_name | string | The name of a storage space to drop. |
Example
To remove an existing database named ocient.
ALTER STORAGESPACE RENAME renames an existing storage space.
To rename a storage space, the logged-in user must be a system-level user.
Syntax
Parameter | Data Type | Description |
---|---|---|
old_storage_space_name | string | The name of a storage space to rename. |
new_storage_space | string | The new name for the specified storage space. |
Example
To rename an existing storage space called teststoragespace to storage-space-1.
DROP NODE removes an existing node from the system.
A node cannot be removed from the system if it is still part of a cluster or if it is one of the two remaining Administration nodes.
Syntax
Parameter | Data Type | Description |
---|---|---|
node_name | string | The name of a node to drop. |
Example
To remove a node named example_node:
ALTER NODE RENAME renames an existing node.
To rename a node, you must be a system-level user.
Renaming a node can cause a mismatch between the name of the node and the hostname of the node. Furthermore, you have to update users and scripts to use the new name of the node. It is recommended that this command is used only to undo situations like this that can arise naturally (for example, if a node has to be replaced with a differently-named node).
Syntax
Parameter | Data Type | Description |
---|---|---|
old_node_name | string | The name of a node to be rename. |
new_node_name | string | The new name for the specified node. |
Example
This example renames an existing node called sql0 to sql1.
ALTER NODE ADD ROLE adds a role to a node. Each node can have one or more roles that it performs.
To add a role, you must be a system-level user.
Syntax
Parameter | Data Type | Description |
---|---|---|
node_name | string | The name of a node to alter. |
The following table explains the supported roles for nodes:
Role | Description | Notes |
---|---|---|
streamloader | The streamloader role allows the node to continually import a large amount of data into the database. | When adding the streamloader role, the node must be restarted in order for the change to take effect. |
sql | The sql role accepts a SQL statement, parses the statement, and compiles the statement. | You can remove this role only if there is at least one other SQL node present. |
operatorvm | The operatorvm role manages database query plans and executes queries. | Added or removed automatically together with the sql or lts role. |
lts | The nodes with the lts role store data on disk in segments in a column-oriented fashion. The lts role is associated with the Foundation nodes on the system. | Can only be added or removed by adding or removing the node as a participant in an LTS cluster. |
admin | The admin role accepts the administrative protocol and updates system metadata. | Can only be removed if there are at least two other administrative nodes. |
health | A node with the health role is responsible for maintaining performance-related counters and statistics. | Present initially on every node. Cannot be removed. |
Example
To add SQL role to the node sql1:
ALTER NODE REMOVE ROLE removes a role from a node. For a list of roles, see Node Roles.
Some node roles cannot be removed using an ALTER NODE command, including health, lts, and operatorvm.
To remove a role, you must be a system-level user.
The node must be restarted in order for this change to take effect.
When you remove the admin role, you must also remove the /var/opt/ocient/metadataStorage.raft file.
Syntax
Parameter | Data Type | Description |
---|---|---|
node_name | string | The name of a node to alter. |
Example
This example removes the sql role from a node.
ALTER NODE ALTER CONFIG SET sets a configuration override for the configuration at the node scope. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
If the specified path to the configuration setting does not exist, it will be considered a new configuration and appended to the collection of existing configurations. To reset a configuration override for a specific key, use the RESET keyword.
Syntax
Parameter | Data Type | Description |
---|---|---|
node_name | string | The name of the specified node to alter. |
string_definition | string | The name of a configuration parameter to alter. Contact Ocient support for details about altering configuration parameters. |
string_value | string | The new value to be set for the specified configuration parameter. |
Examples
This example sets the certificate name for this node to cert_name.crt.
This example resets certificate configuration for the node node2.
This example alters the configuration at the node scope for node node2 for service role lts.
ALTER NODE node_name ALTER LOG LEVEL SET sets the log level for a particular logger on the specified node. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
The logger name specified can be any string specifying a logger name, or ALL for the root logging configuration. See the Log Configuration for more details.
To reset a logger to the default log level (INFO), use the RESET keyword.
Syntax
Parameter | Data Type | Description |
---|---|---|
node_name | string | The name of the specified node to alter. |
<logger_parameters> | string | Use ALL for the root logging configuration. Otherwise, the logger_name parameter can be any string specifying a logger name assigned to a severity level. See the Log Configuration page for more details. To reset a logger to the default log level (INFO), use the RESET keyword. |
Examples
This example alters the log level at the node scope. The example sets the query log level for this particular node to DEBUG.
This example resets log level for the query logger on the specified node.
ALTER SYSTEM ALTER CONFIG SET sets a configuration override for the configuration at the system scope. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
If the specified path to the configuration setting does not exist, it is considered a new configuration and appended to the collection of existing configurations. To reset a configuration override for a specific key, use the RESET keyword.
By default, this configuration override is set in the base node configuration. To apply the override to a specific service role, simply prefix the key with the name of the service role.
Syntax
Parameter | Data Type | Description |
---|---|---|
string_definition | string | The name of a configuration parameter to alter. Contact Ocient support for details about altering configuration parameters. |
string_value | string | The new value to be set for the specified configuration parameter. |
Examples
This example alters the base configuration at the system scope. The examples sets the certificate name for each node in the entire system to cert_name.crt.
This example resets certificate configuration for the entire system.
This example alters the configuration at the system scope for service role lts.
ALTER SYSTEM ALTER LOG LEVEL SET sets the log level for a particular logger for all nodes in the system. For an explanation of how configuration overrides work, see Inspect the Current Configuration.
The logger name specified can be any string specifying a logger name, or ALL for the root logging config. See the Log Configuration for more details.
Syntax
Parameter | Data Type | Description |
---|---|---|
<logger_parameters> | string | Use ALL for the root logging config. Otherwise, the logger_name parameter can be any string specifying a logger name assigned to a severity level. See the Log Configuration page for more details. To reset a logger to the default log level (INFO), use the RESET keyword. |
Example
This example alters the log level at the system scope.
ALTER SYSTEM RENAME TO sets the system name. The system name appears in the sys.system_information system catalog table. You can also see the current system name by using the CURRENT_SYSTEM function.
Syntax
Parameter | Data Type | Description |
---|---|---|
system_name | string | The name of the Ocient system. |
Example