Till Westmann | 276bbc2 | 2013-06-05 18:56:27 -0700 | [diff] [blame] | 1 | #/* |
| 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 | #*/ |
vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 15 | hostname |
| 16 | |
| 17 | #Get the IP address of the cc |
| 18 | CCHOST_NAME=`cat conf/master` |
| 19 | CURRENT_PATH=`pwd` |
| 20 | CCHOST=`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 | |
| 28 | rm -rf $NCTMP_DIR2 |
| 29 | mkdir $NCTMP_DIR2 |
| 30 | |
| 31 | #Clean up log dir |
| 32 | rm -rf $NCLOGS_DIR2 |
| 33 | mkdir $NCLOGS_DIR2 |
| 34 | |
| 35 | |
| 36 | #Clean up I/O working dir |
| 37 | io_dirs=$(echo $IO_DIRS2 | tr "," "\n") |
| 38 | for io_dir in $io_dirs |
| 39 | do |
| 40 | rm -rf $io_dir |
| 41 | mkdir $io_dir |
| 42 | done |
| 43 | |
| 44 | #Set JAVA_HOME |
| 45 | export JAVA_HOME=$JAVA_HOME |
| 46 | |
| 47 | #Get OS |
| 48 | IPADDR=`bin/getip.sh` |
| 49 | |
| 50 | #Get node ID |
| 51 | NODEID=`hostname | cut -d '.' -f 1` |
| 52 | NODEID=${NODEID}2 |
| 53 | |
| 54 | #Set JAVA_OPTS |
| 55 | export JAVA_OPTS=$NCJAVA_OPTS2 |
| 56 | |
| 57 | cd $HYRACKS_HOME |
| 58 | HYRACKS_HOME=`pwd` |
| 59 | |
| 60 | #Enter the temp dir |
| 61 | cd $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 & |