blob: 78705c253df3b14dac5893b3ccb4092b3ba93dad [file] [log] [blame]
# 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.
# The "org.apache.beam.runners.spark.metrics.sink.XSink"
# (a.k.a Beam.XSink) is only configured for the driver, the executors are set with a Spark native
# implementation "org.apache.spark.metrics.sink.XSink" (a.k.a Spark.XSink).
# This is due to sink class loading behavior, which is different on the driver and executors nodes.
# Since Beam aggregators and metrics are reported via Spark accumulators and thus make their way to
# the # driver, we only need the "Beam.XSink" on the driver side. Executor nodes can keep
# reporting Spark native metrics using the traditional Spark.XSink.
#
# The current sink configuration pattern is therefore:
#
# driver.**.class = Beam.XSink
# executor.**.class = Spark.XSink
# ************* A metrics sink for tests *************
*.sink.memory.class=org.apache.beam.runners.spark.aggregators.metrics.sink.InMemoryMetrics
# ************* End of InMemoryMetrics sink configuration section *************
# ************* A sample configuration for outputting metrics to Graphite *************
#driver.sink.graphite.class=org.apache.beam.runners.spark.metrics.sink.GraphiteSink
#driver.sink.graphite.host=YOUR_HOST
#driver.sink.graphite.port=2003
#driver.sink.graphite.prefix=spark
#driver.sink.graphite.period=1
#driver.sink.graphite.unit=SECONDS
#executor.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSink
#executor.sink.graphite.host=YOUR_HOST
#executor.sink.graphite.port=2003
#executor.sink.graphite.prefix=spark
#executor.sink.graphite.period=1
#executor.sink.graphite.unit=SECONDS
# ************* End of Graphite sik configuration section *************
# ************* A sample configuration for outputting metrics to a CSV file. *************
#driver.sink.csv.class=org.apache.beam.runners.spark.metrics.sink.CsvSink
#driver.sink.csv.directory=/tmp/spark-metrics
#driver.sink.csv.period=1
#driver.sink.graphite.unit=SECONDS
#executor.sink.csv.class=org.apache.spark.metrics.sink.CsvSink
#executor.sink.csv.directory=/tmp/spark-metrics
#executor.sink.csv.period=1
#executor.sink.graphite.unit=SECONDS
# ************* End of CSV sink configuration section *************