Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Aug 15, 2024
1 parent 7966d4b commit da800f8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ import java.util.concurrent.atomic.AtomicBoolean
class VeloxListenerApi extends ListenerApi with Logging {
import VeloxListenerApi._

// TODO: Implement graceful shutdown and remove these flags.
// As spark conf may change when active Spark session is recreated.
private val driverInitialized: AtomicBoolean = new AtomicBoolean(false)
private val executorInitialized: AtomicBoolean = new AtomicBoolean(false)

override def onDriverStart(sc: SparkContext, pc: PluginContext): Unit = {
if (!driverInitialized.compareAndSet(false, true)) {
// Make sure we call the static initializers only once.
Expand Down Expand Up @@ -147,6 +142,11 @@ object VeloxListenerApi {
private val LOCAL_N_REGEX = """local\[([0-9]+|\*)\]""".r
private val LOCAL_N_FAILURES_REGEX = """local\[([0-9]+|\*)\s*,\s*([0-9]+)\]""".r

// TODO: Implement graceful shutdown and remove these flags.
// As spark conf may change when active Spark session is recreated.
private val driverInitialized: AtomicBoolean = new AtomicBoolean(false)
private val executorInitialized: AtomicBoolean = new AtomicBoolean(false)

private def inLocalMode(conf: SparkConf): Boolean = {
val master = conf.get("spark.master")
master match {
Expand Down

0 comments on commit da800f8

Please sign in to comment.