summaryrefslogtreecommitdiff
path: root/PCAP-PIC/hbase/bin/set_hbase_env.sh
diff options
context:
space:
mode:
authorwangchengcheng <[email protected]>2023-07-27 15:43:51 +0800
committerwangchengcheng <[email protected]>2023-07-27 15:43:51 +0800
commit124f687daace8b85e5c74abac04bcd0a92744a8d (patch)
tree4f563326b1be67cfb51bf6a04f1ca4d953536e76 /PCAP-PIC/hbase/bin/set_hbase_env.sh
parent08686ae87f9efe7a590f48db74ed133b481c85b1 (diff)
P19 23.07 online-configP19
Diffstat (limited to 'PCAP-PIC/hbase/bin/set_hbase_env.sh')
-rw-r--r--PCAP-PIC/hbase/bin/set_hbase_env.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/PCAP-PIC/hbase/bin/set_hbase_env.sh b/PCAP-PIC/hbase/bin/set_hbase_env.sh
new file mode 100644
index 0000000..60612e8
--- /dev/null
+++ b/PCAP-PIC/hbase/bin/set_hbase_env.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+echo -e "\n#hbase\nexport HBASE_HOME=/home/tsg/olap/hbase-2.2.3\nexport PATH=\$HBASE_HOME/bin:\$PATH" >> /etc/profile.d/hbase.sh
+chmod +x /etc/profile.d/hbase.sh
+
+source /etc/profile
+
+keeppath='/etc/init.d/keephbasemaster'
+if [ -x $keeppath ];then
+ chkconfig --add keephbasemaster
+ chkconfig keephbasemaster on
+ service keephbasemaster start && sleep 5
+ master_dae=`ps -ef | grep dae-hmaster.sh | grep -v grep | wc -l`
+ if [ $master_dae -lt 1 ];then
+ nohup /home/tsg/olap/hbase-2.2.3/bin/dae-hmaster.sh > /dev/null 2>&1 &
+ fi
+fi
+
+keeppath='/etc/init.d/keephbaseregion'
+if [ -x $keeppath ];then
+ chkconfig --add keephbaseregion
+ chkconfig keephbaseregion on
+ service keephbaseregion start && sleep 5
+ region_dae=`ps -ef | grep dae-hregion.sh | grep -v grep | wc -l`
+ if [ $region_dae -lt 1 ];then
+ nohup /home/tsg/olap/hbase-2.2.3/bin/dae-hregion.sh > /dev/null 2>&1 &
+ fi
+fi
+