vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 1 | #!/bin/bash |
Till Westmann | 276bbc2 | 2013-06-05 18:56:27 -0700 | [diff] [blame] | 2 | #/* |
Ian Maxon | d885779 | 2015-09-11 14:19:53 -0700 | [diff] [blame^] | 3 | # 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 | #*/ |
vinayakb | 5d8a2f2 | 2013-01-29 19:45:44 +0000 | [diff] [blame] | 20 | hostname |
| 21 | |
| 22 | #Import cluster properties |
| 23 | . conf/cluster.properties |
| 24 | |
| 25 | #Get the IP address of the cc |
| 26 | CCHOST_NAME=`cat conf/master` |
| 27 | CCHOST=`bin/getip.sh` |
| 28 | |
| 29 | #Remove the temp dir |
| 30 | rm -rf $CCTMP_DIR |
| 31 | mkdir $CCTMP_DIR |
| 32 | |
| 33 | #Remove the logs dir |
| 34 | rm -rf $CCLOGS_DIR |
| 35 | mkdir $CCLOGS_DIR |
| 36 | |
| 37 | #Export JAVA_HOME and JAVA_OPTS |
| 38 | export JAVA_HOME=$JAVA_HOME |
| 39 | export JAVA_OPTS=$CCJAVA_OPTS |
| 40 | |
| 41 | #Launch hyracks cc script |
| 42 | chmod -R 755 $HYRACKS_HOME |
buyingyi | f2782a8 | 2013-03-23 10:57:43 +0000 | [diff] [blame] | 43 | if [ -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 & |
| 46 | else |
| 47 | #Launch hyracks cc script without toplogy |
buyingyi | a880ed9 | 2013-03-14 22:44:32 +0000 | [diff] [blame] | 48 | $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 & |
buyingyi | f2782a8 | 2013-03-23 10:57:43 +0000 | [diff] [blame] | 49 | fi |