Skip to content

Conversation

@ianlcsd
Copy link

@ianlcsd ianlcsd commented Jul 1, 2017

This is a backport of apache#14270. Because the spark.internal.config system
does not exists in branch 1.6, a simpler substitution scheme for ${} in
the spark.metrics.namespace value, using only Spark configuration had to
be added to preserve the behaviour discussed in the tickets and tested.

This backport is contributed by Criteo SA under the Apache v2 licence.

Adding a new property to SparkConf called spark.metrics.namespace that allows users to
set a custom namespace for executor and driver metrics in the metrics systems.

By default, the root namespace used for driver or executor metrics is
the value of spark.app.id. However, often times, users want to be able to track the metrics
across apps for driver and executor metrics, which is hard to do with application ID
(i.e. spark.app.id) since it changes with every invocation of the app. For such use cases,
users can set the spark.metrics.namespace property to any given value
or to another spark configuration key reference like ${spark.app.name}
which is then used to populate the root namespace of the metrics system
(with the app name in our example). spark.metrics.namespace property can be set to any
arbitrary spark property key, whose value would be used to set the root namespace of the
metrics system. Non driver and executor metrics are never prefixed with spark.app.id, nor
does the spark.metrics.namespace property have any such affect on such metrics.

Added new unit tests, modified existing unit tests.

…use of app ID to namespace all metrics

This is a backport of apache#14270. Because the spark.internal.config system
does not exists in branch 1.6, a simpler substitution scheme for ${} in
the spark.metrics.namespace value, using only Spark configuration had to
be added to preserve the behaviour discussed in the tickets and tested.

This backport is contributed by Criteo SA under the Apache v2 licence.

Adding a new property to SparkConf called spark.metrics.namespace that allows users to
set a custom namespace for executor and driver metrics in the metrics systems.

By default, the root namespace used for driver or executor metrics is
the value of `spark.app.id`. However, often times, users want to be able to track the metrics
across apps for driver and executor metrics, which is hard to do with application ID
(i.e. `spark.app.id`) since it changes with every invocation of the app. For such use cases,
users can set the `spark.metrics.namespace` property to any given value
or to another spark configuration key reference like `${spark.app.name}`
which is then used to populate the root namespace of the metrics system
(with the app name in our example). `spark.metrics.namespace` property can be set to any
arbitrary spark property key, whose value would be used to set the root namespace of the
metrics system. Non driver and executor metrics are never prefixed with `spark.app.id`, nor
does the `spark.metrics.namespace` property have any such affect on such metrics.

Added new unit tests, modified existing unit tests.
@ianlcsd ianlcsd requested a review from markhamstra July 1, 2017 06:09
@ianlcsd
Copy link
Author

ianlcsd commented Jul 1, 2017

I think the back port is only able to get the driver metrics collected under the name space. but failed to get executors to do the same.

I think we definitely need to review it under spark 2.1

@ianlcsd ianlcsd closed this Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant