blob: 4a5794d333ef672ada8da8350f465c694f61d748 [file] [log] [blame]
# Metrics properties for phoenix
####################################
#
#There are two options with file names:
# 1. hadoop-metrics2-[prefix].properties
# 2. hadoop-metrics2.properties
# Either will be loaded by the metrics system (but not both).
#
# NOTE: The metrics system is only initialized once per JVM (but does ref-counting, so we can't
#shutdown and restart), so we only load the first prefix that we find. Generally, this will be
#phoenix (unless someone else registers first, but for many clients, there should only be one).
#
# Usually, you would use hadoop-metrics2-phoenix.properties, but we use the generic
# hadoop-metrics2.properties to ensure it these are loaded regardless of where we are running,
# assuming there isn't another config on the classpath.
# When specifying sinks, the syntax to use is:
# [prefix].[source|sink].[instance].[options]
# The interesting thing to note is that [instance] can literally be anything (as long as its
# not zero-length). It is only there to differentiate the properties that are stored for
# objects of the same type (e.g. differentiating between two phoenix.sink objects).
#
#You could the following lines in your config
#
# phoenix.sink.thingA.class=com.your-company.SpecialSink
# phoenix.sink.thingA.option1=value1
#
# and also
#
# phoenix.sink.thingB.class=org.apache.phoenix.trace.PhoenixMetricsSink
# phoenix.sink.thingB.doGoodStuff=true
#
# which will create both SpecialSink and PhoenixMetricsSink and register them
# as a MetricsSink, but Special sink will only see option1=value1 in its
# configuration, which similarly, the instantiated PhoenixMetricsSink will
# only see doGoodStuff=true in its configuration
#
# See javadoc of package-info.java for org.apache.hadoop.metrics2 for detail
# Uncomment to NOT start MBeans
# *.source.start_mbeans=false
# 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