blob: 904858d4789ec070dbda441211ef633702acf03d [file] [log] [blame]
buyingyi80bb3cc2013-04-25 00:17:23 -07001#!/bin/bash
2#
3#------------------------------------------------------------------------
4# Copyright 2009-2013 by The Regents of the University of California
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# you may obtain a copy of the License from
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ------------------------------------------------------------------------
17#
18
buyingyi98e9a9b2013-03-10 21:24:35 +000019hostname
20
21MY_NAME=`hostname`
22#Get the IP address of the cc
23CCHOST_NAME=`cat conf/master`
24CURRENT_PATH=`pwd`
25CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
26
27#Import cluster properties
28. conf/cluster.properties
29
30#Clean up temp dir
31
32rm -rf $NCTMP_DIR
33mkdir $NCTMP_DIR
34
35#Clean up log dir
36rm -rf $NCLOGS_DIR
37mkdir $NCLOGS_DIR
38
39
40#Clean up I/O working dir
41io_dirs=$(echo $IO_DIRS | tr "," "\n")
42for io_dir in $io_dirs
43do
44 rm -rf $io_dir
45 mkdir $io_dir
46done
47
48#Set JAVA_HOME
49export JAVA_HOME=$JAVA_HOME
50
51IPADDR=`bin/getip.sh`
52#echo $IPADDR
53
54#Get node ID
55NODEID=`hostname | cut -d '.' -f 1`
56
57#Set JAVA_OPTS
58export JAVA_OPTS=$NCJAVA_OPTS
59
buyingyi80bb3cc2013-04-25 00:17:23 -070060HIVESTERIX_HOME=`pwd`
buyingyi98e9a9b2013-03-10 21:24:35 +000061
62#Enter the temp dir
63cd $NCTMP_DIR
64
65#Launch hyracks nc
buyingyi80bb3cc2013-04-25 00:17:23 -070066#echo ${HIVESTERIX_HOME}/bin/hivesterixnc -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}"
67${HIVESTERIX_HOME}/bin/hivesterixnc -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 &