blob: d09b9c1d5d82fc04bd3442829f11778b4c42b6d2 [file] [log] [blame]
Till Westmann276bbc22013-06-05 18:56:27 -07001#/*
Ian Maxond8857792015-09-11 14:19:53 -07002 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing,
13 # software distributed under the License is distributed on an
14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 # KIND, either express or implied. See the License for the
16 # specific language governing permissions and limitations
17 # under the License.
18 #*/
vinayakb5d8a2f22013-01-29 19:45:44 +000019hostname
20
21MY_NAME=`hostname`
22#Get the IP address of the cc
23CCHOST_NAME=`cat conf/master`
24CURRENT_PATH=`pwd`
25CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
26
27#Import cluster properties
28. conf/cluster.properties
29
30#Clean up temp dir
31
32rm -rf $NCTMP_DIR
33mkdir $NCTMP_DIR
34
35#Clean up log dir
36rm -rf $NCLOGS_DIR
37mkdir $NCLOGS_DIR
38
39
40#Clean up I/O working dir
41io_dirs=$(echo $IO_DIRS | tr "," "\n")
42for io_dir in $io_dirs
43do
Michael Blowd6cf6412016-06-30 02:44:35 -040044 rm -rf $io_dir
45 mkdir $io_dir
vinayakb5d8a2f22013-01-29 19:45:44 +000046done
47
48#Set JAVA_HOME
49export JAVA_HOME=$JAVA_HOME
50
51IPADDR=`bin/getip.sh`
52#echo $IPADDR
53
54#Get node ID
55NODEID=`hostname | cut -d '.' -f 1`
56
57#Set JAVA_OPTS
58export JAVA_OPTS=$NCJAVA_OPTS
59
60cd $HYRACKS_HOME
61HYRACKS_HOME=`pwd`
62
63#Enter the temp dir
64cd $NCTMP_DIR
65
66#Launch hyracks nc
buyingyi26198a22013-03-22 06:40:46 +000067$HYRACKS_HOME/hyracks-server/target/appassembler/bin/hyracksnc -cc-host $CCHOST -cc-port $CC_CLUSTERPORT -cluster-net-ip-address $IPADDR -data-ip-address $IPADDR -result-ip-address $IPADDR -node-id $NODEID -iodevices "${IO_DIRS}" &> $NCLOGS_DIR/$NODEID.log &