buyingyi | 98e9a9b | 2013-03-10 21:24:35 +0000 | [diff] [blame] | 1 | hostname |
| 2 | . conf/cluster.properties |
| 3 | |
| 4 | #Kill process |
| 5 | PID=`ps -ef|grep ${USER}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'` |
| 6 | |
| 7 | if [ "$PID" == "" ]; then |
buyingyi | 26198a2 | 2013-03-22 06:40:46 +0000 | [diff] [blame] | 8 | PID=`ps -ef|grep ${USER}|grep java|grep 'hyracks'|awk '{print $2}'` |
| 9 | fi |
| 10 | |
| 11 | if [ "$PID" == "" ]; then |
buyingyi | 98e9a9b | 2013-03-10 21:24:35 +0000 | [diff] [blame] | 12 | USERID=`id | sed 's/^uid=//;s/(.*$//'` |
| 13 | PID=`ps -ef|grep ${USERID}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'` |
| 14 | fi |
| 15 | |
| 16 | echo $PID |
| 17 | kill -9 $PID |
| 18 | |
| 19 | #Clean up I/O working dir |
| 20 | io_dirs=$(echo $IO_DIRS | tr "," "\n") |
| 21 | for io_dir in $io_dirs |
| 22 | do |
| 23 | rm -rf $io_dir/* |
| 24 | done |
| 25 | |
| 26 | #Clean up NC temp dir |
| 27 | rm -rf $NCTMP_DIR/* |