blob: 0da0561b8bba73578f68f8f2be0c17e7a4e4a49b [file] [log] [blame]
Till Westmann276bbc22013-06-05 18:56:27 -07001#/*
2# Copyright 2009-2013 by The Regents of the University of California
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# you may obtain a copy of the License from
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#*/
vinayakb5d8a2f22013-01-29 19:45:44 +000015hostname
16. conf/cluster.properties
17
18#Kill process
19PID=`ps -ef|grep ${USER}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'`
20
21if [ "$PID" == "" ]; then
buyingyi26198a22013-03-22 06:40:46 +000022 PID=`ps -ef|grep ${USER}|grep java|grep 'hyracks'|awk '{print $2}'`
23fi
24
25if [ "$PID" == "" ]; then
vinayakb5d8a2f22013-01-29 19:45:44 +000026 USERID=`id | sed 's/^uid=//;s/(.*$//'`
27 PID=`ps -ef|grep ${USERID}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'`
28fi
29
30echo $PID
31kill -9 $PID
32
33#Clean up I/O working dir
34io_dirs=$(echo $IO_DIRS | tr "," "\n")
35for io_dir in $io_dirs
36do
37 rm -rf $io_dir/*
38done
39
40#Clean up NC temp dir
41rm -rf $NCTMP_DIR/*