Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CELEBORN-1682] Add java tools.jar into classpath for JVM quake #2874

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/celeborn-class
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if [ ! -d "$CELEBORN_JARS_DIR" ]; then
echo "You need to build CELEBORN with the target \"package\" before running this program." 1>&2
exit 1
else
CELEBORN_CLASSPATH="$CELEBORN_CONF_DIR:$HADOOP_CONF_DIR:$CELEBORN_JARS_DIR/*"
CELEBORN_CLASSPATH="$CELEBORN_CONF_DIR:$HADOOP_CONF_DIR:$CELEBORN_JARS_DIR/*:$JAVA_TOOLS_JAR"
fi

# Turn off posix mode since it does not allow process substitution
Expand Down
12 changes: 12 additions & 0 deletions sbin/load-celeborn-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,24 @@ if [ -n "${JAVA_HOME}" ]; then
else
if [ "$(command -v java)" ]; then
export JAVA="java"
JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | awk '{print $3}')
turboFei marked this conversation as resolved.
Show resolved Hide resolved
else
echo "JAVA_HOME is not set" >&2
exit 1
fi
fi

# Find the java tools.jar
if [ -f "${JAVA_HOME}/lib/tools.jar" ]; then
export JAVA_TOOLS_JAR="${JAVA_HOME}/lib/tools.jar"
else
if [ -f "${JAVA_HOME}/../lib/tools.jar" ]; then
export JAVA_TOOLS_JAR="${JAVA_HOME}/../lib/tools.jar"
else
echo "WARNING: cannot locate tools.jar. Expected to find it in either ${JAVA_HOME}/lib/tools.jar or ${JAVA_HOME}/../lib/tools.jar"
fi
fi

# Get log directory
if [ "$CELEBORN_LOG_DIR" = "" ]; then
export CELEBORN_LOG_DIR="${CELEBORN_HOME}/logs"
Expand Down
Loading