26 lines
819 B
Ruby
26 lines
819 B
Ruby
class ApacheSpark < Formula
|
|
desc "Engine for large-scale data processing"
|
|
homepage "https://spark.apache.org/"
|
|
url "https://www.apache.org/dyn/closer.lua?path=spark/spark-2.3.1/spark-2.3.1-bin-hadoop2.7.tgz"
|
|
version "2.3.1"
|
|
sha256 "e87499e5417a64341cbda25e087632dd9f6ce7ad249dfeba47d9d02a51305fc2"
|
|
head "https://github.com/apache/spark.git"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.8"
|
|
|
|
def install
|
|
# Rename beeline to distinguish it from hive's beeline
|
|
mv "bin/beeline", "bin/spark-beeline"
|
|
|
|
rm_f Dir["bin/*.cmd"]
|
|
libexec.install Dir["*"]
|
|
bin.install Dir[libexec/"bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8"))
|
|
end
|
|
|
|
test do
|
|
assert_match "Long = 1000", pipe_output(bin/"spark-shell", "sc.parallelize(1 to 1000).count()")
|
|
end
|
|
end
|