2011-03-10 05:11:03 +00:00
|
|
|
class Hive < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Hadoop-based data summarization, query, and analysis"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "https://hive.apache.org"
|
2015-08-25 04:14:16 +00:00
|
|
|
url "https://www.apache.org/dyn/closer.cgi?path=hive/hive-1.2.1/apache-hive-1.2.1-bin.tar.gz"
|
|
|
|
sha256 "29d9780c4af887ef623bafe6a73ec6f1bea9759bbe31fb4aeeb5b0f68c4c9979"
|
2010-10-28 23:06:27 +00:00
|
|
|
|
2015-10-23 11:16:02 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
depends_on "hadoop"
|
2015-05-03 09:51:09 +00:00
|
|
|
depends_on :java
|
2013-12-06 04:01:07 +00:00
|
|
|
|
2010-10-28 23:06:27 +00:00
|
|
|
def install
|
2015-02-06 16:17:33 +00:00
|
|
|
rm_f Dir["bin/ext/*.cmd", "bin/ext/util/*.cmd"]
|
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
|
2015-08-25 04:14:16 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /default/, shell_output("#{bin}/hive -e 'show databases;'")
|
|
|
|
end
|
2010-10-28 23:06:27 +00:00
|
|
|
end
|