-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-53158][WEBUI] Missing metricsProperties in KV Store should be handled correctly #51887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks for the bug fix. Looks like Note that Apache Spark does not support 3.4 anymore - so changes specifically to make master work with older/unsupported versions (and their event files), unless it is an ongoing issue, is unlikely to get merged. +CC @dongjoon-hyun , @LuciferYang as well for thoughts. |
@mridulm Current master is compatible (w.r.t metricsProperties) with older versions of Spark since the KVStore DB is generated correctly. However, current master is incompatible with KVStore's generated with older versions of Spark. This can be an issue, if a user decides to upgrade their Spark version but does not purge the SHS local store directory. |
…uld default to Nil ### What changes were proposed in this pull request? When environment property maps (e.g. metricsProperties) are null — often due to LevelDBs created by Spark versions that did not have the property, the Utils.redact(...) function throws a NullPointerException during .map or .toArray operations. ### Why are the changes needed? Without this change, the rest API response of /environment throws a 500 due to the server NullPointerException. The NullPointerException is the following : ``` Caused by: java.lang.NullPointerException: Cannot invoke "scala.collection.Seq.map(scala.Function1, scala.collection.generic.CanBuildFrom)" because "kvs" is null at org.apache.spark.util.Utils$.redact(Utils.scala:2923) at org.apache.spark.util.Utils$.redact(Utils.scala:2878) at org.apache.spark.status.api.v1.AbstractApplicationResource.$anonfun$environmentInfo$1(OneApplicationResource.scala:114) ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Tested this change on a local instance of SHS ### Was this patch authored or co-authored using generative AI tooling? No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test to validate this works ?
As in, json record without the field - and yet gets deserialized with Nil
and not null
for ApplicationEnvironmentInfo
?
[SPARK-53158][WEBUI] Missing metricsProperties in KV Store should be handled correctly
What changes were proposed in this pull request?
When environment property maps (e.g.
metricsProperties
) are null — often due to LevelDBs created by Spark versions that did not have the property, theUtils.redact(...)
function throws aNullPointerException
during.map
or.toArray
operations.Why are the changes needed?
Without this change, the rest API response of
/environment
throws a 500 due to the serverNullPointerException
. TheNullPointerException
is the following :Does this PR introduce any user-facing change?
No
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
No