Skip to Main Content
Hadoop数据分析
book

Hadoop数据分析

by Benjamin Bengfort, Jenny Kim
April 2018
Intermediate to advanced content levelIntermediate to advanced
229 pages
6h 19m
Chinese
Posts & Telecom Press
Content preview from Hadoop数据分析
32
3
本章将探讨使用
Hadoop Streaming
的细节,并创建一个小框架,从而使用
Python
快速编写
MapReduce
作业。本章将扩展在第
2
章中使用的简单
WordCount
程序,以便使用
Python
的第三方库进行自然语言处理(
natural language processing
NLP
);此外,还会编写一
个用于识别文本中重要短语(
bigram
)频率的
MapReduce
作业;最后,将讨论一些高级
MapReduce
主题,这对于如何理解
Hadoop
,以及如何将这些主题应用于
Python
编写的
Streaming
作业中至关重要。
3.1
 
Hadoop Streaming
Hadoop Streaming
是一个实用程序,被打包为
Hadoop MapReduce
发行版附带的
JAR
文件。
Streaming
作业像普通
Hadoop
作业一样,通过作业客户端传递到集群。但除了可以指定输
入和输出的
HDFS
路径的参数外,它还可以指定
mapper
reducer
的可执行程序。然后,
作业作为普通
MapReduce
作业运行,依然由
ResourceManager
MRAppMaster
管理和监控,
直到作业完成。
为了执行
MapReduce
业,
Streaming
利用标准
Unix
流进行输入和输出,因此得名
Streaming
mapper
reducer
的输入都是从 stdin 读取的,
Python
进程可以通过 sys 模块访
stdin
Hadoop
要求由
Python
编写的
mapper
reducer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kudu:构建高性能实时数据分析存储系统

Kudu:构建高性能实时数据分析存储系统

Jean-Marc Spaggiari, Mladen Kovacevic, Brock Noland, Ryan Bosshart
Java并发编程实战

Java并发编程实战

Brian Goetz, Tim Peierls
面向机器学习的自然语言标注

面向机器学习的自然语言标注

James Pustejovsky, Amber Stubbs

Publisher Resources

ISBN: 9787115479648