Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
Génération de l'aperçu...
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.
Description
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
Résumé IA
- Nom du document
- Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
- École / Cours
- University of Maryland · Khai phá dữ liệu
- Contenu
- 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.
- Table des matières
- Overview
- Mapper
- What is Writable?
- Writable
- Getting Data To The Mapper
- Pages
- 33 pages
- Téléversé par
- Uni24h
Foire aux questions
Ce document est-il gratuit ?
Oui. « Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce) » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 33 pages, pour le cours Khai phá dữ liệu. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
Génération de l'aperçu...
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
Lire le document entier
- Nom du document
- Hadoop Programming (Khái niệm cơ bản về lập trình Hadoop MapReduce)
- École / Cours
- University of Maryland · Khai phá dữ liệu
- Contenu
- 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.
- Table des matières
- Overview
- Mapper
- What is Writable?
- Writable
- Getting Data To The Mapper
- Pages
- 33 pages
- Téléversé par
- Uni24h
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
Frequent Item Sets Association Rules (Tập phổ biến và Luật kết hợp)
Relational Data Processing on MapReduce (Xử lý dữ liệu quan hệ trên MapReduce)
Entity Resolution in the Web of Data (Phân giải thực thể trong Web dữ liệu)
IoT Data Analytics (Phân tích dữ liệu trong Internet vạn vật)
Introduction to Scalable Data Analytics using Apache Spark (Phân tích dữ liệu quy mô lớn sử dụng Apache Spark)
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 5.Thuyết tương đối - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 4. Tán xạ ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 3.Phân cực ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !