关于我们
![]() ![]() |
Spark数据分析:基于Python语言(英文版) 定 价:¥79 中 教 价:¥60.83 (7.70折) 库 存 数: 0
本书重点关注Spark项目的基本知识,从Spark核心开始,然后拓展到各种Spark扩展、Spark相关项目、Spark子项目,以及Spark所处的丰富的生态系统里各种别的开源技术,比如Hadoop、Kafka、Cassandra等。
第一部分 Spark基础
第1章 大数据、Hadoop、Spark介绍 3 1.1 大数据、分布式计算、Hadoop简介 3 1.1.1 大数据与Hadoop简史 4 1.1.2 Hadoop详解 5 1.2 Apache Spark简介 11 1.2.1 Apache Spark背景 11 1.2.2 Spark的用途 12 1.2.3 Spark编程接口 12 1.2.4 Spark程序的提交类型 12 1.2.5 Spark应用程序的输入输出类型 14 1.2.6 Spark中的RDD 14 1.2.7 Spark与Hadoop 14 1.3 Python函数式编程 15 1.3.1 Python函数式编程用到的数据结构 15 1.3.2 Python对象序列化 18 1.3.3 Python函数式编程基础 21 1.4 本章小结 23 第2章 部署Spark 25 2.1 Spark部署模式 25 2.1.1 本地模式 26 2.1.2 Spark独立集群 26 2.1.3 基于YARN运行Spark 27 2.1.4 基于Mesos运行Spark 28 2.2 准备安装Spark 28 2.3 获取Spark 29 2.4 在Linux或Mac OS X上安装Spark 30 2.5 在Windows上安装Spark 32 2.6 探索Spark安装目录 34 2.7 部署多节点的Spark独立集群 35 2.8 在云上部署Spark 37 2.8.1 AWS 37 2.8.2 GCP 39 2.8.3 Databricks 40 2.9 本章小结 41 第3章 理解Spark集群架构 43 3.1 Spark应用中的术语 43 3.1.1 Spark驱动器 44 3.1.2 Spark工作节点与执行器 47 3.1.3 Spark主进程与集群管理器 49 3.2 使用独立集群的Spark应用 51 3.3 在YARN上运行Spark应用的部署模式 51 3.3.1 客户端模式 52 3.3.2 集群模式 53 3.3.3 回顾本地模式 54 3.4 本章小结 55 第4章 Spark编程基础 57 4.1 RDD简介 57 4.2 加载数据到RDD 59 4.2.1 从文件创建RDD 59 4.2.2 从文本文件创建RDD的方法 61 4.2.3 从对象文件创建RDD 64 4.2.4 从数据源创建RDD 64 4.2.5 从JSON文件创建RDD 67 4.2.6 通过编程创建RDD 69 4.3 RDD操作 70 4.3.1 RDD核心概念 70 4.3.2 基本的RDD转化操作 75 4.3.3 基本的RDD行动操作 79 4.3.4 键值对RDD的转化操作 83 4.3.5 MapReduce与单词计数练习 90 4.3.6 连接操作 93 4.3.7 在Spark中连接数据集 98 4.3.8 集合操作 101 4.3.9 数值型RDD的操作 103 4.4 本章小结 106 第二部分 基础拓展 第5章 Spark核心API高级编程 109 5.1 Spark中的共享变量 109 5.1.1 广播变量 110 5.1.2 累加器 114 5.1.3 练习:使用广播变量和累加器 117 5.2 Spark中的数据分区 118 5.2.1 分区概述 118 5.2.2 掌控分区 119 5.2.3 重分区函数 121 5.2.4 针对分区的API方法 123 5.3 RDD的存储选项 125 5.3.1 回顾RDD谱系 125 5.3.2 RDD存储选项 126 5.3.3 RDD缓存 129 5.3.4 持久化RDD 129 5.3.5 选择何时持久化或缓存RDD 132 5.3.6 保存RDD检查点 132 5.3.7 练习:保存RDD检查点 134 5.4 使用外部程序处理RDD 136 5.5 使用Spark进行数据采样 137 5.6 理解Spark应用与集群配置 139 5.6.1 Spark环境变量 139 5.6.2 Spark配置属性 143 5.7 Spark优化 146 5.7.1 早过滤,勤过滤 147 5.7.2 优化满足结合律的操作 147 5.7.3 理解函数和闭包的影响 149 5.7.4 收集数据的注意事项 150 5.7.5 使用配置参数调节和优化应用 150 5.7.6 避免低效的分区 151 5.7.7 应用性能问题诊断 153 5.8 本章小结 157 第6章 使用Spark进行SQL与NoSQL编程 159 6.1 Spark SQL简介 159 6.1.1 Hive简介 160 6.1.2 Spark SQL架构 164 6.1.3 DataFrame入门 166 6.1.4 使用DataFrame 177 6.1.5 DataFrame缓存、持久化与重新分区 185 6.1.6 保存DataFrame输出 186 6.1.7 访问Spark SQL 189 6.1.8 练习:使用Spark SQL 192 6.2 在Spark中使用NoSQL系统 193 6.2.1 NoSQL简介 194 6.2.2 在Spark中使用HBase 195 6.2.3 练习:在Spark中使用HBase 198 6.2.4 在Spark中使用Cassandra 200 6.2.5 在Spark中使用DynamoDB 202 6.2.6 其他NoSQL平台 204 6.3 本章小结 204 第7章 使用Spark处理流数据与消息 207 7.1 Spark Streaming简介 207 7.1.1 Spark Streaming架构 208 7.1.2 DStream简介 209 7.1.3 练习:Spark Streaming入门 216 7.1.4 状态操作 217 7.1.5 滑动窗口操作 219 7.2 结构化流处理 221 7.2.1 结构化流处理数据源 222 7.2.2 结构化流处理的数据输出池 223 7.2.3 输出模式 224 7.2.4 结构化流处理操作 225 7.3 在Spark中使用消息系统 226 7.3.1 Apache Kafka 227 7.3.2 练习:在Spark中使用Kafka 232 7.3.3 亚马逊Kinesis 235 7.4 本章小结 238 第8章 Spark数据科学与机器学习简介 241 8.1 Spark与R语言 241 8.1.1 R语言简介 242 8.1.2 通过R语言使用Spark 248 8.1.3 练习:在RStudio中使用SparkR 255 8.2 Spark机器学习 257 8.2.1 机器学习基础 257 8.2.2 使用Spark MLlib进行机器学习 260 8.2.3 练习:使用Spark MLlib实现推荐器 265 8.2.4 使用Spark ML进行机器学习 269 8.3 利用笔记本使用Spark 273 8.3.1 利用Jupyter(IPython)笔记本使用Spark 273 8.3.2 利用Apache Zeppelin笔记本使用Spark 276 8.4 本章小结 277 Contents I: Spark Foundations 1 Introducing Big Data, Hadoop, and Spark 3 Introduction to Big Data, Distributed Computing, and Hadoop 3 A Brief History of Big Data and Hadoop 4 Hadoop Explained 5 Introduction to Apache Spark 11 Apache Spark Background 11 Uses for Spark 12 Programming Interfaces to Spark 12 Submission Types for Spark Programs 12 Input/Output Types for Spark Applications 14 The Spark RDD 14 Spark and Hadoop 14 Functional Programming Using Python 15 Data Structures Used in Functional Python Programming 15 Python Object Serialization 18 Python Functional Programming Basics 21 Summary 23 2 Deploying Spark 25 Spark Deployment Modes 25 Local Mode 26 Spark Standalone 26 Spark on YARN 27 Spark on Mesos 28 Preparing to Install Spark 28 Getting Spark 29 Installing Spark on Linux or Mac OS X 30 Installing Spark on Windows 32 Exploring the Spark Installation 34 Deploying a Multi-Node Spark Standalone Cluster 35 Deploying Spark in the Cloud 37 Amazon Web Services (AWS) 37 Google Cloud Platform (GCP) 39 Databricks 40Summary 41 3 Understanding the Spark Cluster Architecture 43 Anatomy of a Spark Application 43 Spark Driver 44 Spark Workers and Executors 47 The Spark Master and Cluster Manager 49 Spark Applications Using the Standalone Scheduler 51 Deployment Modes for Spark Applications Running on YARN 51 Client Mode 52 Cluster Mode 53 Local Mode Revisited 54 Summary 55 4 Learning Spark Programming Basics 57 Introduction to RDDs 57 Loading Data into RDDs 59 Creating an RDD from a File or Files 59 Methods for Creating RDDs from a Text File or Files 61 Creating an RDD from an Object File 64 Creating an RDD from a Data Source 64 Creating RDDs from JSON Files 67 Creating an RDD Programmatically 69 Operations on RDDs 70 Key RDD Concepts 70 Basic RDD Transformations 75 Basic RDD Actions 79 Transformations on PairRDDs 83 MapReduce and Word Count Exercise 90 Join Transformations 93 Joining Datasets in Spark 98 Transformations on Sets 101 Transformations on Numeric RDDs 103 Summary 106 II: Beyond the Basics 5 Advanced Programming Using the Spark Core API 109 Shared Variables in Spark 109 Broadcast Variables 110 Accumulators 114 Exercise: Using Broadcast Variables and Accumulators 117 Partitioning Data in Spark 118 Partitioning Overview 118 Controlling Partitions 119 Repartitioning Functions 121 Partition-Specific or Partition-Aware API Methods 123 RDD Storage Options 125 RDD Lineage Revisited 125 RDD Storage Options 126 RDD Caching 129 Persisting RDDs 129 Choosing When to Persist or Cache RDDs 132 Checkpointing RDDs 132 Exercise: Checkpointing RDDs 134 Processing RDDs with External Programs 136 Data Sampling with Spark 137 Understanding Spark Application and Cluster Configuration 139 Spark Environment Variables 139 Spark Configuration Properties 143 Optimizing Spark 146 Filter Early, Filter Often 147 Optimizing Associative Operations 147 Understanding the Impact of Functions and Closures 149 Considerations for Collecting Data 150 Configuration Parameters for Tuning and Optimizing Applications 150 Avoiding Inefficient Partitioning 151 Diagnosing Application Performance Issues 153 Summary 157 6 SQL and NoSQL Programming with Spark 159 Introduction to Spark SQL 159 Introduction to Hive 160Spark SQL Architecture 164 Getting Started with DataFrames 166 Using DataFrames 177 Caching, Persisting, and Repartitioning DataFrames 185 Saving DataFrame Output 186 Accessing Spark SQL 189 Exercise: Using Spark SQL 192 Using Spark with NoSQL Systems 193 Introduction to NoSQL 194 Using Spark with HBase 195 Exercise: Using Spark with HBase 198 Using Spark with Cassandra 200 Using Spark with DynamoDB 202 Other NoSQL Platforms 204 Summary 204 7 Stream Processing and Messaging Using Spark 207 Introducing Spark Streaming 207 Spark Streaming Architecture 208 Introduction to DStreams 209 Exercise: Getting Started with Spark Streaming 216 State Operations 217 Sliding Window Operations 219 Structured Streaming 221 Structured Streaming Data Sources 222 Structured Streaming Data Sinks 223 Output Modes 224 Structured Streaming Operations 225 Using Spark with Messaging Platforms 226 Apache Kafka 227 Exercise: Using Spark with Kafka 232 Amazon Kinesis 235 Summary 238 8 Introduction to Data Science and Machine Learning Using Spark 241 Spark and R 241 Introduction to R 242 Using Spark with R 248 Exercise: Using RStudio with SparkR 255 Machine Learning with Spark 257 Machine Learning Primer 257 Machine Learning Using Spark MLlib 260 Exercise: Implementing a Recommender Using Spark MLlib 265 Machine Learning Using Spark ML 269 Using Notebooks with Spark 273 Using Jupyter (IPython) Notebooks with Spark 273 Using Apache Zeppelin Notebooks with Spark 276 Summary 277
你还可能感兴趣
我要评论
|