Phoenix Tips (12) 跟踪 Tracing

只支持Hadoop2


配置 hadoop-metrics2-phoenix.properties


# Sample from all the sources every 10 seconds
*.period=10

# Write Traces to Phoenix
##########################
# ensure that we receive traces on the server
phoenix.sink.tracing.class=org.apache.phoenix.trace.PhoenixMetricsSink
# Tell the sink where to write the metrics
phoenix.sink.tracing.writer-class=org.apache.phoenix.trace.PhoenixTableMetricsWriter
# Only handle traces with a context of "tracing"
phoenix.sink.tracing.context=tracing

配置 hadoop-metrics2-hbase.properties


# ensure that we receive traces on the server
hbase.sink.tracing.class=org.apache.phoenix.trace.PhoenixMetricsSink
# Tell the sink where to write the metrics
hbase.sink.tracing.writer-class=org.apache.phoenix.trace.PhoenixTableMetricsWriter
# Only handle traces with a context of "tracing"
hbase.sink.tracing.context=tracing

配置 hbase-site.xml

<configuration>
  <property>
	<name>phoenix.trace.frequency</name>
    <value>always</value>
  </property>
</configuration>

  <property>
    <name>phoenix.trace.statsTableName</name>
    <value><your custom tracing table name></value>
  </property>

The tracing table is initialized via the ddl:

    CREATE TABLE SYSTEM.TRACING_STATS (
      trace_id BIGINT NOT NULL,
      parent_id BIGINT NOT NULL,
      span_id BIGINT NOT NULL,
      description VARCHAR,
      start_time BIGINT,
      end_time BIGINT,
      hostname VARCHAR,
      tags.count SMALLINT,
      annotations.count SMALLINT,
      CONSTRAINT pk PRIMARY KEY (trace_id, parent_id, span_id)





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值