blob: bb43686eee1076ab81b32fed52abef0c9ed72f4a [file] [log] [blame]
buyingyi1341a162013-06-05 15:07:52 -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
19hostname
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
61PREGELIX_HOME=`pwd`
62
63#Enter the temp dir
64cd $NCTMP_DIR2
65
66#Launch hyracks nc
67#echo ${PREGELIX_HOME}/bin/pregelixnc -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${PREGELIX_HOME}/bin/pregelixnc -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 &