Uh oh!
There was an error while loading. Please reload this page.
[SPARK-39958][SQL] Add warning log when unable to load custom metric object - #37386
[SPARK-39958][SQL] Add warning log when unable to load custom metric object#37386viirya wants to merge 2 commits into
Conversation
viirya
commented
Aug 3, 2022
pan3793
commented
Aug 3, 2022
Previous discussion: #31451 (comment) I think we don't need to construct the instance using reflection, how about removing constructor checks? |
cloud-fan
commented
Aug 3, 2022
Then how can we construct the instance? |
viirya
commented
Aug 3, 2022
Just about to ask same question. |
pan3793
commented
Aug 3, 2022
Oh, I see. Previous I misunderstand that instances constructed by Could you please enhance the comment of |
viirya
commented
Aug 3, 2022
Okay. |
| case NonFatal(e) => | ||
| logWarning(s"Unable to load custom metric object for class `$className`. " + | ||
| "Please make sure that the custom metric class is in the classpath and " + | ||
| "it has 0-arg constructor", e) |
There was a problem hiding this comment.
nit. . at the end of the sentence?
| case NonFatal(e) => | ||
| logWarning(s"Unable to load custom metric object for class `$className`. " + | ||
| "Please make sure that the custom metric class is in the classpath and " + | ||
| "it has 0-arg constructor.", e) |
There was a problem hiding this comment.
Utils#loadExtensions also allows "single-argument constructor that accepts SparkConf", do we need to mention that?
There was a problem hiding this comment.
I don't think we should. Actually we don't need the implementing class to implement it.
viirya
commented
Aug 3, 2022
The known and unrelated sparkr failure: Unrelated Python linter: |
viirya
commented
Aug 3, 2022
Merged, thanks! |
What changes were proposed in this pull request?
Currently when
SQLAppStatusListenercannot load custom metric object, it silently ignores the error. We better provide a warning log for users.Why are the changes needed?
Improving user experience.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests