diff options
| author | Kashif Rasul | 2014-01-15 16:47:34 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2014-01-29 18:42:16 -0800 |
| commit | 61dcbbdb5136c1079c78d9a0a2861500c59de9ca (patch) | |
| tree | 2d7b7c2df525ddab92e94cc89877ba16cb117b55 /Library/Formula | |
| parent | 1cc1514063c6c2104c99fe224d887a47bcba7172 (diff) | |
| download | homebrew-61dcbbdb5136c1079c78d9a0a2861500c59de9ca.tar.bz2 | |
hadoop 2.2.0
Closes #25924.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/hadoop.rb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Library/Formula/hadoop.rb b/Library/Formula/hadoop.rb index 6f17930ee..a482056c2 100644 --- a/Library/Formula/hadoop.rb +++ b/Library/Formula/hadoop.rb @@ -2,25 +2,33 @@ require 'formula' class Hadoop < Formula homepage 'http://hadoop.apache.org/' - url 'http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.2.1/hadoop-1.2.1.tar.gz' - sha1 'b07b88ca658dc9d338aa84f5c68c809eb7c70964' + url 'http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-2.2.0/hadoop-2.2.0.tar.gz' + sha1 '7339da348d9b4a813b1b1d8b6982f3f8755329e4' def install - rm_f Dir["bin/*.bat"] - libexec.install %w[bin conf lib webapps contrib] - libexec.install Dir['*.jar'] + rm_f Dir["bin/*.cmd", "sbin/*.cmd", "libexec/*.cmd", "etc/hadoop/*.cmd"] + libexec.install %w[bin sbin libexec share etc] bin.write_exec_script Dir["#{libexec}/bin/*"] + sbin.write_exec_script Dir["#{libexec}/sbin/*"] # But don't make rcc visible, it conflicts with Qt (bin/'rcc').unlink - inreplace "#{libexec}/conf/hadoop-env.sh", - "# export JAVA_HOME=/usr/lib/j2sdk1.5-sun", + inreplace "#{libexec}/etc/hadoop/hadoop-env.sh", + "export JAVA_HOME=${JAVA_HOME}", + "export JAVA_HOME=\"$(/usr/libexec/java_home)\"" + inreplace "#{libexec}/etc/hadoop/yarn-env.sh", + "# export JAVA_HOME=/home/y/libexec/jdk1.6.0/", + "export JAVA_HOME=\"$(/usr/libexec/java_home)\"" + inreplace "#{libexec}/etc/hadoop/mapred-env.sh", + "# export JAVA_HOME=/home/y/libexec/jdk1.6.0/", "export JAVA_HOME=\"$(/usr/libexec/java_home)\"" end def caveats; <<-EOS.undent In Hadoop's config file: - #{libexec}/conf/hadoop-env.sh + #{libexec}/etc/hadoop/hadoop-env.sh, + #{libexec}/etc/hadoop/mapred-env.sh and + #{libexec}/etc/hadoop/yarn-env.sh $JAVA_HOME has been set to be the output of: /usr/libexec/java_home EOS |
