From 291e460dce79cbe3c8d9f73a236c95ca27554ea9 Mon Sep 17 00:00:00 2001 From: Holden Karau Date: Fri, 17 Nov 2023 22:22:08 -0800 Subject: [PATCH] Fix import so we can get ArraySeq from scala.collection.immutable._ in Scala 2.13+ and collection.compat.immutable._ Scala 2.12- Fix imports magic Fix imports again Fix style --- .../src/main/scala/io/glutenproject/GlutenPlugin.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gluten-core/src/main/scala/io/glutenproject/GlutenPlugin.scala b/gluten-core/src/main/scala/io/glutenproject/GlutenPlugin.scala index 4c56ce3126b43..69e85ecb98e55 100644 --- a/gluten-core/src/main/scala/io/glutenproject/GlutenPlugin.scala +++ b/gluten-core/src/main/scala/io/glutenproject/GlutenPlugin.scala @@ -40,7 +40,9 @@ import org.apache.spark.util.{SparkResourceUtil, TaskResources} import java.util import java.util.{Collections, Objects} -import scala.collection.{immutable, mutable} +import scala.collection.compat._ +import scala.collection.compat.immutable.ArraySeq +import scala.collection.mutable import scala.language.implicitConversions class GlutenPlugin extends SparkPlugin { @@ -191,7 +193,7 @@ private[glutenproject] class GlutenDriverPlugin extends DriverPlugin with Loggin private[glutenproject] class GlutenExecutorPlugin extends ExecutorPlugin { private var executorEndpoint: GlutenExecutorEndpoint = _ private val taskListeners: Seq[TaskListener] = - (immutable.ArraySeq.unsafeWrapArray(Array(TaskResources))) + (ArraySeq.unsafeWrapArray(Array(TaskResources))) /** Initialize the executor plugin. */ override def init(ctx: PluginContext, extraConf: util.Map[String, String]): Unit = {