blob: 213b9ebaddb405fa2d750fa57fd75184db04ba90 [file] [log] [blame]
buyingyi98e9a9b2013-03-10 21:24:35 +00001#!/bin/bash
buyingyi80bb3cc2013-04-25 00:17:23 -07002#
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#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
buyingyi80bb3cc2013-04-25 00:17:23 -070040HIVESTERIX_HOME=`pwd`
41
42#Enter the temp dir
43cd $CCTMP_DIR
44
buyingyif2782a82013-03-23 10:57:43 +000045if [ -f "conf/topology.xml" ]; then
46#Launch hyracks cc script with topology
buyingyi80bb3cc2013-04-25 00:17:23 -070047${HIVESTERIX_HOME}/bin/hivesterixcc -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 &
buyingyif2782a82013-03-23 10:57:43 +000048else
49#Launch hyracks cc script without toplogy
buyingyi80bb3cc2013-04-25 00:17:23 -070050${HIVESTERIX_HOME}/bin/hivesterixcc -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 +000051fi