31 lines
1005 B
Ruby
31 lines
1005 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-3.0.2/spark-3.0.2-bin-hadoop3.2.tgz"
|
|
mirror "https://archive.apache.org/dist/spark/spark-3.0.2/spark-3.0.2-bin-hadoop3.2.tgz"
|
|
version "3.0.2"
|
|
sha256 "3c31a41a11a69b6e4639f0afd66c7eb8dc08ef680679139a544205915be6db4d"
|
|
license "Apache-2.0"
|
|
head "https://github.com/apache/spark.git"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk@11"
|
|
|
|
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", JAVA_HOME: Formula["openjdk@11"].opt_prefix)
|
|
end
|
|
|
|
test do
|
|
assert_match "Long = 1000",
|
|
pipe_output(bin/"spark-shell --conf spark.driver.bindAddress=127.0.0.1",
|
|
"sc.parallelize(1 to 1000).count()")
|
|
end
|
|
end
|