zsxwing opened a new pull request #27680: [SPARK-30936][Core]Enable 
FAIL_ON_UNKNOWN_PROPERTIES by default to parse Spark events
URL: https://github.com/apache/spark/pull/27680
 
 
   ### What changes were proposed in this pull request?
   
   Enable `FAIL_ON_UNKNOWN_PROPERTIES` in `JsonProtocol` to allow ignore 
unknown fields in a Spark event. After this change, adding new fields to a 
Spark event parsed by `ObjectMapper` can still be read by an old Spark History 
Server.
   
   Since Spark History Server is an extra service, it usually takes time to 
upgrade, and it's possible that a Spark application is upgraded before SHS. 
Forwards-compatibility will allow to the old SHS to support newer Spark 
applications (may lose some new features but most of functions should still 
work). 
   
   ### Why are the changes needed?
   
   `JsonProtocol` is supposed to provide strong backwards-compatibility and 
forwards-compatibility guarantees: any version of Spark should be able to read 
JSON output written by any other version, including newer versions.
   
   However, the forwards-compatibility guarantee is broken for events parsed by 
`ObjectMapper`. If a new field is added to an event parsed by `ObjectMapper` 
(e.g., 
https://github.com/apache/spark/commit/6dc5921e66d56885b95c07e56e687f9f6c1eaca7#diff-dc5c7a41fbb7479cef48b67eb41ad254R33),
 this event cannot be parsed by an old version of SHS right now.
   
   ### Does this PR introduce any user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The new added tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to