Migrate to a multiple Kudu master configuration
Before migrating to a multiple Kudu masters set up, you need to perform many migration planning steps, such as deciding the number of masters, and choosing the nodes where to add the new Kudu masters.
The migration procedure does not require stopping all the Kudu processes. The restarting of the Kudu processes can be done without incurring downtime.
- You must decide how many masters to use.
The number of masters should be odd because an even number of masters does not provide any benefit over having one fewer masters. Three or five node master configurations are recommended as they can tolerate the failure of one or two masters respectively.
- You must establish a maintenance window.
One hour should be sufficient maintenance window time. During this time the Kudu cluster might become unavailable if there is some problem during the procedure.
- If you have Kudu tables that are accessed from Impala and you did not set up DNS
aliases, update the HMS database manually in the underlying database that provides the
storage for HMS:
- Connect to the HMS database.
- Run an SQL statement similar to the following
example:
UPDATE TABLE_PARAMS SET PARAM_VALUE = 'master-1.example.com,master-2.example.com,master-3.example.com' WHERE PARAM_KEY = 'kudu.master_addresses' AND PARAM_VALUE = 'master-1.example.com';
- In impala-shell run the following command:
INVALIDATE METADATA;
- After adding all the desired masters into the cluster, modify the value of the
tserver_master_addrs
configuration parameter for each tablet server. The new value must be a comma-separated list of masters where each entry is a string of the form<hostname>:<port>
, wherehostname
is master’s hostnameport
is master’s RPC port number
- Restart all the tablet servers to pick up the new masters’ configuration.
- To verify that all masters are working properly, consider performing the following
checks:
-
Using a browser, visit each master’s web UI and navigate to the
/masters
page.All the masters should be listed there with one master in the
LEADER
role and the others in theFOLLOWER
role. The contents of/masters
on each master should be the same. -
Run a Kudu system check (
ksck
) on the cluster using thekudu
command line tool. - If applicable, run a few quick SQL queries against a couple of migrated Kudu tables using impala-shell or Hue.
-