zsxwing commented on a change in pull request #24683: [SPARK-20547][REPL]Throw 
RemoteClassLoadedError for transient errors in ExecutorClassLoader
URL: https://github.com/apache/spark/pull/24683#discussion_r286705009
 
 

 ##########
 File path: repl/src/main/scala/org/apache/spark/repl/ExecutorClassLoader.scala
 ##########
 @@ -115,23 +127,31 @@ class ExecutorClassLoader(
     }
   }
 
+  // See 
org.apache.spark.network.server.TransportRequestHandler.processStreamRequest.
+  private val STREAM_NOT_FOUND_REGEX = s"Stream '.*' was not found.".r.pattern
+
   private def getClassFileInputStreamFromSparkRPC(path: String): InputStream = 
{
-    val channel = env.rpcEnv.openChannel(s"$classUri/$path")
+    val channel = env.rpcEnv.openChannel(s"$classUri/${urlEncode(path)}")
 
 Review comment:
   This fixes an issue in the current ExecutorClassLoader: it doesn't encode 
the path.
   
   Before this PR, when we try to fetch some class that contains special 
characters, it will always throw `URISyntaxException: Illegal character in path 
...` which will be converted to `ClassNotFoundException` at last.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to