hive: fix Java version (#69686)
parent
257457454d
commit
a81d93bb39
|
@ -5,7 +5,7 @@ class Hive < Formula
|
|||
mirror "https://archive.apache.org/dist/hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz"
|
||||
sha256 "d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462"
|
||||
license "Apache-2.0"
|
||||
revision 2
|
||||
revision 3
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
|
@ -14,7 +14,7 @@ class Hive < Formula
|
|||
bottle :unneeded
|
||||
|
||||
depends_on "hadoop"
|
||||
depends_on "openjdk"
|
||||
depends_on "openjdk@8"
|
||||
|
||||
def install
|
||||
rm_f Dir["bin/*.cmd", "bin/ext/*.cmd", "bin/ext/util/*.cmd"]
|
||||
|
@ -30,14 +30,14 @@ class Hive < Formula
|
|||
next if file.directory?
|
||||
|
||||
(bin/file.basename).write_env_script file,
|
||||
Language::Java.java_home_env.merge(HIVE_HOME: libexec)
|
||||
JAVA_HOME: Formula["openjdk@8"].opt_prefix,
|
||||
HADOOP_HOME: "${HADOOP_HOME:-#{Formula["hadoop"].opt_libexec}}",
|
||||
HIVE_HOME: libexec
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
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=#{opt_libexec}/hcatalog
|
||||
EOS
|
||||
|
@ -45,6 +45,6 @@ class Hive < Formula
|
|||
|
||||
test do
|
||||
system bin/"schematool", "-initSchema", "-dbType", "derby"
|
||||
assert_match "Hive #{version}", shell_output("#{bin}/hive --version")
|
||||
assert_match "123", shell_output("#{bin}/hive -e 'SELECT 123'")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[
|
||||
"anjuta",
|
||||
"fdroidserver",
|
||||
"hive",
|
||||
"predictionio",
|
||||
"sqoop",
|
||||
"visp"
|
||||
|
|
Loading…
Reference in New Issue