| 2 | |
| 3 | * 測試 [http://homepage.mac.com/j.norstad/matrix-multiply/index.html A MapReduce Algorithm for Matrix Multiplication] 所提供之矩陣相乘範例 |
| 4 | * 發現會有 IOException 錯誤訊息,應該是在不正常時間點移除 /tmp/MatrixMultiply/out/_logs |
| 5 | {{{ |
| 6 | 10/05/10 15:23:23 INFO input.FileInputFormat: Total input paths to process : 1 |
| 7 | 10/05/10 15:23:23 INFO mapred.JobClient: Running job: job_201005101012_0016 |
| 8 | 10/05/10 15:23:24 INFO mapred.JobClient: map 0% reduce 0% |
| 9 | 10/05/10 15:23:33 INFO mapred.JobClient: map 100% reduce 0% |
| 10 | 10/05/10 15:23:45 INFO mapred.JobClient: map 100% reduce 100% |
| 11 | 10/05/10 15:23:47 INFO mapred.JobClient: Job complete: job_201005101012_0016 |
| 12 | .......... |
| 13 | Exception in thread "main" java.io.IOException: Cannot open filename /tmp/MatrixMultiply/out/_logs |
| 14 | at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.openInfo(DFSClient.java:1497) |
| 15 | }}} |
| 16 | * [解法] |
| 17 | {{{ |
| 18 | jazz@drbl:~/hadoop-0.20.2$ wget http://trac.nchc.org.tw/cloud/raw-attachment/wiki/jazz/10-05-10/matrix.tar.gz |
| 19 | jazz@drbl:~/hadoop-0.20.2$ tar zxvf matrix.tar.gz |
| 20 | jazz@drbl:~/hadoop-0.20.2$ cd matrix/ |
| 21 | jazz@drbl:~/hadoop-0.20.2/matrix$ ant |
| 22 | jazz@drbl:~/hadoop-0.20.2/matrix$ mv matrix.jar ../. |
| 23 | jazz@drbl:~/hadoop-0.20.2/matrix$ cd .. |
| 24 | jazz@drbl:~/hadoop-0.20.2$ bin/hadoop jar matrix.jar TestMatrixMultiply |
| 25 | }}} |