You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/22 21:59:40 UTC

[GitHub] [spark] zsxwing commented on a change in pull request #24683: [SPARK-20547][REPL]Throw RemoteClassLoadedError for transient errors in ExecutorClassLoader

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org