qianlan717 commented on code in PR #59196:
URL: https://github.com/apache/spark/pull/59196#discussion_r4235875528


##########
common/utils/src/main/scala/org/apache/spark/util/MavenUtils.scala:
##########
@@ -62,32 +65,126 @@ private[spark] object MavenUtils extends Logging {
     }
   }
 
-  private def acquireIvyLock(isCancelled: () => Boolean): Unit = {
-    def checkCancelled(): Unit = {
-      if (isCancelled() || Thread.currentThread().isInterrupted) {
-        throw new CancellationException("Maven dependency resolution was 
cancelled")
+  private class IvyResolutionCancellation {
+    private val requested = new AtomicBoolean(false)
+    private val httpHandler = new AtomicReference[HttpClientHandler]()
+
+    def isCancelled: Boolean = requested.get()
+
+    def installUrlHandler(): () => Unit = {
+      val previousHandler = URLHandlerRegistry.getDefault
+      val handler = new HttpClientHandler

Review Comment:
   Good catch! This is a real problem. I'll look into it. 



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