- PySpark Cookbook
- Denny Lee Tomasz Drabas
- 172字
- 2021-06-18 19:06:27
How to do it...
There are just truly two main requirements for installing PySpark: Java and Python. Additionally, you can also install Scala and R if you want to use those languages, and we will also check for Maven, which we will use to compile the Spark sources.
To do this, we will use the checkRequirements.sh script to check for all the requirements: the script is located in the Chapter01 folder from the GitHub repository.
The following code block shows the high-level portions of the script found in the Chapter01/checkRequirements.sh file. Note that some portions of the code were omitted here for brevity:
#!/bin/bash
# Shell script for checking the dependencies
#
# PySpark Cookbook
# Author: Tomasz Drabas, Denny Lee
# Version: 0.1
# Date: 12/2/2017
_java_required=1.8
_python_required=3.4
_r_required=3.1
_scala_required=2.11
_mvn_required=3.3.9
# parse command line arguments
_args_len="$#"
...
printHeader
checkJava
checkPython
if [ "${_check_R_req}" = "true" ]; then
checkR
fi
if [ "${_check_Scala_req}" = "true" ]; then
checkScala
fi
if [ "${_check_Maven_req}" = "true" ]; then
checkMaven
fi
推薦閱讀
- Learning Microsoft Windows Server 2012 Dynamic Access Control
- Go Web編程
- 精通Nginx(第2版)
- Flask Blueprints
- Practical Internet of Things Security
- BeagleBone Media Center
- Learning Linux Binary Analysis
- 編寫高質量代碼:改善C程序代碼的125個建議
- Magento 1.8 Development Cookbook
- CouchDB and PHP Web Development Beginner’s Guide
- STM32F0實戰:基于HAL庫開發
- 基于Swift語言的iOS App 商業實戰教程
- Getting Started with Greenplum for Big Data Analytics
- MySQL入門很輕松(微課超值版)
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)