2010-10-28 23:06:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Hive < Formula
|
2010-10-28 23:06:27 +00:00
|
|
|
homepage 'http://hive.apache.org'
|
2013-11-27 01:07:13 +00:00
|
|
|
url 'http://www.apache.org/dyn/closer.cgi?path=hive/hive-0.12.0/hive-0.12.0-bin.tar.gz'
|
|
|
|
sha1 '488f625a859facc89312320ef7e9802f1cc2531e'
|
2010-10-28 23:06:27 +00:00
|
|
|
|
|
|
|
depends_on 'hadoop'
|
2013-12-06 04:01:07 +00:00
|
|
|
|
2010-10-28 23:06:27 +00:00
|
|
|
def install
|
|
|
|
rm_f Dir["bin/*.bat"]
|
2014-01-11 19:20:27 +00:00
|
|
|
libexec.install %w[bin conf examples hcatalog lib scripts]
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
2010-10-28 23:06:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Hadoop must be in your path for hive executable to work.
|
|
|
|
After installation, set $HIVE_HOME in your profile:
|
|
|
|
export HIVE_HOME=#{libexec}
|
|
|
|
|
2014-01-11 19:20:27 +00:00
|
|
|
If you want to use HCatalog with Pig, set $HCAT_HOME in your profile:
|
|
|
|
export HCAT_HOME=#{libexec}/hcatalog
|
|
|
|
|
2012-01-28 19:22:36 +00:00
|
|
|
You may need to set JAVA_HOME:
|
2012-01-28 19:25:36 +00:00
|
|
|
export JAVA_HOME="$(/usr/libexec/java_home)"
|
2010-10-28 23:06:27 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|