forked from medined/accumulo_stackscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_accumulo.sh
executable file
·44 lines (40 loc) · 964 Bytes
/
start_accumulo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# startup hadoop
if [ -d $HOME/software/hadoop ];
then
$HOME/software/hadoop/bin/start-dfs.sh
$HOME/software/hadoop/bin/start-mapred.sh
else
su hadoop -c "/usr/local/hadoop/bin/start-dfs.sh"
su hadoop -c "/usr/local/hadoop/bin/start-mapred.sh"
fi
#
# startup zookeeer
#
if [ -d $HOME/software/zookeeper ];
then
pushd $HOME/software/zookeeper; ./bin/zkServer.sh start; popd
else
su zookeeper -c "pushd /usr/local/zookeeper; ./bin/zkServer.sh start; popd"
fi
#
# On my system, hadoop starts in safe mode and I need to
# force it to leave. Have no idea why since I am closing
# the processes cleanly.
#
sleep 2
if [ -d $HOME/software/hadoop ];
then
$HOME/software/hadoop/bin/hadoop dfsadmin -safemode leave
else
su hadoop -c "/usr/local/hadoop/bin/hadoop dfsadmin -safemode leave"
fi
#
# startup accumulo
#
if [ -d $HOME/bin/accumulo ];
then
$HOME/bin/accumulo/bin/start-all.sh
else
su accumulo -c "/usr/local/accumulo/bin/start-all.sh"
fi