hive: set HIVE_HOME in wrapper script

Updated java version and wrapper generation code for hive
This commit is contained in:
Premkumar Subramanian 2016-05-30 09:46:03 +05:30 committed by Dominyk Tiller
parent 9fa40677bf
commit 9fe7f1f7f9

View file

@ -6,25 +6,25 @@ class Hive < Formula
bottle :unneeded
depends_on :java => "1.7+"
depends_on "hadoop"
depends_on :java
def install
rm_f Dir["bin/*.cmd", "bin/ext/*.cmd", "bin/ext/util/*.cmd"]
libexec.install %w[bin conf examples hcatalog lib scripts]
bin.write_exec_script Dir["#{libexec}/bin/*"]
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.
After installation, set $HIVE_HOME in your profile:
export HIVE_HOME=#{libexec}
If you want to use HCatalog with Pig, set $HCAT_HOME in your profile:
export HCAT_HOME=#{libexec}/hcatalog
You may need to set JAVA_HOME:
export JAVA_HOME="$(/usr/libexec/java_home)"
EOS
end