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