Skip to content
Open
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
7 changes: 5 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo -e | tee -a $log


##Checking if wget and curl installed or not, and getting installed if not for ubuntu and redhat both
python -mplatform |grep -i redhat >/dev/null 2>&1
python -mplatform |grep -i -E 'redhat|centos' >/dev/null 2>&1
# Ubuntu
if [ $? -ne 0 ]
then
Expand Down Expand Up @@ -167,6 +167,7 @@ then
cat temp
cat temp >> $log
echo "Kindly kill above running instance(s) else change port number in config file, then continue to run this script." | tee -a $log
echo "By Using: kill \`sudo lsof -t -i:#PORT_NUM\`"
rm temp &>/dev/null
exit 1
fi
Expand Down Expand Up @@ -221,7 +222,9 @@ then
if [ $? -eq 0 ]
then
echo 'Deleting existing hadoop folder "'hadoop-${hadoopver}'" from '$i' '| tee -a $log
echo 'Deleting existing hadoop folder "'hadoop-${hadoopver}.tar.gz'" from '$i' '| tee -a $log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving out existing tar.gz files is done on purpose to minimize the overall time taken when setup scripts are re-executed.

ssh $i "rm -rf ${WORKDIR}/hadoop-${hadoopver}" &>>/dev/null
ssh $i "rm -rf ${WORKDIR}/hadoop-${hadoopver}.tar.gz" &>>/dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

fi

echo 'Unzipping Hadoop setup file on '$i'' | tee -a $log
Expand Down Expand Up @@ -538,7 +541,7 @@ echo "---------------------------------------------" | tee -a $log
then
echo "Setting up mysql" | tee -a $log

python -mplatform |grep -i redhat >/dev/null 2>&1
python -mplatform |grep -i -E 'redhat|centos' >/dev/null 2>&1
# Ubuntu
if [ $? -ne 0 ]
then
Expand Down