-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from Shopify/norm/[email protected]
Add apache hive @ 2.3.7
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class HiveAT237 < Formula | ||
desc "Hadoop-based data summarization, query, and analysis" | ||
homepage "https://hive.apache.org" | ||
url "https://archive.apache.org/dist/hive/hive-2.3.7/apache-hive-2.3.7-bin.tar.gz" | ||
sha256 "e55149b0ca1181931b0538d7012ac3b0e5b022bf26ed06fe1709cd2e5d2be5bb" | ||
|
||
depends_on "openjdk@11" | ||
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 | ||
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 | ||
end | ||
|
||
test do | ||
system bin/"schematool", "-initSchema", "-dbType", "derby" | ||
assert_match "Hive #{version}", shell_output("#{bin}/hive --version") | ||
end | ||
end |