1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# 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
|