Installing Kudu

You can install Kudu in a cluster managed by Cloudera Manager, using either parcels or packages. If you do not use Cloudera Manager, you can install Kudu using packages.

Kudu Installation Requirements

  • An operating system and version supported by Cloudera.
  • To manage Kudu with Cloudera Manager, Cloudera Manager 5.4.3 or later and CDH 5.4 or later are required. Cloudera Manager 5.4.7 is recommended, as it adds support for collecting metrics from Kudu.
  • A kernel version and filesystem that support hole punching. See Error during hole punch test. If you cannot meet this requirement, see this workaround.
  • If solid state storage is available, storing Kudu WALs on such high-performance media may significantly improve latency when Kudu is configured for its highest durability levels.

Install Kudu Using Cloudera Manager

To install and manage Kudu using Cloudera Manager, first download the Custom Service Descriptor (CSD) file for Kudu and upload it to /opt/cloudera/csd/ on the Cloudera Manager server. Restart the Cloudera Manager server using the following operating system command.
$ sudo service cloudera-scm-server restart

Next, follow the instructions in either Install Kudu Using Parcels or Install Kudu Using Packages.

Install Kudu Using Parcels

After uploading the CSD file for Kudu and restarting the Cloudera Manager server, follow these steps to install Kudu using parcels.
  1. In Cloudera Manager, go to Hosts > Parcels. Find KUDU in the list, and click Download.
  2. When the download is complete, select your cluster from the Locations selector, and click Distribute. If you only have one cluster, it is selected automatically.
  3. When distribution is complete, click Activate to activate the parcel. Restart the cluster when prompted. This may take several minutes.
  4. Install the Kudu (Beta) service on your cluster. Go to the cluster where you want to install Kudu. Click Actions > Add a Service. Select Kudu (Beta) from the list, and click Continue.
  5. Select a host for the master role and one or more hosts for the tablet server roles. A host can act as both a master and a tablet server, but this may cause performance problems on a large cluster. The Kudu master process is not resource-intensive and can be collocated with other similar processes such as the HDFS Namenode or YARN ResourceManager. After selecting hosts, click Continue.
  6. Configure the storage locations for Kudu data and write-ahead log (WAL) files on masters and tablet servers. Cloudera Manager will create the directories.
    • You can use the same directory to store data and WALs.
    • You cannot store WALs in a subdirectory of the data directory.
    • If any host is both a master and tablet server, configure different directories for master and tablet server. For instance, /data/kudu/master and /data/kudu/tserver.
    • If you choose a filesystem that does not support hole punching, service start-up will fail.
      1. Exit the configuration wizard by clicking the Cloudera logo at the top of the Cloudera Manager interface.
      2. Go to the Kudu (Beta) service.
      3. Go to Configuration and search for the Kudu (Beta) Service Advanced Configuration Snippet (Safety Valve) for gflagfile configuration option.
      4. Add the following line to it, and save your changes:
        --block_manager=file
  7. If you did not need to exit the wizard, click Continue. Kudu masters and tablet servers are started. Otherwise, go to the Kudu (Beta) service, and click Actions > Start.
  8. Verify that services are running using one of the following methods:
    • Examine the output of the ps command on servers to verify one or both of kudu-master or kudu-tserver processes is running.
    • Access the master or tablet server web UI by opening the URL in your web browser. The URL is http://<_host_name_>:8051/ for masters or http://<_host_name_>:8050/ for tablet servers.
  9. Restart the Service Monitor to begin generating health checks and charts for Kudu. Go to the Cloudera Manager service and click Service Monitor. Choose Actions > Restart.
  10. To manage roles, go to the Kudu (Beta) service and use the Actions menu to stop, start, restart, or otherwise manage the service.

Install Kudu Using Packages

If you use packages with Cloudera Manager, follow these instructions after uploading the CSD file for Kudu and restarting the Cloudera Manager server.
Kudu Repository and Package Links
Operating System Repository Package Individual Packages
RHEL RHEL 6 RHEL 6
Ubuntu Trusty Trusty
  1. Cloudera recommends installing the Kudu repositories for your operating system. Use the links in Kudu Repository and Package Links to download the appropriate repository installer.
    • If you use Cloudera Manager, you only need to install the kudu package:
      $ sudo yum install kudu
      $ sudo apt-get install kudu
    • If you need the C++ client development libraries or the Kudu SDK, install kudu-client and kudu-client-devel packages for RHEL, or libkuduclient0 and libkuduclient-dev packages for Ubuntu.
    • If you use Cloudera Manager, do not install the kudu-master and kudu-tserver packages, which provide operating system startup scripts for using Kudu without Cloudera Manager.
  2. Install the Kudu (Beta) service on your cluster. Go to the cluster where you want to install Kudu. Click Actions > Add a Service. Select Kudu (Beta) from the list, and click Continue.
  3. Select a host for the master role and one or more hosts for the tablet server roles. A host can act as both a master and a tablet server, but this may cause performance problems on a large cluster. The Kudu master process is not resource-intensive and can be collocated with other similar processes such as the HDFS Namenode or YARN ResourceManager. After selecting hosts, click Continue.
  4. Configure the storage locations for Kudu data and write-ahead log (WAL) files on masters and tablet servers. Cloudera Manager will create the directories.
    • You can use the same directory to store data and WALs.
    • You cannot store WALs in a subdirectory of the data directory.
    • If any host is both a master and tablet server, configure different directories for master and tablet server. For instance, /data/kudu/master and /data/kudu/tserver.
    • If you choose a filesystem that does not support hole punching, service start-up will fail.
      1. Exit the configuration wizard by clicking the Cloudera logo at the top of the Cloudera Manager interface.
      2. Go to the Kudu (Beta) service.
      3. Go to Configuration and search for the Kudu (Beta) Service Advanced Configuration Snippet (Safety Valve) for gflagfile configuration option.
      4. Add the following line to it, and save your changes:
        --block_manager=file
  5. If you did not need to exit the wizard, click Continue. Kudu masters and tablet servers are started. Otherwise, go to the Kudu (Beta) service, and click Actions > Start.
  6. Verify that services are running using one of the following methods:
    • Examine the output of the ps command on servers to verify one or both of kudu-master or kudu-tserver processes is running.
    • Access the master or tablet server web UI by opening the URL in your web browser. The URL is http://<_host_name_>:8051/ for masters or http://<_host_name_>:8050/ for tablet servers.
  7. To manage roles, go to the Kudu (Beta) service and use the Actions menu to stop, start, restart, or otherwise manage the service.
  8. Restart the Service Monitor to begin generating health checks and charts for Kudu. Go to the Cloudera Manager service and click Service Monitor. Choose Actions > Restart.

Install Kudu Using the Command Line

Follow these steps on each node which will participate in your Kudu cluster.

  1. Cloudera recommends installing the Kudu repositories for your operating system. Use the links in Kudu Repository and Package Links to download the appropriate repository installer.
    • Install the kudu package, using the appropriate commands for your operating system:
      $ sudo yum install kudu
      $ sudo apt-get install kudu
    • If you need the C++ client development libraries or the Kudu SDK, install kudu-client and kudu-client-devel packages for RHEL, or libkuduclient0 and libkuduclient-dev packages for Ubuntu.
    • Install the kudu-master and kudu-tserver packages, which provide operating system start-up scripts for the Kudu master and tablet servers.
  2. The packages create a kudu-conf entry in the operating system's alternatives database, and they ship the built-in conf.dist alternative. To adjust your configuration, you can either edit the files in /etc/kudu/conf/ directly, or create a new alternative using the operating system utilities. If you create a new alternative, make sure the alternative is the directory pointed to by the /etc/kudu/conf/ symbolic link, and create custom configuration files there. Some parts of the configuration are configured in /etc/default/kudu-master and /etc/default/kudu-tserver files as well. You should include or duplicate these configuration options if you create custom configuration files.

    Review the configuration, including the default WAL and data directory locations, and adjust them according to your requirements.

  3. Start Kudu services using the following commands on the appropriate nodes:
    $ sudo service kudu-master start
    $ sudo service kudu-tserver start
  4. To stop Kudu services, use the following commands:
    $ sudo service kudu-master stop 
    $ sudo service kudu-tserver stop
  5. Configure the Kudu services to start automatically when the server starts, by adding them to the default runlevel.
    $ sudo chkconfig kudu-master on            # RHEL / CentOS 
    $ sudo chkconfig kudu-tserver on           # RHEL / CentOS 
    
    $ sudo update-rc.d kudu-master defaults    # Ubuntu 
    $ sudo update-rc.d kudu-tserver defaults   # Ubuntu

Next Steps

Read about Installing and Using Impala With Kudu.

For more information about using Kudu, go to the Kudu project page, where you can find official documentation, links to the Github repository and examples, and other resources.

For a reading list and other helpful links, refer to More Resources for Kudu.