summaryrefslogtreecommitdiff
path: root/hadoop
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-20 13:54:23 +0200
committerErich Eckner <git@eckner.net>2017-09-20 13:54:23 +0200
commit2d25332ee18e690d3ee4b865e53d748f460f8ab1 (patch)
treedcd476ae4d54912ce24e6d892fc7b7dbf1d733ba /hadoop
parent88c2c6c63748ea1b30a58b938c3924b887b34ae9 (diff)
downloadarchlinuxewe-2d25332ee18e690d3ee4b865e53d748f460f8ab1.tar.xz
hadoop neu
Diffstat (limited to 'hadoop')
-rw-r--r--hadoop/PKGBUILD466
-rw-r--r--hadoop/hadoop-conf5
-rw-r--r--hadoop/hadoop-datanode.service13
-rw-r--r--hadoop/hadoop-jobtracker.service13
-rw-r--r--hadoop/hadoop-namenode.service12
-rw-r--r--hadoop/hadoop-secondarynamenode.service13
-rw-r--r--hadoop/hadoop-tasktracker.service13
-rw-r--r--hadoop/hadoop.install32
-rw-r--r--hadoop/hadoop.profile4
-rw-r--r--hadoop/hadoop.sh2
10 files changed, 573 insertions, 0 deletions
diff --git a/hadoop/PKGBUILD b/hadoop/PKGBUILD
new file mode 100644
index 000000000..617746cd5
--- /dev/null
+++ b/hadoop/PKGBUILD
@@ -0,0 +1,466 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Chris Severance aur.severach AatT spamgourmet.com
+# Contributor: David Roheim <david dot roheim at gmail dot com>
+# Contributor: Manuel Hoffmann <manuel@manuel-hoffmann.info>
+# Contributor: Markus Holtermann <aur@markusholtermann.eu>
+# Contributor: Mantas Vidutis <mantas.a.vidutis-at-gmail.com>
+# Contributor: Tianjiao Yin <ytj000@gmail.com>
+
+set -u
+pkgname='hadoop'
+pkgver='2.8.1'
+pkgrel='1'
+pkgdesc='Hadoop - MapReduce implementation and distributed filesystem'
+arch=('i686' 'x86_64')
+url='http://hadoop.apache.org'
+license=('apache')
+depends=('java-environment>=7' 'openssh' 'apache-ant' 'polkit')
+backup=(
+ "etc/conf.d/${pkgname}"
+ "etc/profile.d/${pkgname}.sh"
+ "etc/${pkgname}/capacity-scheduler.xml"
+ "etc/${pkgname}/configuration.xsl"
+ "etc/${pkgname}/core-site.xml"
+ "etc/${pkgname}/fair-scheduler.xml"
+ "etc/${pkgname}/hadoop-env.sh"
+ "etc/${pkgname}/hadoop-metrics2.properties"
+ "etc/${pkgname}/hadoop-policy.xml"
+ "etc/${pkgname}/hdfs-site.xml"
+ "etc/${pkgname}/log4j.properties"
+ "etc/${pkgname}/mapred-queue-acls.xml"
+ "etc/${pkgname}/mapred-site.xml"
+ "etc/${pkgname}/masters"
+ "etc/${pkgname}/slaves"
+ "etc/${pkgname}/ssl-client.xml.example"
+ "etc/${pkgname}/ssl-server.xml.example"
+ "etc/${pkgname}/taskcontroller.cfg"
+ "etc/${pkgname}/task-log4j.properties"
+)
+options=('!strip')
+install="${pkgname}.install"
+source=(
+ "http://www-us.apache.org/dist/|hadoop/common/hadoop-${pkgver}/hadoop-${pkgver}.tar.gz"
+ 'hadoop.profile'
+ 'hadoop-conf'
+ 'hadoop.sh'
+ 'hadoop-namenode.service'
+ 'hadoop-datanode.service'
+ 'hadoop-secondarynamenode.service'
+ 'hadoop-jobtracker.service'
+ 'hadoop-tasktracker.service'
+)
+_verwatch=("${source[0]}hadoop/common/" '.*href="hadoop-\([0-9\.]\+\)/.*' 'f')
+sha256sums=('b5be527578ef2c8565cd435ab4ae71a024cad704f7bf597bd792082703bd77d9'
+ 'b6607cb8531244d9be9241d8d4980d5695869f89fa598c8d24b35ec503df413b'
+ 'e584c32246fd23fe5f35b13399372419584c27a234364b12d1479f3c87e70748'
+ '93cb40f76f6bb0c1924b7ef083b82d39bf32190f86c28fc6304839703cdda7b1'
+ '3fd40045f7657881cde0abee4ac1735232ba3d79121d724f74707252e19088b3'
+ '230a58ab4e3462eb63662aee057965c5130247f7d9c98df83495c8da2c409fe5'
+ '047d3d6aea9eada82780eaa93a55c6259fb1b63c68bc50cc26323e066c1b7f75'
+ '5e9bc41b0086dfa7b237d1a7248a7f113299687f79ba0c58ba01eaeea0e35e79'
+ '37d7a252292b365782d9e7a64d6019a78d9c561acf9b5af3c246b602d3e0a8ec')
+
+# http://www.apache.org/mirrors/
+_setmirror() {
+ local _cmd="${BASH_SOURCE[*]}" # want [*] not [@]
+ local _lang="${LANG:-}" # mksrcinfo removes LANG
+ if [ "${_cmd/makepkg/}" != "${_cmd}" ] && [ ! -z "${_lang}" ]; then
+ local _mirrors=()
+ _lang="${_lang%%\.*}"
+ _lang="${_lang##*_}"
+ case "${_lang}" in
+ 'AR') _mirrors+=(
+ 'http://mirrors.dcarsat.com.ar/apache/'
+ 'http://apache.dattatec.com/'
+ );;
+ 'AU') _mirrors+=(
+ 'http://apache.mirror.amaze.com.au/'
+ 'http://apache.mirror.digitalpacific.com.au/'
+ 'http://mirror.intergrid.com.au/apache/'
+ 'http://apache.mirror.serversaustralia.com.au/'
+ 'http://mirror.ventraip.net.au/apache/'
+ 'http://apache.melbourneitmirror.net/'
+ );;
+ 'AT') _mirrors+=(
+ 'ftp://mirror.klaus-uwe.me/apache/'
+ 'http://mirror.klaus-uwe.me/apache/'
+ );;
+ 'BY') _mirrors+=('http://ftp.byfly.by/pub/apache.org/');;
+ 'BE') _mirrors+=(
+ 'ftp://apache.belnet.be/mirrors/ftp.apache.org/'
+ 'http://apache.belnet.be/'
+ 'http://apache.cu.be/'
+ );;
+ 'BA') _mirrors+=('http://apache.mirror.ba/');;
+ 'BR') _mirrors+=(
+ 'http://mirror.nbtelecom.com.br/apache/'
+ 'http://ftp.unicamp.br/pub/apache/'
+ );;
+ 'BG') _mirrors+=('http://apache.cbox.biz/');;
+ 'CA') _mirrors+=(
+ 'http://mirror.its.dal.ca/apache/'
+ 'ftp://apache.mirror.iweb.ca/'
+ 'http://apache.mirror.iweb.ca/'
+ 'http://muug.ca/mirror/apache-dist/'
+ 'ftp://apache.mirror.rafal.ca/pub/apache/'
+ 'http://apache.mirror.rafal.ca/'
+ 'http://mirror.dsrg.utoronto.ca/apache/'
+ 'ftp://mirror.csclub.uwaterloo.ca/apache/'
+ 'http://mirror.csclub.uwaterloo.ca/apache/'
+ 'http://apache.parentingamerica.com/'
+ 'http://apache.mirror.vexxhost.com/'
+ 'http://apache.mirror.colo-serv.net/'
+ 'http://apache.mirror.gtcomm.net/'
+ 'http://apache.forsale.plus/'
+ 'http://httpd-mirror.frgl.pw/apache/'
+ 'http://apache.mirror.globo.tech/'
+ );;
+ 'CN') _mirrors+=(
+ 'http://mirror.bit.edu.cn/apache/'
+ 'http://mirrors.hust.edu.cn/apache/'
+ 'http://mirrors.tuna.tsinghua.edu.cn/apache/'
+ 'http://apache.fayea.com/'
+ );;
+ 'CO') _mirrors+=('http://apache.uniminuto.edu/');;
+ 'CR') _mirrors+=(
+ 'ftp://mirrors.ucr.ac.cr/apache/'
+ 'http://mirrors.ucr.ac.cr/apache/'
+ );;
+ 'HR') _mirrors+=('http://ftp.carnet.hr/misc/apache/');;
+ 'CZ') _mirrors+=(
+ 'http://mirror.dkm.cz/apache/'
+ 'ftp://mirror.hosting90.cz/apache/'
+ 'http://mirror.hosting90.cz/apache/'
+ 'http://apache.miloslavbrada.cz/'
+ );;
+ 'DK') _mirrors+=(
+ 'http://mirrors.rackhosting.com/apache/'
+ 'http://ftp.download-by.net/apache/'
+ 'http://mirrors.dotsrc.org/apache/'
+ );;
+ 'FI') _mirrors+=(
+ 'http://mirror.netinch.com/pub/apache/'
+ 'ftp://ftp.funet.fi/pub/mirrors/apache.org/'
+ 'http://www.nic.funet.fi/pub/mirrors/apache.org/'
+ );;
+ 'FR') _mirrors+=(
+ 'http://apache.mindstudios.com/'
+ 'http://mirrors.standaloneinstaller.com/apache/'
+ 'http://wwwftp.ciril.fr/pub/apache/'
+ 'http://apache.crihan.fr/dist/'
+ 'http://mirror.ibcp.fr/pub/apache/'
+ 'ftp://mirrors.ircam.fr/pub/apache/'
+ 'http://mirrors.ircam.fr/pub/apache/'
+ 'http://apache.mirrors.ovh.net/ftp.apache.org/dist/'
+ 'http://apache.mediamirrors.org/'
+ );;
+ 'DE') _mirrors+=(
+ 'http://apache.lauf-forum.at/'
+ 'http://mirror.softaculous.com/apache/'
+ 'ftp://mirror.yannic-bonenberger.com/apache/'
+ 'http://mirror.yannic-bonenberger.com/apache/'
+ 'http://mirror.23media.de/apache/'
+ 'http://mirrors.ae-online.de/apache/'
+ 'http://apache.mirror.digionline.de/'
+ 'http://mirror.dkd.de/apache/'
+ 'ftp://ftp.fau.de/apache/'
+ 'http://ftp.fau.de/apache/'
+ 'ftp://ftp.fu-berlin.de/unix/www/apache/'
+ 'http://mirror.funkfreundelandshut.de/apache/'
+ 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/'
+ 'http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/'
+ 'ftp://mirror.netcologne.de/apache.org/'
+ 'http://mirror.netcologne.de/apache.org/'
+ 'ftp://ftp.halifax.rwth-aachen.de/apache/'
+ 'http://ftp.halifax.rwth-aachen.de/apache/'
+ 'http://mirror.serversupportforum.de/apache/'
+ 'http://mirror.synyx.de/apache/'
+ 'http://apache.mirror.iphh.net/'
+ 'http://artfiles.org/apache.org/'
+ 'http://www.gutscheine.org/mirror/apache/'
+ 'http://babyname.tips/mirrors/apache/'
+ );;
+ 'GR') _mirrors+=(
+ 'http://apache.forthnet.gr/'
+ 'ftp://ftp.forthnet.gr/pub/www/apache/'
+ 'http://mirrors.myaegean.gr/apache/'
+ 'http://apache.otenet.gr/dist/'
+ 'ftp://ftp.cc.uoc.gr/mirrors/apache/'
+ 'http://ftp.cc.uoc.gr/mirrors/apache/'
+ );;
+ 'HK') _mirrors+=(
+ 'http://apache.01link.hk/'
+ 'http://ftp.cuhk.edu.hk/pub/packages/apache.org/'
+ 'http://apache.communilink.net/'
+ 'http://apache.website-solution.net/'
+ );;
+ 'HU') _mirrors+=(
+ 'ftp://crysys.hit.bme.hu/pub/apache/'
+ 'ftp://xenia.sote.hu/pub/mirrors/www.apache.org/'
+ 'http://xenia.sote.hu/ftp/mirrors/www.apache.org/'
+ );;
+ 'IN') _mirrors+=('http://redrockdigimark.com/apachemirror/');;
+ 'ID') _mirrors+=('http://apache.repo.unpas.ac.id/');;
+ 'IE') _mirrors+=(
+ 'http://mirrors.whoishostingthis.com/apache/'
+ 'http://ftp.heanet.ie/mirrors/www.apache.org/dist/'
+ );;
+ 'IL') _mirrors+=(
+ 'http://apache.spd.co.il/'
+ 'http://apache.mivzakim.net/'
+ );;
+ 'IT') _mirrors+=(
+ 'http://it.apache.contactlab.it/'
+ 'ftp://mirror.nohup.it/apache/'
+ 'http://mirror.nohup.it/apache/'
+ 'http://apache.panu.it/'
+ 'ftp://ftp.panu.it/pub/mirrors/apache/'
+ );;
+ 'JP') _mirrors+=(
+ 'http://ftp.jaist.ac.jp/pub/apache/'
+ 'ftp://ftp.meisei-u.ac.jp/mirror/apache/dist/'
+ 'http://ftp.meisei-u.ac.jp/mirror/apache/dist/'
+ 'http://ftp.yz.yamagata-u.ac.jp/pub/network/apache/'
+ 'http://ftp.tsukuba.wide.ad.jp/software/apache/'
+ 'ftp://ftp.kddilabs.jp/infosystems/apache/'
+ 'http://ftp.kddilabs.jp/infosystems/apache/'
+ 'ftp://ftp.riken.jp/net/apache/'
+ 'http://ftp.riken.jp/net/apache/'
+ );;
+ 'KR') _mirrors+=(
+ 'http://apache.mirror.cdnetworks.com/'
+ 'http://mirror.navercorp.com/apache/'
+ 'http://apache.tt.co.kr/'
+ 'http://mirror.apache-kr.org/'
+ );;
+ 'LT') _mirrors+=(
+ 'http://apache.mirror.serveriai.lt/'
+ 'ftp://apache.mirror.vu.lt/apache/'
+ 'http://apache.mirror.vu.lt/apache/'
+ );;
+ 'NL') _mirrors+=(
+ 'ftp://mirror1.spango.com/apache/'
+ 'http://apache.mirror1.spango.com/'
+ 'http://mirrors.supportex.net/apache/'
+ 'http://apache.40b.nl/'
+ 'http://apache.hippo.nl/'
+ 'http://ftp.nluug.nl/internet/apache/'
+ 'ftp://apache.proserve.nl/apache/'
+ 'http://apache.proserve.nl/'
+ 'http://apache.mirror.triple-it.nl/'
+ 'http://ftp.tudelft.nl/apache/'
+ 'http://apache.cs.uu.nl/'
+ 'http://apache.xl-mirror.nl/'
+ );;
+ 'NC') _mirrors+=('http://mirror.lagoon.nc/pub/apache/');;
+ 'NO') _mirrors+=(
+ 'ftp://apache.uib.no/pub/apache/'
+ 'http://apache.uib.no/'
+ );;
+ 'PH') _mirrors+=(
+ 'ftp://mirror.rise.ph/apache/'
+ 'http://mirror.rise.ph/apache/'
+ );;
+ 'PL') _mirrors+=(
+ 'ftp://ftp.task.gda.pl/pub/www/apache/dist/'
+ 'http://ftp.ps.pl/pub/apache/'
+ );;
+ 'PT') _mirrors+=(
+ 'ftp://mirrors.up.pt/pub/apache/'
+ 'http://mirrors.up.pt/pub/apache/'
+ );;
+ 'RO') _mirrors+=(
+ 'http://mirror.evowise.com/apache/'
+ 'http://apache.javapipe.com/'
+ 'http://mirrors.hostingromania.ro/apache.org/'
+ 'http://mirrors.m247.ro/apache/'
+ );;
+ 'RU') _mirrors+=('http://apache-mirror.rbc.ru/pub/apache/');;
+ 'SK') _mirrors+=('http://tux.rainside.sk/apache/');;
+ 'SI') _mirrors+=('http://www.apache.si/');;
+ 'ZA') _mirrors+=(
+ 'http://apache.saix.net/'
+ 'http://mirror.za.web4africa.net/apache/'
+ 'http://apache.is.co.za/'
+ );;
+ 'ES') _mirrors+=(
+ 'http://ftp.cixug.es/apache/'
+ 'http://apache.rediris.es/'
+ 'http://apache.uvigo.es/'
+ );;
+ 'SE') _mirrors+=('http://apache.mirrors.spacedump.net/');;
+ 'CH') _mirrors+=(
+ 'http://mirror.easyname.ch/apache/'
+ 'ftp://mirror.switch.ch/mirror/apache/dist/'
+ 'http://mirror.switch.ch/mirror/apache/dist/'
+ 'http://www.pirbot.com/mirrors/apache/'
+ );;
+ 'TW') _mirrors+=(
+ 'ftp://ftp.twaren.net/Unix/Web/apache/'
+ 'http://ftp.twaren.net/Unix/Web/apache/'
+ 'http://apache.stu.edu.tw/'
+ 'http://ftp.tc.edu.tw/pub/Apache/'
+ 'http://ftp.mirror.tw/pub/apache/'
+ );;
+ 'TR') _mirrors+=(
+ 'ftp://ftp.itu.edu.tr/Mirror/Apache/'
+ 'http://ftp.itu.edu.tr/Mirror/Apache/'
+ 'http://mirror.idealhosting.net.tr/Apache/'
+ );;
+ 'UA') _mirrors+=(
+ 'http://apache.volia.net/'
+ 'http://apache.cp.if.ua/'
+ 'http://apache.ip-connect.vn.ua/'
+ );;
+ 'UK') _mirrors+=(
+ 'http://mirror.catn.com/pub/apache/'
+ 'http://apache.mirror.anlx.net/'
+ 'http://mirror.vorboss.net/apache/'
+ 'ftp://ftp.mirrorservice.org/sites/ftp.apache.org/'
+ 'http://www.mirrorservice.org/sites/ftp.apache.org/'
+ 'http://mirror.ox.ac.uk/sites/rsync.apache.org/'
+ 'http://apache.mirrors.nublue.co.uk/'
+ 'http://mirrors.ukfast.co.uk/sites/ftp.apache.org/'
+ );;
+ 'US') _mirrors+=(
+ 'http://apache.mesi.com.ar/'
+ 'http://mirrors.advancedhosters.com/apache/'
+ 'http://mirror.cogentco.com/pub/apache/'
+ 'http://mirrors.gigenet.com/apache/'
+ 'http://apache.mirrors.hoobly.com/'
+ 'http://mirror.jax.hugeserver.com/apache/'
+ 'http://apache.ip-guide.com/'
+ 'http://mirrors.koehn.com/apache/'
+ 'http://www.namesdir.com/mirrors/apache/'
+ 'http://download.nextag.com/apache/'
+ 'http://apache.mirrors.pair.com/'
+ 'http://apache.spinellicreations.com/'
+ 'http://supergsego.com/apache/'
+ 'http://www.trieuvan.com/apache/'
+ 'http://mirrors.ocf.berkeley.edu/apache/'
+ 'http://mirror.cc.columbia.edu/pub/software/apache/'
+ 'http://www.gtlib.gatech.edu/pub/apache/'
+ 'ftp://apache.cs.utah.edu/apache.org/'
+ 'http://apache.cs.utah.edu/'
+ 'http://ftp.wayne.edu/apache/'
+ 'http://apache.mirrors.lucidnetworks.net/'
+ 'http://mirror.metrocast.net/apache/'
+ 'http://mirror.nexcess.net/apache/'
+ 'http://mirror.olnevhost.net/pub/apache/'
+ 'ftp://mirror.reverse.net/pub/apache/'
+ 'http://mirror.reverse.net/pub/apache/'
+ 'http://mirrors.sonic.net/apache/'
+ 'ftp://apache.mirrors.tds.net/pub/apache.org/'
+ 'http://apache.mirrors.tds.net/'
+ 'http://apache.claz.org/'
+ 'http://mirrors.ibiblio.org/apache/'
+ 'http://apache.mirrors.ionfish.org/'
+ 'http://apache.osuosl.org/'
+ 'ftp://ftp.osuosl.org/pub/apache/'
+ 'http://mirror.stjschools.org/public/apache/'
+ );;
+ 'VN') _mirrors+=(
+ 'http://mirror.downloadvn.com/apache/'
+ 'http://mirrors.viethosting.com/apache/'
+ );;
+ esac
+ local _mc="${#_mirrors[@]}"
+ if [ "${_mc}" -ne 0 ]; then
+ _mc=$((${RANDOM} % ${_mc}))
+ _mc="${_mirrors[${_mc}]%/}"
+ source[0]="${_mc}/${source[0]##*|}"
+ set +u
+ msg "Alternate mirror: ${_mc}"
+ set -u
+ fi
+ fi
+}
+if [ "${source[0]//|/}" != "${source[0]}" ]; then
+ _setmirror
+ source[0]="${source[0]//|/\/}"
+fi
+unset -f _setmirror
+
+
+compile() {
+ set -u
+ cd "${pkgname}-${pkgver}"
+ msg 'Cleaning...'
+ ant clean
+
+ msg 'Patching...'
+ sed -i -e "s/${_devver}/${pkgver}/" 'build.xml'
+ sed -i -e "s|<ivysettings>|<ivysettings>\n<caches defaultCacheDir=\"${srcdir}/ivy_cache\"/>|" 'ivy/ivysettings.xml'
+
+ msg "Building..."
+ ant -D'compile.native=true' bin-package
+ set +u
+}
+
+package() {
+ set -u
+ local _usr_lib="${pkgdir}/usr/lib"
+ local _hadoop_real_home="${_usr_lib}/${pkgname}-${pkgver}"
+ local _hadoop_link_home="${_usr_lib}/${pkgname}"
+
+ install -d "${_usr_lib}" "${pkgdir}/usr/lib/systemd/system"
+ cp -pr "${srcdir}/${pkgname}-${pkgver}" "${_usr_lib}"
+
+ #
+ install -Dpm755 "${srcdir}/hadoop-conf" "${pkgdir}/etc/conf.d/hadoop"
+ install -Dpm755 "${srcdir}/hadoop.profile" "${pkgdir}/etc/profile.d/hadoop.sh"
+ install -Dpm644 "${srcdir}/"hadoop-*.service -t "${pkgdir}/usr/lib/systemd/system/"
+
+ # we do not use soft link because we need put configures in backup array,
+ # in order to preserve the conf when upgrade package.
+ cp -pr "${_hadoop_real_home}/etc/hadoop" "${pkgdir}/etc"
+ mv "${_hadoop_real_home}/etc" "${_hadoop_real_home}/orig_etc"
+
+ # todo: i need an own file :)
+ install -Dm755 <(cat << EOF
+#!/bin/sh
+# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
+# https://aur.archlinux.org/
+for f in /etc/profile.d/*.sh; do
+ . "\${f}"
+done
+/usr/lib/hadoop/bin/hadoop "\$@"
+EOF
+ ) "${pkgdir}/usr/bin/hadoop"
+
+ cd "${_usr_lib}"
+ ln -s "${pkgname}-${pkgver}" "${pkgname}"
+
+ ## Disable IPv6 (comment out to disable IPv6 support):
+ # sed -i 's|_OPTS="-D|_OPTS="-Djava.net.preferIPv4Stack=true -D|' hadoop-env.sh
+
+if ! :; then
+ ## fix native
+ if [ "${CARCH}" = 'i686' ]; then
+ rm -rf 'lib/native/Linux-amd64-64'
+ cd 'lib/native/Linux-i386-32'
+ sed -i -e "s:dependency_libs=':dependency_libs='-L/opt/java/jre/lib/i386/server :" 'libhadoop.la'
+ fi
+
+ if [ "${CARCH}" = 'x86_64' ]; then
+ rm -rf 'lib/native/Linux-i386-32'
+ cd 'lib/native/Linux-amd64-64'
+ sed -i "s:dependency_libs=':dependency_libs='-L/opt/java/jre/lib/amd64/server :" 'libhadoop.la'
+ fi
+
+ ## Create some links, so Hadoop's KFS jar could access KFS libraries properly
+ ## (it is still fine if KFS is not installed)
+
+ msg 'Creating KFS links...'
+
+ for _lib in 'libkfsClient' 'libkfsCommon' 'libkfsEmulator' 'libkfsIO' 'libkfsMeta'; do
+ for _ext in 'a' 'so'; do
+ ln -sf "/usr/lib/${_lib}.${_ext}"
+ done
+ done
+ ln -sf '/usr/lib/libkfs_access.so'
+fi
+ set +u
+
+}
+set +u
diff --git a/hadoop/hadoop-conf b/hadoop/hadoop-conf
new file mode 100644
index 000000000..a3f49ef90
--- /dev/null
+++ b/hadoop/hadoop-conf
@@ -0,0 +1,5 @@
+# example configuration file
+
+HADOOP_USERNAME="hadoop"
+
+. /etc/profile.d/hadoop.sh \ No newline at end of file
diff --git a/hadoop/hadoop-datanode.service b/hadoop/hadoop-datanode.service
new file mode 100644
index 000000000..7bbf74970
--- /dev/null
+++ b/hadoop/hadoop-datanode.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hadoop Datanode
+Requires=hadoop-namenode.service
+After=hadoop-namenode.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/hadoop
+ExecStart=/usr/bin/hadoop datanode
+User=hadoop
+Group=hadoop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hadoop/hadoop-jobtracker.service b/hadoop/hadoop-jobtracker.service
new file mode 100644
index 000000000..61973168b
--- /dev/null
+++ b/hadoop/hadoop-jobtracker.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hadoop Jobtracker
+Requires=hadoop-datanode.service
+After=hadoop-datanode.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/hadoop
+ExecStart=/usr/bin/hadoop jobtracker
+User=hadoop
+Group=hadoop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hadoop/hadoop-namenode.service b/hadoop/hadoop-namenode.service
new file mode 100644
index 000000000..51553653d
--- /dev/null
+++ b/hadoop/hadoop-namenode.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Hadoop Namenode
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/hadoop
+ExecStart=/usr/bin/hadoop namenode
+User=hadoop
+Group=hadoop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hadoop/hadoop-secondarynamenode.service b/hadoop/hadoop-secondarynamenode.service
new file mode 100644
index 000000000..f0e5c0227
--- /dev/null
+++ b/hadoop/hadoop-secondarynamenode.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hadoop Secondary Namenode
+Requires=hadoop-datanode.service
+After=hadoop-datanode.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/hadoop
+ExecStart=/usr/bin/hadoop secondarynamenode
+User=hadoop
+Group=hadoop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hadoop/hadoop-tasktracker.service b/hadoop/hadoop-tasktracker.service
new file mode 100644
index 000000000..004566ea0
--- /dev/null
+++ b/hadoop/hadoop-tasktracker.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Hadoop Tasktracker
+Requires=hadoop-jobtracker.service
+After=hadoop-jobtracker.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/hadoop
+ExecStart=/usr/bin/hadoop tasktracker
+User=hadoop
+Group=hadoop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/hadoop/hadoop.install b/hadoop/hadoop.install
new file mode 100644
index 000000000..a7b1b075e
--- /dev/null
+++ b/hadoop/hadoop.install
@@ -0,0 +1,32 @@
+post_install() {
+ getent group 'hadoop' >/dev/null 2>&1 || groupadd -r 'hadoop' >/dev/null
+ getent passwd 'hadoop' /dev/null 2>&1 || useradd -r -g 'hadoop' -d '/etc/hadoop' 'hadoop' >/dev/null
+
+ if [ ! -d '/etc/hadoop/.ssh' ] ; then
+ mkdir -p '/etc/hadoop/.ssh'
+ fi
+
+ chown -R 'hadoop:hadoop' '/etc/hadoop'
+
+ if [ ! -e '/etc/hadoop/.ssh/id_rsa' ] ; then
+ su -s '/usr/bin/bash' -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" - 'hadoop'
+ su -s '/usr/bin/bash' -c "cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys" - 'hadoop'
+ fi
+
+ echo 'An SSH key-pair has been created. Depending on your SSHD configuration you may'
+ echo 'need to connect to localhost as user "hadoop" to make sure Hadoop can connect.'
+ echo ''
+ echo '$ ssh localhost'
+
+ echo ''
+ echo '===> Read https://wiki.archlinux.org/index.php/Hadoop for more information'
+}
+
+post_upgrade() {
+ :
+}
+
+post_remove() {
+ getent passwd 'hadoop' >/dev/null 2>&1 && userdel 'hadoop' >/dev/null
+ getent group 'hadoop' >/dev/null 2>&1 && groupdel 'hadoop' >/dev/null
+}
diff --git a/hadoop/hadoop.profile b/hadoop/hadoop.profile
new file mode 100644
index 000000000..d5b49aa52
--- /dev/null
+++ b/hadoop/hadoop.profile
@@ -0,0 +1,4 @@
+export HADOOP_CONF_DIR=/etc/hadoop
+export HADOOP_LOG_DIR=/tmp/hadoop/log
+export HADOOP_SLAVES=/etc/hadoop/slaves
+export HADOOP_PID_DIR=/tmp/hadoop/run
diff --git a/hadoop/hadoop.sh b/hadoop/hadoop.sh
new file mode 100644
index 000000000..55974c37c
--- /dev/null
+++ b/hadoop/hadoop.sh
@@ -0,0 +1,2 @@
+HADOOP_CONF_DIR=/etc/hadoop
+export HADOOP_CONF_DIR \ No newline at end of file