blob: 23a4c3680c6c12de87d11341fc8021b763735935 [file] [log] [blame]
buyingyi55df5212013-03-24 07:20:08 +00001hostname
2
3MY_NAME=`hostname`
4#Get the IP address of the cc
5CCHOST_NAME=`cat conf/master`
6CURRENT_PATH=`pwd`
7CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
8
9#Import cluster properties
10. conf/cluster.properties
11
12#Clean up temp dir
13
14rm -rf $NCTMP_DIR
15mkdir $NCTMP_DIR
16
17#Clean up log dir
18rm -rf $NCLOGS_DIR
19mkdir $NCLOGS_DIR
20
21
22#Clean up I/O working dir
23io_dirs=$(echo $IO_DIRS | 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
33IPADDR=`bin/getip.sh`
34#echo $IPADDR
35
36#Get node ID
37NODEID=`hostname | cut -d '.' -f 1`
38
39#Set JAVA_OPTS
40export JAVA_OPTS=$NCJAVA_OPTS
41
42cd $HYRACKS_HOME
43HYRACKS_HOME=`pwd`
44
45#Enter the temp dir
46cd $NCTMP_DIR
47
48#Launch hyracks nc
49$HYRACKS_HOME/hyracks-server/target/appassembler/bin/hyracksnc -cc-host $CCHOST -cc-port $CC_CLUSTERPORT -cluster-net-ip-address $IPADDR -data-ip-address $IPADDR -result-ip-address $IPADDR -node-id $NODEID -iodevices "${IO_DIRS}" &> $NCLOGS_DIR/$NODEID.log &