Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.0.0
Description
Before the Change:
Users needed to import LOG_SCHEMA to read structured logs as a JSON data source:
import org.apache.spark.util.LogUtils.LOG_SCHEMA
val logDf = spark.read.schema(LOG_SCHEMA).json("path/to/logs")
After the Change:
- No Import Needed in REPL Shells: You can now use SPARK_LOG_SCHEMA directly in REPL environments like spark-shell and pyspark without importing it.
- Renamed for Clarity: LOG_SCHEMA has been renamed to SPARK_LOG_SCHEMA to make its purpose more clear.
Now, you can read structured logs without the import:
val logDf = spark.read.schema(SPARK_LOG_SCHEMA).json("path/to/logs")
Attachments
Issue Links
- links to