You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by witgo <gi...@git.apache.org> on 2014/10/29 02:43:03 UTC

[GitHub] spark pull request: [SPARK-1720][SPARK-1719] use LD_LIBRARY_PATH i...

Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2711#discussion_r19516036
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1684,6 +1689,34 @@ private[spark] object Utils extends Logging {
         method.invoke(obj, values.toSeq: _*)
       }
     
    +  /**
    +   * Return the current system LD_LIBRARY_PATH name
    +   */
    +  def libraryPathName: String = {
    +    if (isWindows) {
    +      "PATH"
    +    } else if (isMac) {
    +      "DYLD_LIBRARY_PATH"
    +    } else {
    +      "LD_LIBRARY_PATH"
    +    }
    +  }
    +
    +  def prefixLibraryPath(libraryPaths: Seq[String]): String = {
    +    val libraryPathScriptVar = if (isWindows) {
    +      s"%${libraryPathName}%"
    +    } else {
    +      "$" + libraryPathName
    +    }
    +    val libraryPath = (libraryPaths :+ libraryPathScriptVar).mkString(File.pathSeparator)
    +    val ampersand = if (Utils.isWindows) {
    +      " &"
    --- End diff --
    
    Sorry, the right should be 
    http://stackoverflow.com/questions/8922224/multiple-commands-on-a-single-line-in-a-windows-batch-file


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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