blob: cab8bb3a4f1df14f11bf388ebc62c06817ecb864 [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
21#Get the IP address of the cc
22CCHOST_NAME=`cat conf/master`
23CURRENT_PATH=`pwd`
24CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
25
26#Import cluster properties
27. conf/cluster.properties
28. conf/debugnc.properties
29
30#Clean up temp dir
31
32rm -rf $NCTMP_DIR2
33mkdir $NCTMP_DIR2
34
35#Clean up log dir
36rm -rf $NCLOGS_DIR2
37mkdir $NCLOGS_DIR2
38
39
40#Clean up I/O working dir
41io_dirs=$(echo $IO_DIRS2 | 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
51#Get OS
52IPADDR=`bin/getip.sh`
53
54#Get node ID
55NODEID=`hostname | cut -d '.' -f 1`
56NODEID=${NODEID}2
57
58#Set JAVA_OPTS
59export JAVA_OPTS=$NCJAVA_OPTS2
60
buyingyi80bb3cc2013-04-25 00:17:23 -070061HIVESTERIX_HOME=`pwd`
buyingyi98e9a9b2013-03-10 21:24:35 +000062
63#Enter the temp dir
64cd $NCTMP_DIR2
65
66#Launch hyracks nc
buyingyi80bb3cc2013-04-25 00:17:23 -070067#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}"
68${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_DIRS2}" &> $NCLOGS_DIR2/$NODEID.log &