blob: fe6cf27edbdc2bf09301c23471ae9b100f49196d [file] [log] [blame]
buyingyi55df5212013-03-24 07:20:08 +00001hostname
2
3#Get the IP address of the cc
4CCHOST_NAME=`cat conf/master`
5CURRENT_PATH=`pwd`
6CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
7
8#Import cluster properties
9. conf/cluster.properties
10. conf/debugnc.properties
11
12#Clean up temp dir
13
14rm -rf $NCTMP_DIR2
15mkdir $NCTMP_DIR2
16
17#Clean up log dir
18rm -rf $NCLOGS_DIR2
19mkdir $NCLOGS_DIR2
20
21
22#Clean up I/O working dir
23io_dirs=$(echo $IO_DIRS2 | tr "," "\n")
24for io_dir in $io_dirs
25do
26 rm -rf $io_dir
27 mkdir $io_dir
28done
29
30#Set JAVA_HOME
31export JAVA_HOME=$JAVA_HOME
32
33#Get OS
34IPADDR=`bin/getip.sh`
35
36#Get node ID
37NODEID=`hostname | cut -d '.' -f 1`
38NODEID=${NODEID}2
39
40#Set JAVA_OPTS
41export JAVA_OPTS=$NCJAVA_OPTS2
42
43cd $HYRACKS_HOME
44HYRACKS_HOME=`pwd`
45
46#Enter the temp dir
47cd $NCTMP_DIR2
48
49#Launch hyracks nc
50$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 &