Last active
May 26, 2018 09:29
-
-
Save raecoo/11d94ffab9cd633e101d0143fb73804c to your computer and use it in GitHub Desktop.
Brew install Apache Spark 2.2.0
This file contains hidden or 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
# override the file /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/apache-spark.rb as following content. | |
# Ref: https://stackoverflow.com/questions/49808951/how-to-install-apache-spark-2-2-0-with-homebrew-on-mac | |
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.2.0/spark-2.2.0-bin-hadoop2.7.tgz" | |
version "2.2.0" | |
sha256 "97fd2cc58e08975d9c4e4ffa8d7f8012c0ac2792bcd9945ce2a561cf937aebcc" | |
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