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.1.1/spark-3.1.1-bin-hadoop3.2.tgz"
|
|
mirror "https://archive.apache.org/dist/spark/spark-3.1.1/spark-3.1.1-bin-hadoop3.2.tgz"
|
|
version "3.1.1"
|
|
sha256 "814ad7da8b57e6b62e6ffb54c6f7292823e8eb76c5c1bb1cd97a57c477ee8f07"
|
|
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
|