Anthony Sgro created SPARK-49872:
------------------------------------
Summary: Spark History UI -- StreamConstraintsException: String
length (20054016) exceeds the maximum length (20000000)
Key: SPARK-49872
URL: https://issues.apache.org/jira/browse/SPARK-49872
Project: Spark
Issue Type: Bug
Components: UI
Affects Versions: 3.5.3
Reporter: Anthony Sgro
There is an issue with the Spark History UI with large amounts of event logs.
{code:java}
HTTP ERROR 500
com.fasterxml.jackson.core.exc.StreamConstraintsException: String length
(20054016) exceeds the maximum length (20000000)
URI:/history/application_1728009195451_0002/1/jobs/
STATUS:500
MESSAGE:com.fasterxml.jackson.core.exc.StreamConstraintsException: String
length (20054016) exceeds the maximum length (20000000)
SERVLET:org.apache.spark.deploy.history.HistoryServer$$anon$1-582a764a
CAUSED BY:com.fasterxml.jackson.core.exc.StreamConstraintsException: String
length (20054016) exceeds the maximum length (20000000) {code}
The root of this problem is the breaking change in jackson that (in the name of
"safety") introduced some JSON size limits, see:
[https://github.com/FasterXML/jackson-core/issues/1014]
Looks like {{JSONOptions}} in Spark already [support configuring this
limit|https://github.com/apache/spark/blob/c2dbb6d04bc9c781fb4a7673e5acf2c67b99c203/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala#L55-L58],
but there seems to be no way to set it globally.
Spark should be able to handle strings of arbitrary length. I have tried
configuring rolling event logs, pruning event logs, etc. but this issue is not
fixed or causes so much data loss that the spark history ui is completely
useless.
Perhaps a solution could be to add a config like:
{code:java}
spark.history.server.jsonStreamReadConstraints.maxStringLength=<new_value>
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]