ADD AGGREGATOR

Adds a new child aggregator to a cluster.

Syntax

ADD AGGREGATOR user[:'password']@'host'[:port] ;

Remarks

This command must be run on the master aggregator node.

The specified user account must have full permissions on the node to execute this command, namely the cluster privilege. For more information, see Permissions Matrix. The user account will be used by the master aggregator to initially log in to the node. Unlike for ADD LEAF, the specified user won’t be used for any internal cluster communication after the command returns.

Example

The following example demonstrates how to add a child aggregator to a cluster. Note that the client is connected to the master aggregator:

memsql> SHOW AGGREGATORS;
+-----------+------+--------+--------------------+------------------------------+-------------------+
| Host      | Port | State  | Opened_Connections | Average_Roundtrip_Latency_ms | Master_Aggregator |
+-----------+------+--------+--------------------+------------------------------+-------------------+
| 10.0.2.15 | 3306 | online |                  1 |                         NULL |                 1 |
+-----------+------+--------+--------------------+------------------------------+-------------------+
1 row in set (0.00 sec)

memsql> ADD AGGREGATOR root@'10.0.2.16':3306;
Query OK, 0 rows affected (1.49 sec)

memsql> SHOW AGGREGATORS;
+-----------+------+--------+--------------------+------------------------------+-------------------+
| Host      | Port | State  | Opened_Connections | Average_Roundtrip_Latency_ms | Master_Aggregator |
+-----------+------+--------+--------------------+------------------------------+-------------------+
| 10.0.2.15 | 3306 | online |                  1 |                         NULL |                 1 |
| 10.0.2.16 | 3306 | online |                  0 |                        0.218 |                 0 |
+-----------+------+--------+--------------------+------------------------------+-------------------+
2 rows in set (0.00 sec)
Was this article useful?