5.2 Maintaining ZooKeeper, Vertica and Kafka Clusters

5.2.1 Maintaining the ZooKeeper Cluster

  • Modifying the ZooKeeper Cluster: Execute the following command to modify the cluster level parameters of the ZooKeeper service.

    zman server-role-zookeeper-update-cluster (zman srzuc)

    The parameters of this command are:

    • -l --leader-connect-port: Define the leader port that the followers will use to connect to a leader in the cluster. The default port is 6790. However, you can specify an unused port between 6000 and 65535.

    • -c --client-port: Define the port on which ZooKeeper will listen in for incoming client connections. The default port is 6789. However, you can specify an unused port between 6000 and 65535.

    • -e --leader-elect-port: : Define the election port that all servers in the cluster will use to elect the leader. The default port is 6791. However, you can specify an unused port between 6000 and 65535.

    • -t --tick-time: Define the length of a single tick, which is a basic time unit in milliseconds, used by ZooKeeper to regulate heartbeats and timeouts. The default value is 2000.

    • -i --init-limit: Define the amount of time, in ticks, to allow followers to connect to the leader. The default value is 10.

    • -s --sync-limit: Define the amount of time, in ticks, to allow followers to sync with ZooKeeper. The default value is 5.

    • -x --max-connections: Specify the maximum number of client connections that the ZooKeeper cluster can accept. The default value is 120.

      For example: zman server-role-zookeeper-update-cluster -s=6

  • Removing additional ZooKeeper servers: Execute the following command to remove additional ZooKeeper servers:

    zman server-role-zookeeper-remove-server (zman srzrs)

    This command removes any additional servers from the existing cluster. Specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers. At least one server in the zone must have a ZooKeeper role enabled on it. Therefore, this command will not work if the server in which ZooKeeper role is enabled, is the last ZooKeeper server.

    For example: zman server-role-zookeeper-remove-server --servers=server1.microfocus.com

  • Viewing list of ZooKeeper servers: Execute the following command to view the list of ZooKeeper servers in a cluster.

    zman server-role-zookeeper-list-cluster (zman srzlc)

5.2.2 Maintaining the Kafka Cluster

Maintaining Kafka Brokers

  • Removing brokers from the Kafka cluster: Execute the following command to remove a broker from the Kafka cluster:

    zman server-role-kafka-remove-broker (zman srkrb)

    This command lets you remove Kafka brokers from an existing cluster. Specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers.

    For example: zman server-role-kafka-remove-broker --servers=server1.microfocus.com

  • Re-configuring Kafka broker: Execute the following command to re-configure the Kafka broker:

    zman server-role-kafka-reconfig-broker (zman srkrcb)

    Specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers, while executing this command. When a broker is added to Kafka cluster, the remaining servers are re-configured by ZENworks. However, if re-configuration fails for a specific server, then run this command for that server. This command is also used for Disaster Recovery scenarios. For more information, see ZENworks Disaster Recovery Reference

    For example: zman server-role-kafka-reconfig-broker --servers=server1.microfocus.com

  • Viewing list of Kafka brokers: Execute the following command to view the list of Kafka brokers.

    zman server-role-kafka-list-cluster (zman srklc)

Maintaining Kafka Connect

When Kafka is enabled, Kafka connectors are created that is associated with each table in the RDBMS database. If any of these connectors are not running, then you might have to restart these connectors or re-configure the connectors.

To view the status of these connectors, navigate to the Diagnostic page in ZCC and view the status in the Data Sync Status section.

  • Restart Kafka Connectors: Execute the following command:

    zman server-role-kafka-restart-connectors (zman srkrcn)

    Specify a comma separated list of connectors. This command can be used when any of the Kafka connectors displayed in the Diagnostics page in ZCC, is not running.

    For example: zman server-role-kafka-restart-connectors -c=zenconnectorzBundlefolderrights,zenconnectorzbundlerights

  • Reconfigure Kafka Connectors: Execute the following command to reconfigure connectors based on the properties mentioned in the connector-configs.xml. This file is available at etc/opt/novell/zenworks.

    zman server-role-kafka-reconfigure-connectors (zman srkccn)

    The connector-configs.xml file lets you modify properties such as the interval at which the Kafka connector identifies changes in the RDBMS tables or the interval at which updated data is published to Kafka. Specify a comma separated list of connectors.

    For example: zman server-role-kafka-reconfigure-connectors -c=zenconnectorzBundlefolderrights,zenconnectorzbundlerights

  • Re-create Kafka Connectors: Execute the following command to re-create connectors.

    zman server-role-kafka-recreate-connectors (zman srkrcc)

    You can execute this command if you have migrated your primary database to another RDBMS database.

    For example: zman server-role-kafka-recreate-connectors -f

  • Retrieve Kafka configuration details: Execute the following command to retrieve the Kafka configuration details:

    zman server-role-kafka-get-connector-config (zman srkgcc)

    For example: zman server-role-kafka-get-connector-config -c=zenconnectorzBundlefolderrights

  • Retrieve list of Kafka connectors: Execute the following command to retrieve a list of Kafka connectors:

    zman server-role-kafka-list-connectors (zman srklcn)

5.2.3 Maintaining the Vertica Cluster

IMPORTANT:If you modify the Vertica cluster, ensure that you restart the ZENserver and ZENloader services on all the Primary Servers.

  • Removing a server: Execute the following command to remove a server from the existing cluster:

    zman server-role-vertica-remove server (zman srvrs)

    Specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers, while executing this command. You can only remove one server at a time. Ensure that the K-safety factor remains effective after removing a server from the cluster. If you are decommissioning a server from the existing cluster, then before removing the server, it is recommended that you add another server to the cluster.

    For example: zman server-role-vertica-remove server --servers=server1.microfocus.com

  • Preparing the Vertica server for restore process: Execute the following command to prepare the Vertica server during the backup and restore process. For more information, see Replacing an Existing Primary Server with a New Primary Server.

    zman server-role-vertica-prepare-server (zman srvps)
  • Viewing list of Vertica servers: Execute the following command to view the list of Vertica servers in a cluster:

    zman server-role-vertica-list-cluster (zman srvlc)