This is a poor way to handle this case. Why don't we create a ClassLoader from HDFS or whatever the other URI scheme is? In general if some URI scheme is supported on the workers, it should also be supported on the driver.