blob: 5fa2b864dc754ad3b844690c8b101be4e34a3d51 [file] [log] [blame]
vinayakb5d8a2f22013-01-29 19:45:44 +00001#!/bin/bash
Till Westmann276bbc22013-06-05 18:56:27 -07002#/*
Ian Maxond8857792015-09-11 14:19:53 -07003 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
18 # under the License.
19 #*/
vinayakb5d8a2f22013-01-29 19:45:44 +000020hostname
21
22#Import cluster properties
23. conf/cluster.properties
24
25#Get the IP address of the cc
26CCHOST_NAME=`cat conf/master`
27CCHOST=`bin/getip.sh`
28
29#Remove the temp dir
30rm -rf $CCTMP_DIR
31mkdir $CCTMP_DIR
32
33#Remove the logs dir
34rm -rf $CCLOGS_DIR
35mkdir $CCLOGS_DIR
36
37#Export JAVA_HOME and JAVA_OPTS
38export JAVA_HOME=$JAVA_HOME
39export JAVA_OPTS=$CCJAVA_OPTS
40
41#Launch hyracks cc script
42chmod -R 755 $HYRACKS_HOME
buyingyif2782a82013-03-23 10:57:43 +000043if [ -f "conf/topology.xml" ]; then
44#Launch hyracks cc script with topology
45$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 &
46else
47#Launch hyracks cc script without toplogy
buyingyia880ed92013-03-14 22:44:32 +000048$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 +000049fi