From 079c0a49aba7ad0baab33f194004b298cfbad242 Mon Sep 17 00:00:00 2001
From: Marco Mariani <marco.mariani@nexedi.com>
Date: Mon, 17 Feb 2014 17:25:15 +0000
Subject: [PATCH] hadoop SR

---
 software/hadoop/instance.cfg.in | 21 +++++++++++++++++++++
 software/hadoop/software.cfg    | 29 +++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 software/hadoop/instance.cfg.in
 create mode 100644 software/hadoop/software.cfg

diff --git a/software/hadoop/instance.cfg.in b/software/hadoop/instance.cfg.in
new file mode 100644
index 000000000..1eb95f4f9
--- /dev/null
+++ b/software/hadoop/instance.cfg.in
@@ -0,0 +1,21 @@
+[buildout]
+
+parts =
+  sh-environment
+
+
+[sh-environment]
+# environment needed for running/debugging the applications, exported to a shell script to be sourced.
+recipe = collective.recipe.template
+output = $${buildout:directory}/environment.sh
+input = inline:
+  export JAVA_HOME="${java:location}"
+  export HADOOP_PREFIX="${hadoop:location}"
+  export HADOOP_HOME="${hadoop:location} "
+  export HADOOP_COMMON_HOME="${hadoop:location}"
+  export HADOOP_CONF_DIR="$${buildout:directory}/etc/hadoop"
+  export HADOOP_HDFS_HOME="${hadoop:location}"
+  export HADOOP_MAPRED_HOME="${hadoop:location}"
+  export HADOOP_YARN_HOME="${hadoop:location}"
+
+
diff --git a/software/hadoop/software.cfg b/software/hadoop/software.cfg
new file mode 100644
index 000000000..742aa00d3
--- /dev/null
+++ b/software/hadoop/software.cfg
@@ -0,0 +1,29 @@
+[buildout]
+
+extends = 
+  ../../stack/slapos.cfg
+  ../../component/java/buildout.cfg
+
+parts =
+  slapos-cookbook
+  java
+  hadoop
+  instance
+
+
+[hadoop]
+recipe = hexagonit.recipe.download
+url = http://apache.mirrors.spacedump.net/hadoop/common/stable/hadoop-2.2.0.tar.gz
+md5sum = 25f27eb0b5617e47c032319c0bfd9962
+strip-top-level-dir = true
+
+
+[instance]
+recipe = slapos.recipe.template
+url = ${:_profile_base_location_}/instance.cfg.in
+output = ${buildout:directory}/instance.cfg
+# md5sum = 
+mode = 0644
+
+
+
-- 
2.30.9