blob: 63673a6e52513bd75d84cafda92d9f6d11363b4b [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
17#Get the IP address of the cc
18CCHOST_NAME=`cat conf/master`
19CURRENT_PATH=`pwd`
20CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
21
22#Import cluster properties
23. conf/cluster.properties
24. conf/debugnc.properties
25
26#Clean up temp dir
27
28rm -rf $NCTMP_DIR2
29mkdir $NCTMP_DIR2
30
31#Clean up log dir
32rm -rf $NCLOGS_DIR2
33mkdir $NCLOGS_DIR2
34
35
36#Clean up I/O working dir
37io_dirs=$(echo $IO_DIRS2 | tr "," "\n")
38for io_dir in $io_dirs
39do
40 rm -rf $io_dir
41 mkdir $io_dir
42done
43
44#Set JAVA_HOME
45export JAVA_HOME=$JAVA_HOME
46
47#Get OS
48IPADDR=`bin/getip.sh`
49
50#Get node ID
51NODEID=`hostname | cut -d '.' -f 1`
52NODEID=${NODEID}2
53
54#Set JAVA_OPTS
55export JAVA_OPTS=$NCJAVA_OPTS2
56
57cd $HYRACKS_HOME
58HYRACKS_HOME=`pwd`
59
60#Enter the temp dir
61cd $NCTMP_DIR2
62
63#Launch hyracks nc
64$HYRACKS_HOME/hyracks-server/target/appassembler/bin/hyracksnc -cc-host $CCHOST -cc-port $CC_CLUSTERPORT -cluster-net-ip-address $IPADDR -data-ip-address $IPADDR -node-id $NODEID -iodevices "${IO_DIRS2}" &> $NCLOGS_DIR2/$NODEID.log &