| 1 | [[PageOutline]] |
| 2 | |
| 3 | = 實作二: HDFS 指令操作練習 = |
| 4 | |
| 5 | == 前言 == |
| 6 | |
| 7 | * 此部份接續實做一 |
| 8 | |
| 9 | == Content 1. 基本操作 == |
| 10 | === 1.1 瀏覽你HDFS目錄 === |
| 11 | |
| 12 | === 1.2 上傳資料到HDFS目錄 === |
| 13 | |
| 14 | === 1.3 下載HDFS的資料到本地目錄 === |
| 15 | |
| 16 | == Content 2. Hadoop 運算命令 == |
| 17 | |
| 18 | === 2.1 Hadoop運算命令 grep === |
| 19 | |
| 20 | === 2.2 Hadoop運算命令 WordCount === |
| 21 | |
| 22 | === 2.3 更多運算命令 == |
| 23 | 請參考 [http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/examples/package-summary.html org.apache.hadoop.examples] |
| 24 | |
| 25 | || || || |
| 26 | || AggregateWordCount || This is an example Aggregated Hadoop Map/Reduce application. || |
| 27 | || AggregateWordCount.WordCountPlugInClass || || |
| 28 | || AggregateWordHistogram || This is an example Aggregated Hadoop Map/Reduce application. || |
| 29 | || AggregateWordHistogram.AggregateWordHistogramPlugin || || |
| 30 | || DBCountPageView || This is a demonstrative program, which uses DBInputFormat for reading the input data from a database, and DBOutputFormat for writing the data to the database. || |
| 31 | || ExampleDriver || A description of an example program based on its class and a human-readable description. || |
| 32 | || Grep || || |
| 33 | || Join || This is the trivial map/reduce program that does absolutely nothing other than use the framework to fragment and sort the input values. || |
| 34 | || MultiFileWordCount || MultiFileWordCount is an example to demonstrate the usage of MultiFileInputFormat. || |
| 35 | || MultiFileWordCount.MapClass || This Mapper is similar to the one in WordCount.MapClass. || |
| 36 | || MultiFileWordCount.MultiFileLineRecordReader || RecordReader is responsible from extracting records from the InputSplit. || |
| 37 | || MultiFileWordCount.MyInputFormat || To use MultiFileInputFormat, one should extend it, to return a (custom) RecordReader. || |
| 38 | || MultiFileWordCount.WordOffset || This record keeps <filename,offset> pairs. || |
| 39 | || PiEstimator || A Map-reduce program to estimaate the valu eof Pi using monte-carlo method. || |
| 40 | || PiEstimator.PiMapper || Mappper class for Pi estimation. |
| 41 | PiEstimator.PiReducer || |
| 42 | || RandomTextWriter || This program uses map/reduce to just run a distributed job where there is no interaction between the tasks and each task writes a large unsorted random sequence of words. || |
| 43 | || RandomWriter || This program uses map/reduce to just run a distributed job where there is no interaction between the tasks and each task write a large unsorted random binary sequence file of BytesWritable. || |
| 44 | || SleepJob || Dummy class for testing MR framefork. || |
| 45 | || Sort<K,V> || This is the trivial map/reduce program that does absolutely nothing other than use the framework to fragment and sort the input values. || |
| 46 | || WordCount || This is an example Hadoop Map/Reduce application. || |
| 47 | || WordCount.MapClass || Counts the words in each line. || |
| 48 | || WordCount.Reduce || A reducer class that just emits the sum of the input values. || |
| 49 | |
| 50 | |
| 51 | == Content 6. 使用網頁Gui == |
| 52 | |
| 53 | == 練習 == |
| 54 | |
| 55 | |