In an E-MapReduce (EMR) cluster, you can run Kudu-related commands to perform operations. This topic describes the common commands of Kudu.

Prerequisites

  • An EMR cluster is created, and Kudu is selected from the optional services when you create the cluster. For more information, see Create a cluster.
  • You have logged on to the cluster. For more information, see Log on to a cluster.

Background information

Limits

Kudu must be deployed in the cluster that you created.

kudu master list: queries master nodes

  • Syntax
    kudu master list <your_Intranet_IP>
    Note <your_Intranet_IP> specifies the internal IP address of a Kudu cluster. Separate multiple IP addresses with commas (,). Example: 192.168.10.59,192.168.10.60,192.168.10.61.
  • Example: Run the following command to query master nodes:
    kudu master list 192.168.10.59,192.168.10.60,192.168.10.61
    Information similar to the following output is returned:
                   uuid               |          rpc-addresses           |   role
    ----------------------------------+----------------------------------+----------
     3ebef6e84e0d45b2b6b5d24a2911**** | emr-header-1.cluster-23****:7051 | LEADER
     a4e0160acd804e8d83b4448183f6**** | emr-header-3.cluster-23****:7051 | FOLLOWER
     0d9fdf59efce48e58f18cf212c2c**** | emr-header-2.cluster-23****:7051 | FOLLOWER

kudu tserver list: queries tablet servers

  • Syntax
    kudu tserver list <your_Intranet_IP>
  • Example: Run the following command to query tablet servers:
    kudu tserver list 192.168.10.59,192.168.10.60,192.168.10.61
    Information similar to the following output is returned:
                   uuid               |          rpc-addresses
    ----------------------------------+----------------------------------
     be173a301ea24997a4a7a0f78815**** | emr-worker-2.cluster-23****:7050
     2a8257107d0048728707e783035e**** | emr-worker-1.cluster-23****:7050

kudu cluster ksck: checks the health of a cluster

  • Syntax
    kudu cluster ksck <your_Intranet_IP>
  • Example: Run the following command to check the health of your cluster:
    kudu cluster ksck 192.168.10.59,192.168.10.60,192.168.10.61
    Information similar to the following output is returned:
    Master Summary
                   UUID               |    Address    | Status
    ----------------------------------+---------------+---------
     0d9fdf59efce48e58f18cf212c2c**** | 192.168.10.60 | HEALTHY
     3ebef6e84e0d45b2b6b5d24a2911**** | 192.168.10.61 | HEALTHY
     a4e0160acd804e8d83b4448183f6**** | 192.168.10.59 | HEALTHY
    
                   Flag                | Value  |  Tags  |         Master
    -----------------------------------+--------+--------+-------------------------
     raft_get_node_instance_timeout_ms | 300000 | hidden | all 3 server(s) checked
    
    Tablet Server Summary
                   UUID               |             Address              | Status  | Location
    ----------------------------------+----------------------------------+---------+----------
     2a8257107d0048728707e783035e**** | emr-worker-1.cluster-234593:7050 | HEALTHY | <none>
     be173a301ea24997a4a7a0f78815**** | emr-worker-2.cluster-234593:7050 | HEALTHY | <none>
    
    Tablet Server Location Summary
     Location |  Count
    ----------+---------
     <none>   |       2
    
                   Flag                | Value  |  Tags  |      Tablet Server
    -----------------------------------+--------+--------+-------------------------
     raft_get_node_instance_timeout_ms | 300000 | hidden | all 2 server(s) checked
    
    Version Summary
     Version |         Servers
    ---------+-------------------------
     1.10.0  | all 5 server(s) checked
    
    The cluster doesn't have any matching tablets
    
    The cluster doesn't have any matching tables
    Tablet Replica Count Summary
       Statistic    | Replica Count
    ----------------+---------------
     Minimum        | 0
     First Quartile | 0
     Median         | 0
     Third Quartile | 0
     Maximum        | 0
    
    
    ==================
    Warnings:
    ==================
    Some masters have unsafe, experimental, or hidden flags set
    Some tablet servers have unsafe, experimental, or hidden flags set
    
    OK

kudu table list: queries all tables

  • Syntax
    kudu table list <your_Intranet_IP>
  • Example: Run the following command to query all tables:
    kudu table list 192.168.10.59,192.168.10.60,192.168.10.61
    Information similar to the following output is returned:
    impala::default.my_first_table

kudu table describe: describes a table

  • Syntax
    kudu table describe <your_Intranet_IP> <your_tablename>
    Note <your_tablename> specifies the name of a table. You can run the kudu table list command to obtain the name of the table whose content you want to describe. For more information about the kudu table list command, see kudu table list: queries all tables. Example: impala::default.my_first_table.
  • Example: Run the following command to describe a table:
    kudu table describe 192.168.10.59,192.168.10.60,192.168.10.61 impala::default.my_first_table
    Information similar to the following output is returned:
    ABLE impala::default.my_first_table (
        id INT64 NOT NULL,
        name STRING NULLABLE,
        PRIMARY KEY (id)
    )
    HASH (id) PARTITIONS 16
    REPLICAS 1

kudu-tserver --dump_metrics_json and kudu-master --dump_metrics_json: check the metrics of a Kudu cluster

  • Check the metrics of tablet servers
    kudu-tserver --dump_metrics_json
  • Check the metrics of master servers
    kudu-master --dump_metrics_json