blob: 484ecac4a448bf7da1517c1693cd308fd636f64e [file] [log] [blame]
buyingyi98e9a9b2013-03-10 21:24:35 +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
buyingyif2782a82013-03-23 10:57:43 +000025if [ -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
buyingyia880ed92013-03-14 22:44:32 +000030$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 &
buyingyif2782a82013-03-23 10:57:43 +000031fi