Commit bbf31e7
committed
[SPARK-53985] Suppress
### What changes were proposed in this pull request?
This PR aims to suppress `StatusRecorder` warning messages.
### Why are the changes needed?
Currently, `StatusRecorder` shows `WARN` messages too verbosely at most `spark.kubernetes.operator.api.statusPatchMaxAttempts` times. Then, it will show `ERROR` message at the end.
```
25/10/22 17:17:32 WARN test-00672 default o.a.s.k.o.u.StatusRecorder Error while patching status, retrying 2/3...
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: https://xxx:443/apis/spark.apache.org/v1/namespaces/default/sparkapplications/test-00672/status. Message: Operation cannot be fulfilled on sparkapplications.spark.apache.org "test-00672": the object has been modified; please apply your changes to the latest version and try again. Received status: Status(apiVersion=v1, code=409, details=StatusDetails(causes=[], group=spark.apache.org, kind=sparkapplications, name=test-00672, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Operation cannot be fulfilled on sparkapplications.spark.apache.org "test-00672": the object has been modified; please apply your changes to the latest version and try again, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Conflict, status=Failure, additionalProperties={}).
at io.fabric8.kubernetes.client.KubernetesClientException.copyAsCause(KubernetesClientException.java:205)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:507)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:524)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleUpdate(OperationSupport.java:358)
at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleUpdate(BaseOperation.java:759)
at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.update(HasMetadataOperation.java:138)
at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.update(HasMetadataOperation.java:121)
at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.updateStatus(HasMetadataOperation.java:126)
at io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation.updateStatus(HasMetadataOperation.java:44)
at org.apache.spark.k8s.operator.utils.StatusRecorder.patchAndStatusWithVersionLocked(StatusRecorder.java:101)
```
We can switch `WARN` to `DEBUG` during retrying `spark.kubernetes.operator.api.statusPatchMaxAttempts` times because it's recoverable.
### Does this PR introduce _any_ user-facing change?
No. This is a log message change.
### How was this patch tested?
Manual review.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #397 from dongjoon-hyun/SPARK-53985.
Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>StatusRecorder warning messages1 parent 3d56b45 commit bbf31e7
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments