查看Master列表
kudu master list --help
Usage:
/opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/bin/../lib/kudu/bin/kudu
master list <master_addresses> [-columns=<columns>] [-format=<format>]
[-timeout_ms=<ms>]
List masters in a Kudu cluster
master_addresses (Either comma-separated list of Kudu master addresses
where each address is of form 'hostname:port', or a cluster name if it
has been configured in ${KUDU_CONFIG}/kudurc) type: string default: ""
-columns (Comma-separated list of master info fields to include in output.
Possible values: uuid, rpc-addresses, http-addresses, version, seqno,
start_time and role) type: string default: "uuid,rpc-addresses,role"
-format (Format to use for printing list output tables.
Possible values: pretty, space, tsv, csv, and json) type: string
default: "pretty"
-timeout_ms (RPC timeout in milliseconds) type: int64 default: 60000
示例如下:
查看TServer列表
kudu tserver list --help
Usage:
/opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/bin/../lib/kudu/bin/kudu
tserver list <master_addresses> [-columns=<columns>]
[-format=<format>] [-timeout_ms=<ms>]
List tablet servers in a Kudu cluster
master_addresses (Either comma-separated list of Kudu master addresses
where each address is of form 'hostname:port', or a cluster name if it
has been configured in ${KUDU_CONFIG}/kudurc) type: string default: ""
-columns (Comma-separated list of tserver info fields to include in output.
Possible values: uuid, rpc-addresses, http-addresses, version, seqno,
heartbeat and start_time) type: string default: "uuid,rpc-addresses"
-format (Format to use for printing list output tables.
Possible values: pretty, space, tsv, csv, and json) type: string
default: "pretty"
-timeout_ms (RPC timeout in milliseconds) type: int64 default: 60000
示例如下:
查看集群健康状态
kudu cluster ksck --help
Usage:
/opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/bin/../lib/kudu/bin/kudu
cluster ksck <master_addresses> [-checksum_cache_blocks]
[-checksum_scan] [-checksum_scan_concurrency=<concurrency>]
[-nochecksum_snapshot] [-checksum_timeout_sec=<sec>] [-color=<color>]
[-noconsensus] [-fetch_info_concurrency=<concurrency>]
[-ksck_format=<format>] [-sections=<sections>] [-tables=<tables>]
[-tablets=<tablets>]
Check the health of a Kudu cluster
By default, ksck checks that master and tablet server processes are running,
and that table metadata is consistent. Use the 'checksum' flag to check that
tablet data is consistent (also see the 'tables' and 'tablets' flags). Use the
'checksum_snapshot' along with 'checksum' if the table or tablets are actively
receiving inserts or updates. Use the 'verbose' flag to output detailed
information on cluster status even if no inconsistency is found in metadata.
master_addresses (Either comma-separated list of Kudu master addresses
where each address is of form 'hostname:port', or a cluster name if it
has been configured in ${KUDU_CONFIG}/kudurc) type: string default: ""
-checksum_cache_blocks (Should the checksum scanners cache the read blocks)
type: bool default: false
-checksum_scan (Perform a checksum scan on data in the cluster.) type: bool
default: false
-checksum_scan_concurrency (Number of concurrent checksum scans to execute
per tablet server.) type: int32 default: 4
-checksum_snapshot (Should the checksum scanner use a snapshot scan?)
type: bool default: true
-checksum_timeout_sec (Maximum total seconds to wait for a checksum scan to
complete before timing out.) type: int32 default: 86400
-color (Specifies whether output should be colorized. The default value
'auto' colorizes output if the output is a terminal. The other valid
values are 'always' or 'never'.) type: string default: "auto"
-consensus (Whether to check the consensus state from each tablet against
the master.) type: bool default: true
-fetch_info_concurrency (Number of threads to fetch info concurrently.)
type: int32 default: 20
-ksck_format (Output format for ksck. Available options are
'plain_concise', 'plain_full', 'json_pretty', and 'json_compact'.
'plain_concise' format is plain text, omitting most information about
healthy tablets.
'plain_full' is plain text with all results included.
'json_pretty' produces pretty-printed json.
'json_compact' produces json suitable for parsing by other programs.
'json_pretty' and 'json_compact' differ in format, not content.)
type: string default: "plain_concise"
-sections (Sections to print (comma-separated list of sections, available
sections are: MASTER_SUMMARIES, TSERVER_SUMMARIES, VERSION_SUMMARIES,
TABLET_SUMMARIES, TABLE_SUMMARIES, CHECKSUM_RESULTS and TOTAL_COUNT.) If
not specified, print all sections.) type: string default: "*"
-tables (Tables to include (comma-separated list of table names)If not
specified, includes all tables.) type: string default: ""
-tablets (Tablets to check (comma-separated list of IDs) If not specified,
checks all tablets.) type: string default: ""
示例如下:
su kudu kudu cluster ksck xxxxxx
查看Table列表
kudu table list --help
Usage:
/opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/bin/../lib/kudu/bin/kudu
table list <master_addresses> [-tables=<tables>] [-list_tablets]
List tables
master_addresses (Either comma-separated list of Kudu master addresses
where each address is of form 'hostname:port', or a cluster name if it
has been configured in ${KUDU_CONFIG}/kudurc) type: string default: ""
-tables (Tables to include (comma-separated list of table names)If not
specified, includes all tables.) type: string default: ""
-list_tablets (Include tablet and replica UUIDs in the output) type: bool
default: false
示例如下:
kudu table list xxxxx
查看Table内容
kudu table describe --help
Usage:
/opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/bin/../lib/kudu/bin/kudu
table describe <master_addresses> <table_name> [-show_attributes]
Describe a table
master_addresses (Either comma-separated list of Kudu master addresses
where each address is of form 'hostname:port', or a cluster name if it
has been configured in ${KUDU_CONFIG}/kudurc) type: string default: ""
table_name (Name of the table to describe) type: string default: ""
-show_attributes (Whether to show column attributes, including column
encoding type, compression type, and default read/write value.)
type: bool default: false
示例如下:
kudu table describe master_ip table_name
检查集群Metrics
- 查看Master Server的Metrics
kudu master --dump_metrics_json
- 查看TServer的Metrics
kudu tserver --dump_metrics_json