|
24 | 24 |
|
25 | 25 | ### la commende d execution du program MapReduce en Pyhton :
|
26 | 26 |
|
27 |
| -`hadoop jar <chemain de fichier streaming.jar> |
28 |
| - -Dmaperd.reduce,tasks=1 |
29 |
| - -file <chemain du ficher map on Local> |
30 |
| - -mapper "python <chemain du ficher map on Local>" |
31 |
| - -file <chemain du ficher reduce on Local> |
32 |
| - -reducer "python <chemain du ficher reduce on Local>" |
33 |
| - -input <chemain du ficher input on HDFS> |
34 |
| - -output <chemain du ficher output on HDFS>` |
| 27 | +```bash |
| 28 | +hadoop jar <chemain de fichier streaming.jar> |
| 29 | +-Dmaperd.reduce,tasks=1 |
| 30 | +-file <chemain du ficher map on Local> |
| 31 | +-mapper "python <chemain du ficher map on Local>" |
| 32 | +-file <chemain du ficher reduce on Local> |
| 33 | +-reducer "python <chemain du ficher reduce on Local>" |
| 34 | +-input <chemain du ficher input on HDFS> |
| 35 | +-output <chemain du ficher output on HDFS> |
| 36 | +``` |
35 | 37 |
|
36 | 38 | ### exemple de commande :
|
37 | 39 |
|
38 | 40 |
|
39 |
| -`hadoop jar /usr/lib/hadoop-0.20-mapreduce/contrib/streaming/hadoop-streaming-2.6.0-mr1-cdh5.12.0.jar |
40 |
| - -Dmaperd.reduce,tasks=1 -file /home/cloudera/workspace/wordcount/mapper.py |
41 |
| - -mapper "python /home/cloudera/workspace/wordcount/mapper.py" |
42 |
| - -file /home/cloudera/workspace/wordcount/reducer.py |
43 |
| - -reducer "python /home/cloudera/workspace/wordcount/reducer.py" |
44 |
| - -input myinput/ -output out` |
| 41 | +```bash |
| 42 | +hadoop jar /usr/lib/hadoop-0.20-mapreduce/contrib/streaming/hadoop-streaming-2.6.0-mr1-cdh5.12.0.jar |
| 43 | +-Dmaperd.reduce,tasks=1 |
| 44 | +-file /home/cloudera/workspace/wordcount/mapper.py |
| 45 | +-mapper "python /home/cloudera/workspace/wordcount/mapper.py" |
| 46 | +-file /home/cloudera/workspace/wordcount/reducer.py |
| 47 | +-reducer "python /home/cloudera/workspace/wordcount/reducer.py" |
| 48 | +-input myinput/ |
| 49 | +-output out |
| 50 | +``` |
45 | 51 |
|
46 | 52 |
|
0 commit comments