Step 5: Test MariaDB Enterprise Server
This page is part of MariaDB's Documentation.
The parent of this page is: Deploy ColumnStore Shared Local Storage Topology with MariaDB Enterprise Server 10.6
Topics on this page:
Overview
This page details step 5 of the 9-step procedure "Deploy ColumnStore Shared Local Storage Topology".
This step tests MariaDB Enterprise Server 10.6 and MariaDB Enterprise ColumnStore 23.10.
Interactive commands are detailed. Alternatively, the described operations can be performed using automation.
Test Enterprise Server Service
Use Systemd to test whether the MariaDB Enterprise Server service is running.
This action is performed on each Enterprise ColumnStore node.
Check if the MariaDB Enterprise Server service is running by executing the following:
$ systemctl status mariadb
If the service is not running on any node, start the service by executing the following on that node:
$ sudo systemctl start mariadb
Test Local Client Connections
Use MariaDB Client to test the local connection to the Enterprise Server node.
This action is performed on each Enterprise ColumnStore node:
$ sudo mariadb
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 10.6.19-15-MariaDB-Enterprise MariaDB Enterprise Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
The sudo
command is used here to connect to the Enterprise Server node using the root@localhost
user account, which authenticates using the unix_
Test ColumnStore Storage Engine Plugin
Query the information_
This action is performed on each Enterprise ColumnStore node.
Execute the following query:
SELECT PLUGIN_NAME, PLUGIN_STATUS
FROM information_schema.PLUGINS
WHERE PLUGIN_LIBRARY LIKE 'ha_columnstore%';
+---------------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+---------------------+---------------+
| Columnstore | ACTIVE |
| COLUMNSTORE_COLUMNS | ACTIVE |
| COLUMNSTORE_TABLES | ACTIVE |
| COLUMNSTORE_FILES | ACTIVE |
| COLUMNSTORE_EXTENTS | ACTIVE |
+---------------------+---------------+
The PLUGIN_STATUS
column for each ColumnStore-related plugin should contain ACTIVE
.
Test CMAPI Service
Use Systemd to test whether the CMAPI service is running.
This action is performed on each Enterprise ColumnStore node.
Check if the CMAPI service is running by executing the following:
$ systemctl status mariadb-columnstore-cmapi
If the service is not running on any node, start the service by executing the following on that node:
$ sudo systemctl start mariadb-columnstore-cmapi
Test ColumnStore Status
Use CMAPI to request the ColumnStore status. The API key needs to be provided as part of the X-API-key
HTML header.
This action is performed with the CMAPI service on the primary server.
Check the ColumnStore status using curl
by executing the following:
$ curl -k -s https://mcs1:8640/cmapi/0.4.0/cluster/status \
--header 'Content-Type:application/json' \
--header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
| jq .
{
"timestamp": "2020-12-15 00:40:34.353574",
"192.0.2.1": {
"timestamp": "2020-12-15 00:40:34.362374",
"uptime": 11467,
"dbrm_mode": "master",
"cluster_mode": "readwrite",
"dbroots": [
"1"
],
"module_id": 1,
"services": [
{
"name": "workernode",
"pid": 19202
},
{
"name": "controllernode",
"pid": 19232
},
{
"name": "PrimProc",
"pid": 19254
},
{
"name": "ExeMgr",
"pid": 19292
},
{
"name": "WriteEngine",
"pid": 19316
},
{
"name": "DMLProc",
"pid": 19332
},
{
"name": "DDLProc",
"pid": 19366
}
]
},
"192.0.2.2": {
"timestamp": "2020-12-15 00:40:34.428554",
"uptime": 11437,
"dbrm_mode": "slave",
"cluster_mode": "readonly",
"dbroots": [
"2"
],
"module_id": 2,
"services": [
{
"name": "workernode",
"pid": 17789
},
{
"name": "PrimProc",
"pid": 17813
},
{
"name": "ExeMgr",
"pid": 17854
},
{
"name": "WriteEngine",
"pid": 17877
}
]
},
"192.0.2.3": {
"timestamp": "2020-12-15 00:40:34.428554",
"uptime": 11437,
"dbrm_mode": "slave",
"cluster_mode": "readonly",
"dbroots": [
"2"
],
"module_id": 2,
"services": [
{
"name": "workernode",
"pid": 17789
},
{
"name": "PrimProc",
"pid": 17813
},
{
"name": "ExeMgr",
"pid": 17854
},
{
"name": "WriteEngine",
"pid": 17877
}
]
},
"num_nodes": 3
}
Test DDL
Use MariaDB Client to test DDL.
On the primary server, use the MariaDB Client to connect to the node:
$ sudo mariadb
Create a test database and ColumnStore table:
CREATE DATABASE IF NOT EXISTS test; CREATE TABLE IF NOT EXISTS test.contacts ( first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100) ) ENGINE = ColumnStore;
On each replica server, use the MariaDB Client to connect to the node:
$ sudo mariadb
On each replica server, confirm that the database and table exist:
SHOW CREATE TABLE test.contacts\G;
If the database or table do not exist on any node, then check the replication configuration.
Test DML
Use MariaDB Client to test DML.
On the primary server, use the MariaDB Client to connect to the node:
$ sudo mariadb
Insert sample data into the table created in the DDL test:
INSERT INTO test.contacts (first_name, last_name, email) VALUES ("Kai", "Devi", "kai.devi@example.com"), ("Lee", "Wang", "lee.wang@example.com");
On each replica server, use the MariaDB Client to connect to the node:
$ sudo mariadb
Execute a SELECT query to retrieve the data:
SELECT * FROM test.contacts;
+------------+-----------+----------------------+ | first_name | last_name | email | +------------+-----------+----------------------+ | Kai | Devi | kai.devi@example.com | | Lee | Wang | lee.wang@example.com | +------------+-----------+----------------------+
If the data is not returned on any node, check the ColumnStore status and the storage configuration.
Next Step
Navigation in the procedure "Deploy ColumnStore Shared Local Storage Topology":
This page was step 5 of 9.