Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
Tài liệu giới thiệu các khái niệm cơ bản về lập trình Hadoop MapReduce bao gồm kiến trúc MapReduce, các định dạng vào/ra, tuần tự hóa Writable, và cấu hình Job.
正在生成预览...
Hadoop Programming Overview MapReduce Types Input Formats Output Formats Serialization Job http://hadoop.apache.org/docs/r2.2.0/api/or g/apache/hadoop/mapreduce/packagesummary.html Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT> Maps input key/value pairs to a set of intermediate key/value pairs. Maps are the individual tasks which transform input records into a intermediate records. The transformed intermediate records need not be of the same type as the input records. A given input pair may map to zero or many output pairs. The Hadoop Map-Reduce framework spawns one map task for each InputSplit generated by the InputFormat for the job. The framework first calls setup(org.apache.hadoop.mapreduce.Mapper.Context), followed by map(Object, Object, Context) for each key/value pair in the InputSplit. Finally cleanup(Context) is called. http://hadoop.apache.org/docs/r2.2.0/api/org/apache/hadoop/mapreduce/Mapper.ht ml public static class TokenizerMapper extends Mapper<Object, Text, Text, IntWritable>{ private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(Object key, Text value, Context context ) throws IOException, InterruptedException { StringTokenizer itr = new StringTokenizer(value.toString()); while (itr.hasMoreTokens()) { word.set(itr.nextToken()); context.write(word, one); } } } What is Writable? Hadoop defines its own “box” classes for strings (Text), integers (IntWritable), etc. All values are instances of Writable All keys are instances of WritableComparable Writable A serializable object which implements a simple, efficient, serialization protocol, based on DataInput and DataOutput. Any key or value type in the Hadoop Map-Reduce framework implements this interface. Implementations typically implement a static read(DataInput) method which constructs a new instance, calls readFields(DataInput) and returns the instance. http://hadoop.apache.org/docs/r2.2.0/api/or g/apache/hadoop
… 下载原始文件以阅读完整文档。
- 文档名称
- Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
- 学校 / 课程
- University of Maryland · Khai phá dữ liệu
- 内容
- Tài liệu này giới thiệu về lập trình Hadoop, tập trung vào mô hình MapReduce, các thành phần như Mapper, định dạng dữ liệu Writable, và cách cấu hình một Job MapReduce.
- 目录
- Overview
- Mapper
- What is Writable?
- Writable
- Getting Data To The Mapper
- 页数
- 33 页
- 上传者
- Giang Le
常见问题
此文档免费吗?
是的。“Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 33 页,适用于课程 Khai phá dữ liệu。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。

评论 (0)
暂无评论。快来抢沙发吧!