PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/scripts/launch-resourcemanager.sh

https://github.com/deltaforge/nebu-app-hadoop
Shell | 24 lines | 15 code | 7 blank | 2 comment | 3 complexity | 525c8fdbd9a680e91a7f3073d1c4049c MD5 | raw file
 1#!/bin/sh
 2
 3# Usage launch-resourcemanager.sh output-dir resourcemanager-FQDN
 4
 5if [ $# -lt "2" ]; then
 6    echo "Invalid call to $0";
 7    exit 1;
 8fi
 9
10CONFIG=$1
11RESOURCEMANAGER=$2
12
13ssh hadoop@$RESOURCEMANAGER 'test -f .puppetcomplete'
14if [ $? -ne "0" ]; then
15	exit 2;
16fi
17
18scp -r $CONFIG/hadoop hadoop@$RESOURCEMANAGER:
19
20ssh -tt hadoop@$RESOURCEMANAGER '. hadoop/etc/hadoop/sourceAll.sh && $HADOOP_PREFIX/sbin/yarn-daemon.sh start resourcemanager'
21if [ $? -ne "0" ]; then
22	exit 3;
23fi
24