blob: 2e19cf64c88be0211555892fcbeb2f7ca9e7ebf9 [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
17MY_NAME=`hostname`
18#Get the IP address of the cc
19CCHOST_NAME=`cat conf/master`
20CURRENT_PATH=`pwd`
21CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
22
23#Import cluster properties
24. conf/cluster.properties
25
26#Clean up temp dir
27
28rm -rf $NCTMP_DIR
29mkdir $NCTMP_DIR
30
31#Clean up log dir
32rm -rf $NCLOGS_DIR
33mkdir $NCLOGS_DIR
34
35
36#Clean up I/O working dir
37io_dirs=$(echo $IO_DIRS | 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
47IPADDR=`bin/getip.sh`
48#echo $IPADDR
49
50#Get node ID
51NODEID=`hostname | cut -d '.' -f 1`
52
53#Set JAVA_OPTS
54export JAVA_OPTS=$NCJAVA_OPTS
55
56cd $HYRACKS_HOME
57HYRACKS_HOME=`pwd`
58
59#Enter the temp dir
60cd $NCTMP_DIR
61
62#Launch hyracks nc
buyingyi26198a22013-03-22 06:40:46 +000063$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 &