Skip to content

Conversation

@erenavsarogullari
Copy link
Member

@erenavsarogullari erenavsarogullari commented Jun 19, 2020

What changes were proposed in this pull request?

This PR aims to add PrometheusServletSuite.

Why are the changes needed?

This improves the test coverage.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the newly added test suite.

@erenavsarogullari
Copy link
Member Author

cc @dongjoon-hyun

@erenavsarogullari erenavsarogullari changed the title [SPARK-32026][CORE]Support consistency on Prometheus driver and executor metrics format [SPARK-32026][CORE] Support consistency on Prometheus driver and executor metrics format Jun 19, 2020
@SparkQA
Copy link

SparkQA commented Jun 19, 2020

Test build #124244 has finished for PR 28865 at commit 7f31529.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution, @erenavsarogullari .

However, Prometheus Servlet is designed to be consistent with the existing Spark 2.4 JMX Sink + Prometheus JMX Exporter format. Also, inside Spark 3.0, the format will follow Spark 3.0 JMX Sink + Prometheus JMX Exporter style mostly. Could you compare your output result with JMX Sink + Prometheus Exporter result of Spark 3.0 first?

For the metric name, we know that's not proper Prometheus. So, we recommend to use spark.metrics.namespace and writeStream.queryName().

It's described in original JIRAs, but the following presentation slides for Spark+AI Summit 2020 will be helpful for you if you are interested in this area.

@erenavsarogullari
Copy link
Member Author

Hi @dongjoon-hyun,

Thanks for the review and details.

Prometheus format seems following JMX-Exporter and also introducing type attribute(e.g: type="gauges"). I think we would like to continue preserving the same format, right?

On the other hand, what about Unit Tests for PrometheusServlet in the light of this PR coverage? I think they can still be useful.

Jmx:

metrics_local_1592959391297_driver_BlockManager_memory_memUsed_MB_Value{instance="172.16.0.122:8088",job="mysparkapp"} 0

Prometheus:

metrics_local_1592960380968_driver_BlockManager_memory_memUsed_MB_Value{instance="172.16.0.122:4041",job="spark-driver",type="gauges"} 0

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Jun 27, 2020

No. Please test on Apache Spark 3.0.0. DropWizard 4 itself introduced type attribute(e.g: type="gauges") and PrometheusSevlet just follows that inevitably.

Prometheus format seems following JMX-Exporter and also introducing type attribute(e.g: type="gauges"). I think we would like to continue preserving the same format, right?

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's focus on adding a unit test, @erenavsarogullari . Also, please update JIRA and PR title~ Thank you for your contribution, @erenavsarogullari .

@erenavsarogullari erenavsarogullari changed the title [SPARK-32026][CORE] Support consistency on Prometheus driver and executor metrics format [SPARK-32026][TEST] Add PrometheusServlet Unit Test coverage Jun 29, 2020
@dongjoon-hyun
Copy link
Member

Retest this please

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32026][TEST] Add PrometheusServlet Unit Test coverage [SPARK-32026][TEST] Add PrometheusServletSuite Jun 30, 2020
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32026][TEST] Add PrometheusServletSuite [SPARK-32026][CORE][TEST] Add PrometheusServletSuite Jun 30, 2020
@dongjoon-hyun
Copy link
Member

Also, please update the PR description consistently together. Thanks!

@dongjoon-hyun
Copy link
Member

Retest this please.

@erenavsarogullari
Copy link
Member Author

erenavsarogullari commented Jun 30, 2020

Thanks @dongjoon-hyun for the review. All comments are addressed. I think it is ready to go.
Also, we plan to use Prometheus + Grafana with proposed format change (through custom release). It may still be useful for the long-term if we plan to revisit the current format in the future.

@SparkQA
Copy link

SparkQA commented Jun 30, 2020

Test build #124665 has finished for PR 28865 at commit 5491ffb.

  • This patch fails to generate documentation.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Sure, you can do that in the custom release.

Also, we plan to use Prometheus + Grafana with proposed format change (through custom release).

@SparkQA
Copy link

SparkQA commented Jun 30, 2020

Test build #124689 has finished for PR 28865 at commit 6dd5837.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@erenavsarogullari
Copy link
Member Author

Retest this please

@SparkQA
Copy link

SparkQA commented Jun 30, 2020

Test build #124698 has finished for PR 28865 at commit 6dd5837.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@erenavsarogullari
Copy link
Member Author

Retest this please

@SparkQA
Copy link

SparkQA commented Jul 1, 2020

Test build #124802 has finished for PR 28865 at commit 6dd5837.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@erenavsarogullari
Copy link
Member Author

Failure seems irrelevant

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-cli) on project spark-parent_2.12: ArtifactInstallerException: Failed to install metadata org.apache.spark:spark-parent_2.12/maven-metadata.xml: Could not parse metadata /home/jenkins/.m2/repository/org/apache/spark/spark-parent_2.12/maven-metadata-local.xml: in epilog non whitespace content is not allowed but got t (position: END_TAG seen ...</metadata>\nt... @26:2) -> [Help 1]

@dongjoon-hyun
Copy link
Member

Ya. I'll test it manually, @erenavsarogullari . Thanks for updating.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @erenavsarogullari .
I tested this new test suite locally. Merged to master branch for Apache Spark 3.1 on December 2020.

@erenavsarogullari
Copy link
Member Author

erenavsarogullari commented Jul 1, 2020

Thanks @dongjoon-hyun for follow-up and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants