Last active
May 14, 2019 17:32
-
-
Save ankitrm/a2b0d4592500f1a06f4d880d0754e692 to your computer and use it in GitHub Desktop.
Install Spark Version 2.4.0
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
class InstallSpark240 < Formula | |
desc "Engine for large-scale data processing" | |
homepage "https://spark.apache.org/" | |
url "https://archive.apache.org/dist/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz" | |
version "2.4.0" | |
sha256 "c93c096c8d64062345b26b34c85127a6848cff95a4bb829333a06b83222a5cfa" | |
head "https://github.com/apache/spark.git" | |
bottle :unneeded | |
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.write_exec_script Dir["#{libexec}/bin/*"] | |
end | |
test do | |
assert_match "Long = 1000", pipe_output(bin/"spark-shell", "sc.parallelize(1 to 1000).count()") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment