- PySpark Cookbook
- Denny Lee Tomasz Drabas
- 109字
- 2021-06-18 19:06:30
How to do it...
To install from the binaries, we only need four steps (see the following source code) as we do not need to compile the sources:
- Download the precompiled binaries from Spark's website.
- Unpack the archive.
- Move to the final destination.
- Create the necessary environmental variables.
The skeleton for our code looks as follows (see the Chapter01/installFromBinary.sh file):
#!/bin/bash
# Shell script for installing Spark from binaries
#
# PySpark Cookbook
# Author: Tomasz Drabas, Denny Lee
# Version: 0.1
# Date: 12/2/2017
_spark_binary="http://mirrors.ocf.berkeley.edu/apache/spark/spark-2.3.1/spark-2.3.1-bin-hadoop2.7.tgz"
_spark_archive=$( echo "$_spark_binary" | awk -F '/' '{print $NF}' )
_spark_dir=$( echo "${_spark_archive%.*}" )
_spark_destination="/opt/spark"
...
checkOS
printHeader
downloadThePackage
unpack
moveTheBinaries
setSparkEnvironmentVariables
cleanUp
推薦閱讀
- Vue.js 3.x快速入門
- HTML5移動Web開發技術
- SoapUI Cookbook
- GraphQL學習指南
- 軟件工程
- PySide 6/PyQt 6快速開發與實戰
- MySQL從入門到精通(軟件開發視頻大講堂)
- Orchestrating Docker
- Oracle Data Guard 11gR2 Administration Beginner's Guide
- NGUI for Unity
- PostgreSQL 12 High Availability Cookbook
- Getting Started with RethinkDB
- HTML5/CSS3/JavaScript技術大全
- SAP HANA Starter
- Node.js進階之路