Till Westmann | 276bbc2 | 2013-06-05 18:56:27 -0700 | [diff] [blame] | 1 | #/* |
Ian Maxon | d885779 | 2015-09-11 14:19:53 -0700 | [diff] [blame] | 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | #*/ |
vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 19 | hostname |
| 20 | . conf/cluster.properties |
| 21 | |
| 22 | #Kill process |
| 23 | PID=`ps -ef|grep ${USER}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'` |
| 24 | |
| 25 | if [ "$PID" == "" ]; then |
buyingyi | 26198a2 | 2013-03-22 06:40:46 +0000 | [diff] [blame] | 26 | PID=`ps -ef|grep ${USER}|grep java|grep 'hyracks'|awk '{print $2}'` |
| 27 | fi |
| 28 | |
| 29 | if [ "$PID" == "" ]; then |
vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 30 | USERID=`id | sed 's/^uid=//;s/(.*$//'` |
| 31 | PID=`ps -ef|grep ${USERID}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'` |
| 32 | fi |
| 33 | |
| 34 | echo $PID |
| 35 | kill -9 $PID |
| 36 | |
| 37 | #Clean up I/O working dir |
| 38 | io_dirs=$(echo $IO_DIRS | tr "," "\n") |
| 39 | for io_dir in $io_dirs |
| 40 | do |
Michael Blow | d6cf641 | 2016-06-30 02:44:35 -0400 | [diff] [blame] | 41 | rm -rf $io_dir/* |
vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 42 | done |
| 43 | |
| 44 | #Clean up NC temp dir |
| 45 | rm -rf $NCTMP_DIR/* |