欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

Phoenix Tips (12) 跟踪 Tracing

发布时间:2025/7/14 编程问答 61 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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)





转载于:https://www.cnblogs.com/leeeee/p/7276363.html

总结

以上是生活随笔为你收集整理的Phoenix Tips (12) 跟踪 Tracing的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。