Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/12694#discussion_r61047133
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -1090,6 +1091,50 @@ private[spark] object Utils extends Logging {
bytesToString(megabytes * 1024L * 1024L)
}
+
+ /**
+ * Create a jar file at the given path, containing a manifest with a
classpath
+ * that references all specified entries.
+ */
+ def createShortClassPath(tempDir: File, classPath: String) : String = {
+ if (isWindows) {
+ val env = new util.HashMap[String, String](System.getenv())
+ val javaCps = FileUtil
+ .createJarWithClassPath(classPath, new
Path(tempDir.getAbsolutePath), env)
+ val javaCpStr = javaCps(0) + javaCps(1)
+ logInfo("Shorten the class path to: " + javaCpStr)
+ javaCpStr
+ } else {
+ classPath
+ }
+ }
+
+ def createShortClassPath(classPath: String) : String = {
--- End diff --
Ditto.
```
def createShortClassPath(classPath: String): String = {
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]