homebrew-core/Formula/hive.rb
Dominyk Tiller 96dc8f4c29
hive 2.1.0
Closes #3690.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-08 00:11:36 +01:00

35 lines
1.1 KiB
Ruby

class Hive < Formula
desc "Hadoop-based data summarization, query, and analysis"
homepage "https://hive.apache.org"
url "https://www.apache.org/dyn/closer.cgi?path=hive/hive-2.1.0/apache-hive-2.1.0-bin.tar.gz"
sha256 "ef5a2c2c4942adc3e0c5cd63510a05628fde9f14b57b8c3b509447e88c735a7a"
bottle :unneeded
depends_on :java => "1.7+"
depends_on "hadoop"
def install
rm_f Dir["bin/*.cmd", "bin/ext/*.cmd", "bin/ext/util/*.cmd"]
libexec.install %w[bin conf examples hcatalog lib scripts]
Pathname.glob("#{libexec}/bin/*") do |file|
next if file.directory?
(bin/file.basename).write_env_script file,
Language::Java.java_home_env("1.7+").merge(:HIVE_HOME => libexec)
end
end
def caveats; <<-EOS.undent
Hadoop must be in your path for hive executable to work.
If you want to use HCatalog with Pig, set $HCAT_HOME in your profile:
export HCAT_HOME=#{libexec}/hcatalog
EOS
end
test do
system bin/"schematool", "-initSchema", "-dbType", "derby"
assert_match "Hive #{version}", shell_output("#{bin}/hive --version")
end
end