Skip to content

add grep to Support CenOS and remove the exsit hadoop tar file#20

Open
liyujiel wants to merge 2 commits intosparkonpower:masterfrom
liyujiel:master
Open

add grep to Support CenOS and remove the exsit hadoop tar file#20
liyujiel wants to merge 2 commits intosparkonpower:masterfrom
liyujiel:master

Conversation

@liyujiel
Copy link

@liyujiel liyujiel commented Mar 8, 2017

When I try to implement it on CentOS based server. It shows couple errors.

Also add a help command for kill the exist port.

@kavanabhat
Copy link

The removal of existing hadoop tar file is located in wrong place. Also, there is no need to remove it. We can reuse it instead of downloading again.

setup.sh Outdated
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`"
Copy link
Contributor

Choose a reason for hiding this comment

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

Kindly merge this statement to the earlier message like,

kill above running instance by issuing : "kill sudo lsof -t -i:#PORT_NUM"
else
change port number in config file, then continue with this script

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.

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
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

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`"
echo "By Using: kill \`sudo lsof -t -i:#PORT_NUM\`"

Choose a reason for hiding this comment

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

The suggestion was to merge the two echo statements into one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants