trace

Definition

Starts/stops/checks tracing via HTrace. The kind of operation is defined by the first argument. Returns true if tracing is running, otherwise returns false.

Usage

trace '<trace_type>'[, '<trace_span_name>']
Arguments
Parameter Description

trace_type

Possible values:

  • start — starts tracing. Returns true in the case of success.

  • stop — stops the current running tracing span. Returns false in the case of success.

  • status — shows whether or not tracing is running.

trace_span_name

An optional name for a new tracing span, which can be defined when starting tracing. The default name is HBaseShell

Examples

Start tracing

hbase(main):006:0> trace 'status'
Took 0.0004 seconds
=> false
hbase(main):007:0> trace 'start'
Took 0.1438 seconds
=> true
hbase(main):008:0> trace 'status'
Took 0.0002 seconds
=> true

Stop tracing

hbase(main):009:0> trace 'stop'
Took 0.0003 seconds
=> false
hbase(main):010:0> trace 'status'
Took 0.0001 seconds
=> false

Using a span name

hbase(main):024:0> trace 'start', 'my'
Took 0.0003 seconds
=> true
hbase(main):025:0> trace 'status', 'my'
Took 0.0002 seconds
=> true
hbase(main):026:0> trace 'stop', 'my'
Took 0.0002 seconds
=> false
hbase(main):027:0> trace 'status', 'my'
Took 0.0002 seconds
=> false
Found a mistake? Seleсt text and press Ctrl+Enter to report it