diff options
author | Evan Goldenberg | 2017-03-17 16:58:07 -0700 |
---|---|---|
committer | Evan Goldenberg | 2017-03-17 16:58:07 -0700 |
commit | 2ea1d8d026e891d6c7fe3d172e982dfb24a6ad22 (patch) | |
tree | 7122621298b865cc9ef78178f746a7eb6e2c8102 | |
download | aur-2ea1d8d026e891d6c7fe3d172e982dfb24a6ad22.tar.gz |
AUR package for HBase
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 53 | ||||
-rw-r--r-- | hbase-site.xml | 44 | ||||
-rw-r--r-- | hbase.install | 13 | ||||
-rw-r--r-- | hbase.profile | 2 | ||||
-rw-r--r-- | hbase.service | 16 | ||||
-rw-r--r-- | hbase.sh | 4 |
7 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a4644197f7a6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = hbase + pkgdesc = HBase - the Hadoop database + pkgver = 1.2.4 + pkgrel = 1 + url = https://hbase.apache.org + install = hbase.install + arch = i686 + arch = x86_64 + license = apache + depends = java-environment>=7 + backup = etc/hbase/hadoop-metrics2-hbase.properties + backup = etc/hbase/hbase-env.cmd + backup = etc/hbase/hbase-env.sh + backup = etc/hbase/hbase-policy.xml + backup = etc/hbase/hbase-site.xml + backup = etc/hbase/log4j.properties + backup = etc/hbase/regionservers + source = http://www-us.apache.org/dist/hbase/1.2.4/hbase-1.2.4-bin.tar.gz + source = hbase.install + source = hbase.profile + source = hbase.service + source = hbase-site.xml + sha256sums = 012d506796e28537cdf6e7cf512dc3b6b3c562e2863ca0ec5d48722bffdd265e + sha256sums = 07ea851195baf0f9a82686872077bbfd9ea4726b2fc618639bf0cdcb5e278c25 + sha256sums = 8cab4654859bcc830dd0127bf8ea1c9200c46377a8885c4b726335502e3a079f + sha256sums = 0d99566ffac2b1b9ebb3d6e6867ecd4dcfaba2bdb348c29b293fb9673e001a7d + sha256sums = c3d3710f7b681a2d629df9af68c502b65bdf81c5b25c3a711bd53e20c4b16cb3 + +pkgname = hbase + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..452a5b5130e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Evan Goldenberg <evangoldenberg@gmail.com> + +pkgname='hbase' +pkgver=1.2.4 +pkgrel=1 +pkgdesc='HBase - the Hadoop database' +arch=('i686' 'x86_64') +url='https://hbase.apache.org' +license=('apache') +depends=('java-environment>=7') +backup=( + "etc/${pkgname}/hadoop-metrics2-hbase.properties" + "etc/${pkgname}/hbase-env.cmd" + "etc/${pkgname}/hbase-env.sh" + "etc/${pkgname}/hbase-policy.xml" + "etc/${pkgname}/hbase-site.xml" + "etc/${pkgname}/log4j.properties" + "etc/${pkgname}/regionservers" +) +install="${pkgname}.install" +source=( + "http://www-us.apache.org/dist/hbase/${pkgver}/hbase-${pkgver}-bin.tar.gz" + 'hbase.install' + 'hbase.profile' + 'hbase.service' + 'hbase-site.xml' +) +sha256sums=('012d506796e28537cdf6e7cf512dc3b6b3c562e2863ca0ec5d48722bffdd265e' + '07ea851195baf0f9a82686872077bbfd9ea4726b2fc618639bf0cdcb5e278c25' + '8cab4654859bcc830dd0127bf8ea1c9200c46377a8885c4b726335502e3a079f' + '0d99566ffac2b1b9ebb3d6e6867ecd4dcfaba2bdb348c29b293fb9673e001a7d' + 'c3d3710f7b681a2d629df9af68c502b65bdf81c5b25c3a711bd53e20c4b16cb3') + +package() { + cd "$srcdir/${pkgname}-${pkgver}" + install -d "$pkgdir/usr/bin" "$pkgdir/opt" "$pkgdir/etc/hbase" "$pkgdir/usr/lib/systemd/system" + install -d "$pkgdir/var/log/hbase" "$pkgdir/var/lib/hbase" + cp -r "$srcdir/${pkgname}-${pkgver}" "$pkgdir/opt/hbase" + + cd "$pkgdir/usr/bin" + for binary in hbase hbase-config.sh start-hbase.sh stop-hbase.sh; do + ln -s "/opt/hbase/bin/$binary" $binary + done + + install -Dm755 "$srcdir/hbase.profile" "$pkgdir/etc/profile.d/hbase.sh" + install -Dm644 "$srcdir/hbase.service" "$pkgdir/usr/lib/systemd/system/hbase.service" + install -Dm644 "$srcdir/${pkgname}-${pkgver}/conf"/* "$pkgdir/etc/hbase" + install -Dm644 "$srcdir/hbase-site.xml" "$pkgdir/etc/hbase/hbase-site.xml" + + cd "$pkgdir/opt/hbase" + mv conf conf-templates + ln -sf "/etc/hbase" conf +} diff --git a/hbase-site.xml b/hbase-site.xml new file mode 100644 index 000000000000..0ead3822893a --- /dev/null +++ b/hbase-site.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<configuration> + <property> + <name>hbase.rootdir</name> + <value>file:///var/lib/hbase/hbase</value> + </property> + <property> + <name>hbase.zookeeper.property.dataDir</name> + <value>/var/lib/hbase/zookeeper</value> + </property> + <property> + <name>hbase.zookeeper.property.clientPort</name> + <value>2181</value> + </property> + <property> + <name>hbase.master.hfilecleaner.ttl</name> + <value>10000</value> + </property> + <property> + <name>hbase.master.logcleaner.ttl</name> + <value>10000</value> + </property> +</configuration> diff --git a/hbase.install b/hbase.install new file mode 100644 index 000000000000..2ff0a7ab31a2 --- /dev/null +++ b/hbase.install @@ -0,0 +1,13 @@ +post_install() { + getent group 'hbase' >/dev/null 2>&1 || groupadd -r 'hbase' >/dev/null + getent passwd 'hbase' /dev/null 2>&1 || useradd -r -g 'hbase' -d '/etc/hbase' 'hbase' >/dev/null + + chown -R 'hbase:hbase' '/etc/hbase' + chown -R 'hbase:hbase' '/var/log/hbase' + chown -R 'hbase:hbase' '/var/lib/hbase' +} + +post_remove() { + getent passwd 'hbase' >/dev/null 2>&1 && userdel 'hbase' >/dev/null + getent group 'hbase' >/dev/null 2>&1 && groupdel 'hbase' >/dev/null +} diff --git a/hbase.profile b/hbase.profile new file mode 100644 index 000000000000..3a672aa7dafc --- /dev/null +++ b/hbase.profile @@ -0,0 +1,2 @@ +export HABASE_CONF_DIR=/etc/hbase +export HBASE_LOG_DIR=/var/log/hbase diff --git a/hbase.service b/hbase.service new file mode 100644 index 000000000000..c9ad7c0c74cd --- /dev/null +++ b/hbase.service @@ -0,0 +1,16 @@ +[Unit] +Description=HBase - the Hadoop database +After=network.target + +[Service] +Type=forking +Environment=JAVA_HOME=/usr/lib/jvm/default +Environment=HBASE_CONF_DIR=/etc/hbase +Environment=HBASE_LOG_DIR=/var/log/hbase +ExecStart=/usr/bin/start-hbase.sh +ExecStop=/usr/bin/stop-hbase.sh +User=hbase +Group=hbase + +[Install] +WantedBy=multi-user.target diff --git a/hbase.sh b/hbase.sh new file mode 100644 index 000000000000..4443383b7182 --- /dev/null +++ b/hbase.sh @@ -0,0 +1,4 @@ +HBASE_CONF_DIR=/etc/hbase +HBASE_LOG_DIR=/var/log/hbase +export HBASE_CONF_DIR +export HBASE_LOG_DIR |