You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/01/21 08:34:44 UTC
[1/3] git commit: Made run-example respect SPARK_JAVA_OPTS and
SPARK_MEM.
Updated Branches:
refs/heads/master 6b4eed779 -> c67d3d8be
Made run-example respect SPARK_JAVA_OPTS and SPARK_MEM.
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/e0b741d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/e0b741d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/e0b741d0
Branch: refs/heads/master
Commit: e0b741d07a2f710c8b9f2d7266b03cc38800ed00
Parents: 792d908
Author: Tathagata Das <ta...@gmail.com>
Authored: Mon Jan 20 20:48:59 2014 -0800
Committer: Tathagata Das <ta...@gmail.com>
Committed: Mon Jan 20 20:48:59 2014 -0800
----------------------------------------------------------------------
bin/run-example | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/e0b741d0/bin/run-example
----------------------------------------------------------------------
diff --git a/bin/run-example b/bin/run-example
index 2e9d514..a362b11 100755
--- a/bin/run-example
+++ b/bin/run-example
@@ -64,6 +64,10 @@ if $cygwin; then
export SPARK_EXAMPLES_JAR=`cygpath -w $SPARK_EXAMPLES_JAR`
fi
+# Set SPARK_MEM if it isn't already set since we also use it for this process
+SPARK_MEM=${SPARK_MEM:-512m}
+export SPARK_MEM
+
# Find java binary
if [ -n "${JAVA_HOME}" ]; then
RUNNER="${JAVA_HOME}/bin/java"
@@ -76,11 +80,21 @@ else
fi
fi
+# Set JAVA_OPTS to be able to load native libraries and to set heap size
+JAVA_OPTS="$SPARK_JAVA_OPTS"
+JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$SPARK_LIBRARY_PATH"
+JAVA_OPTS="$JAVA_OPTS -Xms$SPARK_MEM -Xmx$SPARK_MEM"
+# Load extra JAVA_OPTS from conf/java-opts, if it exists
+if [ -e "$FWDIR/conf/java-opts" ] ; then
+ JAVA_OPTS="$JAVA_OPTS `cat $FWDIR/conf/java-opts`"
+fi
+export JAVA_OPTS
+
if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then
echo -n "Spark Command: "
- echo "$RUNNER" -cp "$CLASSPATH" "$@"
+ echo "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@"
echo "========================================"
echo
fi
-exec "$RUNNER" -cp "$CLASSPATH" "$@"
+exec "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@"
[3/3] git commit: Merge pull request #484 from tdas/run-example-fix
Posted by pw...@apache.org.
Merge pull request #484 from tdas/run-example-fix
Made run-example respect SPARK_JAVA_OPTS and SPARK_MEM.
bin/run-example scripts was not passing Java properties set through the SPARK_JAVA_OPTS to the example. This is important for examples like Twitter** as the Twitter authentication information must be set through java properties. Hence added the same JAVA_OPTS code in run-example as it is in bin/spark-class script.
Also added SPARK_MEM, in case someone wants to run the example with different amounts of memory. This can be removed if it is not tune with the intended semantics of the run-example scripts.
@matei Please check this soon I want this to go in 0.9-rc4
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/c67d3d8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/c67d3d8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/c67d3d8b
Branch: refs/heads/master
Commit: c67d3d8beb101fff2ea6397b759dd1bfdf9fcfa5
Parents: 6b4eed7 65869f8
Author: Patrick Wendell <pw...@gmail.com>
Authored: Mon Jan 20 23:34:35 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Jan 20 23:34:35 2014 -0800
----------------------------------------------------------------------
bin/run-example | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: Removed SPARK_MEM from run-examples.
Posted by pw...@apache.org.
Removed SPARK_MEM from run-examples.
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/65869f84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/65869f84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/65869f84
Branch: refs/heads/master
Commit: 65869f843d5eb2b9b686d07aadaa7f1a0f16e8c7
Parents: e0b741d
Author: Tathagata Das <ta...@gmail.com>
Authored: Mon Jan 20 23:15:28 2014 -0800
Committer: Tathagata Das <ta...@gmail.com>
Committed: Mon Jan 20 23:15:28 2014 -0800
----------------------------------------------------------------------
bin/run-example | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/65869f84/bin/run-example
----------------------------------------------------------------------
diff --git a/bin/run-example b/bin/run-example
index a362b11..adba7dd 100755
--- a/bin/run-example
+++ b/bin/run-example
@@ -64,10 +64,6 @@ if $cygwin; then
export SPARK_EXAMPLES_JAR=`cygpath -w $SPARK_EXAMPLES_JAR`
fi
-# Set SPARK_MEM if it isn't already set since we also use it for this process
-SPARK_MEM=${SPARK_MEM:-512m}
-export SPARK_MEM
-
# Find java binary
if [ -n "${JAVA_HOME}" ]; then
RUNNER="${JAVA_HOME}/bin/java"
@@ -83,7 +79,6 @@ fi
# Set JAVA_OPTS to be able to load native libraries and to set heap size
JAVA_OPTS="$SPARK_JAVA_OPTS"
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$SPARK_LIBRARY_PATH"
-JAVA_OPTS="$JAVA_OPTS -Xms$SPARK_MEM -Xmx$SPARK_MEM"
# Load extra JAVA_OPTS from conf/java-opts, if it exists
if [ -e "$FWDIR/conf/java-opts" ] ; then
JAVA_OPTS="$JAVA_OPTS `cat $FWDIR/conf/java-opts`"