HyukjinKwon commented on a change in pull request #30713:
URL: https://github.com/apache/spark/pull/30713#discussion_r543208997
##########
File path: docs/monitoring.md
##########
@@ -1038,6 +1038,22 @@ This example shows a list of Spark configuration
parameters for a Graphite sink:
"spark.metrics.conf.*.sink.graphite.prefix"="optional_prefix"
"spark.metrics.conf.*.sink.graphite.regex"="optional_regex_to_send_matching_metrics"
```
+Also it could be done under spark session like:
+```
+import org.apache.spark.sql.SparkSession
+
+val spark = SparkSession.builder
+ .master(sparkconfig.getString("MASTER_URL"))
+
.config("spark.metrics.conf.*.sink.graphite.class","org.apache.spark.metrics.sink.GraphiteSink")
+
.config("spark.metrics.conf.*.sink.graphite.host","graphiteEndPoint_hostName>")
+
.config("spark.metrics.conf.*.sink.graphite.port",<graphite_listening_port>)
+ .config("spark.metrics.conf.*.sink.graphite.period",10)
+ .config("spark.metrics.conf.*.sink.graphite.unit","seconds")
+
.config("spark.metrics.conf.*.sink.graphite.prefix","optional_prefix")
+
.config("spark.metrics.conf.*.sink.graphite.regex","optional_regex_to_send_matching_metrics")
Review comment:
isn't this a copy paste of the configurations above? I don't think this
is very useful.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]