You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by cs...@apache.org on 2016/04/29 18:40:21 UTC
incubator-toree git commit: Remove the need to add assembly to
driver-class-path
Repository: incubator-toree
Updated Branches:
refs/heads/master cea63655a -> f81cec0ca
Remove the need to add assembly to driver-class-path
Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/f81cec0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/f81cec0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/f81cec0c
Branch: refs/heads/master
Commit: f81cec0ca48d186b7e74ad9f6b6c3217a033cfe3
Parents: cea6365
Author: Gino Bustelo <lb...@apache.org>
Authored: Thu Apr 28 15:51:39 2016 -0500
Committer: Gino Bustelo <lb...@apache.org>
Committed: Thu Apr 28 15:52:56 2016 -0500
----------------------------------------------------------------------
etc/bin/run.sh | 1 -
.../org/apache/toree/plugins/PluginSearcher.scala | 14 ++++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/f81cec0c/etc/bin/run.sh
----------------------------------------------------------------------
diff --git a/etc/bin/run.sh b/etc/bin/run.sh
index b08cc0c..b6cf8cb 100755
--- a/etc/bin/run.sh
+++ b/etc/bin/run.sh
@@ -42,5 +42,4 @@ then
TOREE_OPTS=${__TOREE_OPTS__}
fi
-SPARK_OPTS="--driver-class-path=\"${TOREE_ASSEMBLY}\" ${SPARK_OPTS}"
eval exec "${SPARK_HOME}/bin/spark-submit" "${SPARK_OPTS}" --class org.apache.toree.Main "${TOREE_ASSEMBLY}" "${TOREE_OPTS}" "$@"
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/f81cec0c/plugins/src/main/scala/org/apache/toree/plugins/PluginSearcher.scala
----------------------------------------------------------------------
diff --git a/plugins/src/main/scala/org/apache/toree/plugins/PluginSearcher.scala b/plugins/src/main/scala/org/apache/toree/plugins/PluginSearcher.scala
index 4686a50..01afe11 100644
--- a/plugins/src/main/scala/org/apache/toree/plugins/PluginSearcher.scala
+++ b/plugins/src/main/scala/org/apache/toree/plugins/PluginSearcher.scala
@@ -101,10 +101,12 @@ class PluginSearcher {
.filter(c => classMatches(Seq(c)))
}
- private def classpath = System.getProperty("java.class.path")
- .split(File.pathSeparator)
- .map(s => if (s.trim.length == 0) "." else s)
- .map(new File(_))
- .filter(_.getAbsolutePath.toLowerCase.contains("toree"))
- .toList
+ private def classpath = {
+ new File(this.getClass.getProtectionDomain.getCodeSource.getLocation.getPath) :: System.getProperty("java.class.path")
+ .split(File.pathSeparator)
+ .map(s => if (s.trim.length == 0) "." else s)
+ .map(new File(_))
+ .filter(_.getAbsolutePath.toLowerCase.contains("toree"))
+ .toList
+ }
}