This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 1a4844b [SPARK-55543] Change `SentinelManager.getSentinelResources`
to `package private`
1a4844b is described below
commit 1a4844bb742644edb7a5c5ef695c10ffd4da9baf
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Sun Feb 15 21:15:01 2026 -0800
[SPARK-55543] Change `SentinelManager.getSentinelResources` to `package
private`
### What changes were proposed in this pull request?
This PR aims to change `SentinelManager.getSentinelResources` to `package
private` from `public`.
### Why are the changes needed?
This was designed to be `public` and marked as `VisibleForTesting`.
However, `SentinelManagerTest` can test it as `package private`. So, we don't
need to expose this as a `public` method.
### Does this PR introduce _any_ user-facing change?
No. This is supposed to be used internally by `Apache Spark K8s Operator`.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: `Gemini 3 Pro (High)` on `Antigravity`
Closes #502 from dongjoon-hyun/SPARK-55543.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../spark/k8s/operator/metrics/healthcheck/SentinelManager.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/healthcheck/SentinelManager.java
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/healthcheck/SentinelManager.java
index 8254fd2..d161beb 100644
---
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/healthcheck/SentinelManager.java
+++
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/healthcheck/SentinelManager.java
@@ -27,7 +27,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-import com.google.common.annotations.VisibleForTesting;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.processing.event.ResourceID;
@@ -254,8 +253,7 @@ public class SentinelManager<CR extends BaseResource<?, ?,
?, ?, ?>> {
*
* @return A ConcurrentHashMap of ResourceID to SentinelResourceState.
*/
- @VisibleForTesting
- public ConcurrentHashMap<ResourceID, SentinelResourceState>
getSentinelResources() {
+ ConcurrentHashMap<ResourceID, SentinelResourceState> getSentinelResources() {
return sentinelResources;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]