Migration Guide: Spark Core
Upgrading from Core 2.4 to 3.0
-
The
org.apache.spark.ExecutorPlugin
interface and related configuration has been replaced withorg.apache.spark.api.plugin.SparkPlugin
, which adds new functionality. Plugins using the old interface must be modified to extend the new interfaces. Check the Monitoring guide for more details. -
Deprecated method
TaskContext.isRunningLocally
has been removed. Local execution was removed and it always has returnedfalse
. -
Deprecated method
shuffleBytesWritten
,shuffleWriteTime
andshuffleRecordsWritten
inShuffleWriteMetrics
have been removed. Instead, usebytesWritten
,writeTime
andrecordsWritten
respectively. -
Deprecated method
AccumulableInfo.apply
have been removed because creatingAccumulableInfo
is disallowed. -
Deprecated accumulator v1 APIs have been removed and please use v2 APIs instead.
-
Event log file will be written as UTF-8 encoding, and Spark History Server will replay event log files as UTF-8 encoding. Previously Spark wrote the event log file as default charset of driver JVM process, so Spark History Server of Spark 2.x is needed to read the old event log files in case of incompatible encoding.
-
A new protocol for fetching shuffle blocks is used. It’s recommended that external shuffle services be upgraded when running Spark 3.0 apps. You can still use old external shuffle services by setting the configuration
spark.shuffle.useOldFetchProtocol
totrue
. Otherwise, Spark may run into errors with messages likeIllegalArgumentException: Unexpected message type: <number>
. -
SPARK_WORKER_INSTANCES
is deprecated in Standalone mode. It’s recommended to launch multiple executors in one worker and launch one worker per node instead of launching multiple workers per node and launching one executor per worker.