blob: 099275b2135216012322424282b558f0ce73ceed [file] [log] [blame]
Till Westmann276bbc22013-06-05 18:56:27 -07001#/*
Ian Maxond8857792015-09-11 14:19:53 -07002 # 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 #*/
vinayakb5d8a2f22013-01-29 19:45:44 +000019hostname
20. conf/cluster.properties
21
22#Kill process
23PID=`ps -ef|grep ${USER}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'`
24
25if [ "$PID" == "" ]; then
buyingyi26198a22013-03-22 06:40:46 +000026 PID=`ps -ef|grep ${USER}|grep java|grep 'hyracks'|awk '{print $2}'`
27fi
28
29if [ "$PID" == "" ]; then
vinayakb5d8a2f22013-01-29 19:45:44 +000030 USERID=`id | sed 's/^uid=//;s/(.*$//'`
31 PID=`ps -ef|grep ${USERID}|grep java|grep 'Dapp.name=hyracksnc'|awk '{print $2}'`
32fi
33
34echo $PID
35kill -9 $PID
36
37#Clean up I/O working dir
38io_dirs=$(echo $IO_DIRS | tr "," "\n")
39for io_dir in $io_dirs
40do
Michael Blowd6cf6412016-06-30 02:44:35 -040041 rm -rf $io_dir/*
vinayakb5d8a2f22013-01-29 19:45:44 +000042done
43
44#Clean up NC temp dir
45rm -rf $NCTMP_DIR/*