Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hariharan Iyer committed Mar 12, 2018
1 parent d5fa01a commit 510a91f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hadoop/util.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

source /usr/lib/hustler/bin/qubole-bash-lib.sh
export PROFILE_FILE=${PROFILE_FILE:-/etc/profile}
export HADOOP_ETC_DIR=${HADOOP_ETC_DIR:-/etc/hadoop}

function restart_master_services() {
monit restart resourcemanager
Expand All @@ -14,12 +16,12 @@ function restart_worker_services() {
function use_java8() {
export JAVA_HOME=/usr/lib/jvm/java-1.8.0_60
export PATH=$JAVA_HOME/bin:$PATH
echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0_60" >> /etc/profile
echo "export PATH=$JAVA_HOME/bin:$PATH" >> /etc/profile
echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0_60" >> "$PROFILE_FILE"
echo "export PATH=$JAVA_HOME/bin:$PATH" >> "$PROFILE_FILE"

sed -i 's/java-1.7.0/java-1.8.0_60/' /etc/hadoop/hadoop-env.sh
sed -i 's/java-1.7.0/java-1.8.0_60/' /etc/hadoop/mapred-env.sh
sed -i 's/java-1.7.0/java-1.8.0_60/' /etc/hadoop/yarn-env.sh
sed -i 's/java-1.7.0/java-1.8.0_60/' "$HADOOP_ETC_DIR/hadoop-env.sh"
sed -i 's/java-1.7.0/java-1.8.0_60/' "$HADOOP_ETC_DIR/mapred-env.sh"
sed -i 's/java-1.7.0/java-1.8.0_60/' "$HADOOP_ETC_DIR/yarn-env.sh"

is_master=$(nodeinfo is_master)
if [[ "$is_master" == "1" ]]; then
Expand Down

0 comments on commit 510a91f

Please sign in to comment.