blob: 484ecac4a448bf7da1517c1693cd308fd636f64e [file] [log] [blame]
buyingyi5df938f2013-03-24 07:20:08 +00001#!/bin/bash
2hostname
3
4#Import cluster properties
5. conf/cluster.properties
6
7#Get the IP address of the cc
8CCHOST_NAME=`cat conf/master`
9CCHOST=`bin/getip.sh`
10
11#Remove the temp dir
12rm -rf $CCTMP_DIR
13mkdir $CCTMP_DIR
14
15#Remove the logs dir
16rm -rf $CCLOGS_DIR
17mkdir $CCLOGS_DIR
18
19#Export JAVA_HOME and JAVA_OPTS
20export JAVA_HOME=$JAVA_HOME
21export JAVA_OPTS=$CCJAVA_OPTS
22
23#Launch hyracks cc script
24chmod -R 755 $HYRACKS_HOME
25if [ -f "conf/topology.xml" ]; then
26#Launch hyracks cc script with topology
27$HYRACKS_HOME/hyracks-server/target/appassembler/bin/hyrackscc -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 &
28else
29#Launch hyracks cc script without toplogy
30$HYRACKS_HOME/hyracks-server/target/appassembler/bin/hyrackscc -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 &
31fi