summaryrefslogtreecommitdiff
path: root/databases/hbase/files/hbase_master.in
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2014-07-28 20:40:49 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2014-07-28 20:40:49 +0000
commitfa41c5db88fe18f90bd88102d5087e74cf7c810c (patch)
treed1afa138c944d908e7bfe1b9a156a638a00b6f65 /databases/hbase/files/hbase_master.in
parentdeskutils/fet: upgrade version 5.23.0 => 5.23.1 (diff)
New port: apache hbase:
Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google's Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, Apache HBase provides Bigtable-like capabilities on top of Hadoop and HDFS.
Diffstat (limited to 'databases/hbase/files/hbase_master.in')
-rw-r--r--databases/hbase/files/hbase_master.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/databases/hbase/files/hbase_master.in b/databases/hbase/files/hbase_master.in
new file mode 100644
index 000000000000..ec7799a1a2af
--- /dev/null
+++ b/databases/hbase/files/hbase_master.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: hbase_master
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# hbase_master_enable (bool): Set to NO by default.
+# Set it to YES to enable HBase master.
+
+. /etc/rc.subr
+
+name=hbase_master
+rcvar=hbase_master_enable
+
+load_rc_config "${name}"
+
+: ${hbase_master_enable:=NO}
+: ${hbase_master_user:=%%HBASE_USER%%}
+
+command="%%PREFIX%%/hbase/bin/hbase-daemon.sh"
+command_args='--config %%ETCDIR%% start master'
+
+stop_cmd=hbase_master_stop
+
+hbase_master_stop () {
+ su -m ${hbase_master_user} -c "${command} --config %%ETCDIR%% stop master"
+}
+
+run_rc_command "$1"