blob: 282a6e70407231b4d6132f858c68a5d2609ef117 [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#Import cluster properties
22. conf/cluster.properties
23
24#Get the IP address of the cc
25CCHOST_NAME=`cat conf/master`
26CCHOST=`bin/getip.sh`
27
28#Remove the temp dir
29rm -rf $CCTMP_DIR
30mkdir $CCTMP_DIR
31
32#Remove the logs dir
33rm -rf $CCLOGS_DIR
34mkdir $CCLOGS_DIR
35
36#Export JAVA_HOME and JAVA_OPTS
37export JAVA_HOME=$JAVA_HOME
38export JAVA_OPTS=$CCJAVA_OPTS
39
40PREGELIX_HOME=`pwd`
41
42#Enter the temp dir
43cd $CCTMP_DIR
44
45if [ -f "conf/topology.xml" ]; then
46#Launch hyracks cc script with topology
47${PREGELIX_HOME}/bin/pregelixcc -client-net-ip-address $CCHOST -cluster-net-ip-address $CCHOST -client-net-port $CC_CLIENTPORT -cluster-net-port $CC_CLUSTERPORT -max-heartbeat-lapse-periods 999999 -default-max-job-attempts 0 -job-history-size 0 -cluster-topology "conf/topology.xml" &> $CCLOGS_DIR/cc.log &
48else
49#Launch hyracks cc script without toplogy
50${PREGELIX_HOME}/bin/pregelixcc -client-net-ip-address $CCHOST -cluster-net-ip-address $CCHOST -client-net-port $CC_CLIENTPORT -cluster-net-port $CC_CLUSTERPORT -max-heartbeat-lapse-periods 999999 -default-max-job-attempts 0 -job-history-size 0 &> $CCLOGS_DIR/cc.log &
51fi