Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented May 17, 2025

What changes were proposed in this pull request?

This PR aims to revisit PMD annotations.

Why are the changes needed?

We can remove or reduce the scope.

BEFORE

$ git grep PMD | wc -l
       5

AFTER

$ git grep PMD | wc -l
       3

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual review.

Was this patch authored or co-authored using generative AI tooling?

No.

import org.apache.spark.metrics.sink.Sink;

@SuppressWarnings("PMD")
@SuppressWarnings("PMD.UnusedPrivateField")
Copy link
Member Author

Choose a reason for hiding this comment

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

There is only one warning in this file.


@EnableKubernetesMockClient(crud = true)
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@SuppressWarnings("PMD")
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need this.

import org.apache.spark.k8s.operator.utils.SparkAppStatusRecorder;

@EnableKubernetesMockClient(crud = true)
@SuppressWarnings("PMD")
Copy link
Member Author

@dongjoon-hyun dongjoon-hyun May 17, 2025

Choose a reason for hiding this comment

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

This file is added newly, but we don't need this.

import org.apache.spark.k8s.operator.metrics.healthcheck.SentinelManager;

@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
@SuppressWarnings("PMD.UnitTestShouldIncludeAssert")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is renamed at PMD 7.

import org.apache.spark.k8s.operator.utils.ProbeUtil;

@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
@SuppressWarnings("PMD.UnitTestShouldIncludeAssert")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is renamed at PMD 7.

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya . Merged to main.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-52201 branch May 17, 2025 03:47
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.

2 participants