Using a Kudu Client
Kudu is a columnar storage manager developed for the Apache Hadoop platform. Kudu shares the common technical properties of Hadoop ecosystem applications. It is horizontally scalable and supports highly available operations.
Prerequisites
The cluster client has been installed. For example, the client is installed in the /opt/hadoopclient directory. The client directory in the following operations is only an example. Change it to the actual installation directory.
Procedure
- Log in to the node where the client is installed as the client installation user.
Run the su - omm command to switch to user omm.
- Run the following command to go to the client installation directory:
cd /opt/hadoopclient
- Run the following command to configure environment variables:
source bigdata_env
- Run the Kudu command line tool.
Run the command line tool of the Kudu component to view help information.
kudu -h
The command output is as follows:
Usage: kudu <command> [<args>]<command> can be one of the following:cluster Operate on a Kudu clusterdiagnose Diagnostic tools for Kudu servers and clustersfs Operate on a local Kudu filesystemhms Operate on remote Hive Metastoreslocal_replica Operate on local tablet replicas via the local filesystemmaster Operate on a Kudu Masterpbc Operate on PBC (protobuf container) filesperf Measure the performance of a Kudu clusterremote_replica Operate on remote tablet replicas on a Kudu Tablet Servertable Operate on Kudu tablestablet Operate on remote Kudu tabletstest Various test actionstserver Operate on a Kudu Tablet Serverwal Operate on WAL (write-ahead log) filesNoteThe Kudu command line tool does not support DDL and DML operations, but provides the refined query function for the cluster, master, tserver, fs, and table parameters.
Common operations:
- Check the tables in the current cluster.
kudu table list KuduMaster instance IP1:7051, KuduMaster instance IP2:7051, KuduMaster instance IP3:7051
- Query the configurations of the KuduMaster instance of the Kudu service.
kudu master get_flags KuduMaster instance IP:7051
- Query the schema of a table.
kudu table describe KuduMaster instance IP1:7051, KuduMaster instance IP2:7051, KuduMaster instance IP3:7051 Table name
- Delete a table.
kudu table delete KuduMaster instance IP1:7051, KuduMaster instance IP2:7051, KuduMaster instance IP3:7051 Table name
NoteTo obtain the IP address of the KuduMaster instance, choose Components > Kudu > Instances on the cluster details page.
- Check the tables in the current cluster.
- Prerequisites
- Procedure