Skip to content

Commit

Permalink
Move tachyon out of sbin
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklan committed Mar 18, 2014
1 parent f2f9bc6 commit 738ba23
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ if [ "$SPARK_TACHYON" == "true" ]; then

tar xf "tachyon-${TACHYON_VERSION}-bin.tar.gz"
cp "tachyon-${TACHYON_VERSION}/target/tachyon-${TACHYON_VERSION}-jar-with-dependencies.jar" "$DISTDIR/jars"
mkdir -p "$DISTDIR/sbin/tachyon/src/main/java/tachyon/web"
cp -r "tachyon-${TACHYON_VERSION}"/{bin,conf,libexec} "$DISTDIR/sbin/tachyon"
cp -r "tachyon-${TACHYON_VERSION}"/src/main/java/tachyon/web/resources "$DISTDIR/sbin/tachyon/src/main/java/tachyon/web"
sed -i "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\n export TACHYON_JAR=\$TACHYON_HOME/../../jars/\1|" "$DISTDIR/sbin/tachyon/libexec/tachyon-config.sh"
mkdir -p "$DISTDIR/tachyon/src/main/java/tachyon/web"
cp -r "tachyon-${TACHYON_VERSION}"/{bin,conf,libexec} "$DISTDIR/tachyon"
cp -r "tachyon-${TACHYON_VERSION}"/src/main/java/tachyon/web/resources "$DISTDIR/tachyon/src/main/java/tachyon/web"
sed -i "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\n export TACHYON_JAR=\$TACHYON_HOME/../../jars/\1|" "$DISTDIR/tachyon/libexec/tachyon-config.sh"

popd > /dev/null
rm -rf $TMPD
Expand Down
8 changes: 4 additions & 4 deletions sbin/start-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ START_TACHYON=false
while (( "$#" )); do
case $1 in
--with-tachyon)
if [ ! -e "$sbin"/tachyon/bin/tachyon ]; then
if [ ! -e "$sbin"/../tachyon/bin/tachyon ]; then
echo "Error: --with-tachyon specified, but tachyon not found."
exit -1
fi
Expand Down Expand Up @@ -58,7 +58,7 @@ fi
"$sbin"/spark-daemon.sh start org.apache.spark.deploy.master.Master 1 --ip $SPARK_MASTER_IP --port $SPARK_MASTER_PORT --webui-port $SPARK_MASTER_WEBUI_PORT

if [ "$START_TACHYON" == "true" ]; then
"$sbin"/tachyon/bin/tachyon bootstrap-conf $SPARK_MASTER_IP
"$sbin"/tachyon/bin/tachyon format -s
"$sbin"/tachyon/bin/tachyon-start.sh master
"$sbin"/../tachyon/bin/tachyon bootstrap-conf $SPARK_MASTER_IP
"$sbin"/../tachyon/bin/tachyon format -s
"$sbin"/../tachyon/bin/tachyon-start.sh master
fi
6 changes: 3 additions & 3 deletions sbin/start-slaves.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ START_TACHYON=false
while (( "$#" )); do
case $1 in
--with-tachyon)
if [ ! -e "$sbin"/tachyon/bin/tachyon ]; then
if [ ! -e "$sbin"/../tachyon/bin/tachyon ]; then
echo "Error: --with-tachyon specified, but tachyon not found."
exit -1
fi
Expand Down Expand Up @@ -64,8 +64,8 @@ else
fi

if [ "$START_TACHYON" == "true" ]; then
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/tachyon/bin/tachyon bootstrap-conf $SPARK_MASTER_IP
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/../tachyon/bin/tachyon bootstrap-conf $SPARK_MASTER_IP

# set -t so we can call sudo
SPARK_SSH_OPTS="-o StrictHostKeyChecking=no -t" "$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin/tachyon/bin/tachyon-start.sh" worker SudoMount \; sleep 1
SPARK_SSH_OPTS="-o StrictHostKeyChecking=no -t" "$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin/../tachyon/bin/tachyon-start.sh" worker SudoMount \; sleep 1
fi
4 changes: 2 additions & 2 deletions sbin/stop-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ sbin=`cd "$sbin"; pwd`

"$sbin"/spark-daemon.sh stop org.apache.spark.deploy.master.Master 1

if [ -e "$sbin"/tachyon/bin/tachyon ]; then
"$sbin"/tachyon/bin/tachyon killAll tachyon.master.Master
if [ -e "$sbin"/../tachyon/bin/tachyon ]; then
"$sbin"/../tachyon/bin/tachyon killAll tachyon.master.Master
fi
4 changes: 2 additions & 2 deletions sbin/stop-slaves.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then
fi

# do before the below calls as they exec
if [ -e "$sbin"/tachyon/bin/tachyon ]; then
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/tachyon/bin/tachyon killAll tachyon.worker.Worker
if [ -e "$sbin"/../tachyon/bin/tachyon ]; then
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/../tachyon/bin/tachyon killAll tachyon.worker.Worker
fi

if [ "$SPARK_WORKER_INSTANCES" = "" ]; then
Expand Down

0 comments on commit 738ba23

Please sign in to comment.