|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# syntax: [instance].sink|source.[name].[options]=[value] |
| 19 | + |
| 20 | +# This file configures Spark's internal metrics system. The metrics system is |
| 21 | +# divided into instances which correspond to internal components. |
| 22 | +# Each instance can be configured to report its metrics to one or more sinks. |
| 23 | +# Accepted values for [instance] are "master", "worker", "executor", "driver", |
| 24 | +# and "applications". A wildcard "*" can be used as an instance name, in |
| 25 | +# which case all instances will inherit the supplied property. |
| 26 | +# |
| 27 | +# Within an instance, a "source" specifies a particular set of grouped metrics. |
| 28 | +# there are two kinds of sources: |
| 29 | +# 1. Spark internal sources, like MasterSource, WorkerSource, etc, which will |
| 30 | +# collect a Spark component's internal state. Each instance is paired with a |
| 31 | +# Spark source that is added automatically. |
| 32 | +# 2. Common sources, like JvmSource, which will collect low level state. |
| 33 | +# These can be added through configuration options and are then loaded |
| 34 | +# using reflection. |
| 35 | +# |
| 36 | +# A "sink" specifies where metrics are delivered to. Each instance can be |
| 37 | +# assigned one or more sinks. |
| 38 | +# |
| 39 | +# The sink|source field specifies whether the property relates to a sink or |
| 40 | +# source. |
| 41 | +# |
| 42 | +# The [name] field specifies the name of source or sink. |
| 43 | +# |
| 44 | +# The [options] field is the specific property of this source or sink. The |
| 45 | +# source or sink is responsible for parsing this property. |
| 46 | +# |
| 47 | +# Notes: |
| 48 | +# 1. To add a new sink, set the "class" option to a fully qualified class |
| 49 | +# name (see examples below). |
| 50 | +# 2. Some sinks involve a polling period. The minimum allowed polling period |
| 51 | +# is 1 second. |
| 52 | +# 3. Wildcard properties can be overridden by more specific properties. |
| 53 | +# For example, master.sink.console.period takes precedence over |
| 54 | +# *.sink.console.period. |
| 55 | +# 4. A metrics specific configuration |
| 56 | +# "spark.metrics.conf=${SPARK_HOME}/conf/metrics.properties" should be |
| 57 | +# added to Java properties using -Dspark.metrics.conf=xxx if you want to |
| 58 | +# customize metrics system. You can also put the file in ${SPARK_HOME}/conf |
| 59 | +# and it will be loaded automatically. |
| 60 | +# 5. The MetricsServlet sink is added by default as a sink in the master, |
| 61 | +# worker and driver, and you can send HTTP requests to the "/metrics/json" |
| 62 | +# endpoint to get a snapshot of all the registered metrics in JSON format. |
| 63 | +# For master, requests to the "/metrics/master/json" and |
| 64 | +# "/metrics/applications/json" endpoints can be sent separately to get |
| 65 | +# metrics snapshots of the master instance and applications. This |
| 66 | +# MetricsServlet does not have to be configured. |
| 67 | + |
| 68 | +## List of available common sources and their properties. |
| 69 | + |
| 70 | +# org.apache.spark.metrics.source.JvmSource |
| 71 | +# Note: Currently, JvmSource is the only available common source. |
| 72 | +# It can be added to an instance by setting the "class" option to its |
| 73 | +# fully qualified class name (see examples below). |
| 74 | + |
| 75 | +## List of available sinks and their properties. |
| 76 | + |
| 77 | +# org.apache.spark.metrics.sink.ConsoleSink |
| 78 | +# Name: Default: Description: |
| 79 | +# period 10 Poll period |
| 80 | +# unit seconds Unit of the poll period |
| 81 | + |
| 82 | +# org.apache.spark.metrics.sink.CSVSink |
| 83 | +# Name: Default: Description: |
| 84 | +# period 10 Poll period |
| 85 | +# unit seconds Unit of the poll period |
| 86 | +# directory /tmp Where to store CSV files |
| 87 | + |
| 88 | +# org.apache.spark.metrics.sink.GangliaSink |
| 89 | +# Name: Default: Description: |
| 90 | +# host NONE Hostname or multicast group of the Ganglia server, |
| 91 | +# must be set |
| 92 | +# port NONE Port of the Ganglia server(s), must be set |
| 93 | +# period 10 Poll period |
| 94 | +# unit seconds Unit of the poll period |
| 95 | +# ttl 1 TTL of messages sent by Ganglia |
| 96 | +# dmax 0 Lifetime in seconds of metrics (0 never expired) |
| 97 | +# mode multicast Ganglia network mode ('unicast' or 'multicast') |
| 98 | + |
| 99 | +# org.apache.spark.metrics.sink.JmxSink |
| 100 | + |
| 101 | +# org.apache.spark.metrics.sink.MetricsServlet |
| 102 | +# Name: Default: Description: |
| 103 | +# path VARIES* Path prefix from the web server root |
| 104 | +# sample false Whether to show entire set of samples for histograms |
| 105 | +# ('false' or 'true') |
| 106 | +# |
| 107 | +# * Default path is /metrics/json for all instances except the master. The |
| 108 | +# master has two paths: |
| 109 | +# /metrics/applications/json # App information |
| 110 | +# /metrics/master/json # Master information |
| 111 | + |
| 112 | +# org.apache.spark.metrics.sink.GraphiteSink |
| 113 | +# Name: Default: Description: |
| 114 | +# host NONE Hostname of the Graphite server, must be set |
| 115 | +# port NONE Port of the Graphite server, must be set |
| 116 | +# period 10 Poll period |
| 117 | +# unit seconds Unit of the poll period |
| 118 | +# prefix EMPTY STRING Prefix to prepend to every metric's name |
| 119 | +# protocol tcp Protocol ("tcp" or "udp") to use |
| 120 | + |
| 121 | +# org.apache.spark.metrics.sink.StatsdSink |
| 122 | +# Name: Default: Description: |
| 123 | +# host 127.0.0.1 Hostname or IP of StatsD server |
| 124 | +# port 8125 Port of StatsD server |
| 125 | +# period 10 Poll period |
| 126 | +# unit seconds Units of poll period |
| 127 | +# prefix EMPTY STRING Prefix to prepend to metric name |
| 128 | + |
| 129 | +## Examples |
| 130 | +# Enable JmxSink for all instances by class name |
| 131 | +#*.sink.jmx.class=org.apache.spark.metrics.sink.JmxSink |
| 132 | + |
| 133 | +# Enable ConsoleSink for all instances by class name |
| 134 | +#*.sink.console.class=org.apache.spark.metrics.sink.ConsoleSink |
| 135 | + |
| 136 | +# Enable StatsdSink for all instances by class name |
| 137 | +#*.sink.statsd.class=org.apache.spark.metrics.sink.StatsdSink |
| 138 | +#*.sink.statsd.prefix=spark |
| 139 | + |
| 140 | +# Polling period for the ConsoleSink |
| 141 | +#*.sink.console.period=10 |
| 142 | +# Unit of the polling period for the ConsoleSink |
| 143 | +#*.sink.console.unit=seconds |
| 144 | + |
| 145 | +# Polling period for the ConsoleSink specific for the master instance |
| 146 | +#master.sink.console.period=15 |
| 147 | +# Unit of the polling period for the ConsoleSink specific for the master |
| 148 | +# instance |
| 149 | +#master.sink.console.unit=seconds |
| 150 | + |
| 151 | +# Enable CsvSink for all instances by class name |
| 152 | +#*.sink.csv.class=org.apache.spark.metrics.sink.CsvSink |
| 153 | + |
| 154 | +# Polling period for the CsvSink |
| 155 | +#*.sink.csv.period=1 |
| 156 | +# Unit of the polling period for the CsvSink |
| 157 | +#*.sink.csv.unit=minutes |
| 158 | + |
| 159 | +# Polling directory for CsvSink |
| 160 | +#*.sink.csv.directory=/tmp/ |
| 161 | + |
| 162 | +# Polling period for the CsvSink specific for the worker instance |
| 163 | +#worker.sink.csv.period=10 |
| 164 | +# Unit of the polling period for the CsvSink specific for the worker instance |
| 165 | +#worker.sink.csv.unit=minutes |
| 166 | + |
| 167 | +# Enable Slf4jSink for all instances by class name |
| 168 | +#*.sink.slf4j.class=org.apache.spark.metrics.sink.Slf4jSink |
| 169 | + |
| 170 | +# Polling period for the Slf4JSink |
| 171 | +#*.sink.slf4j.period=1 |
| 172 | +# Unit of the polling period for the Slf4jSink |
| 173 | +#*.sink.slf4j.unit=minutes |
| 174 | + |
| 175 | +# Enable JvmSource for instance master, worker, driver and executor |
| 176 | +#master.source.jvm.class=org.apache.spark.metrics.source.JvmSource |
| 177 | + |
| 178 | +#worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource |
| 179 | + |
| 180 | +#driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource |
| 181 | + |
| 182 | +#executor.source.jvm.class=org.apache.spark.metrics.source.JvmSource |
0 commit comments