zhztheplayer commented on code in PR #6855:
URL: https://github.com/apache/incubator-gluten/pull/6855#discussion_r1718043910


##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala:
##########
@@ -191,4 +137,42 @@ class VeloxListenerApi extends ListenerApi {
   }
 }
 
-object VeloxListenerApi {}
+object VeloxListenerApi {
+  // See org.apache.spark.SparkMasterRegex
+  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 = {

Review Comment:
   Super helpful. Thanks.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to