December 2016
Beginner to intermediate
392 pages
8h 13m
English
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Both spark-shell and PySpark are available in the bin directory of SPARK_HOME, that is, SPARK_HOME/bin"
A block of code is set as follows:
from pyspark
import SparkContext
stocks = "hdfs://namenode:9000/stocks.txt"
sc = SparkContext("<master URI>", "ApplicationName")
data = sc.textFile(stocks)
totalLines = data.count()
print("Total Lines are: %i" % (totalLines))Any command-line input or output ...
Read now
Unlock full access