Cloud
Cloud

Reputation: 199

How to running Matrix based on Hadoop 1.2.1

I was running the MapReduce Matrix Multiplication.java program found at http://www.norstad.org/matrix-multiply/index.html.

First:
$javac -classpath /usr/local/hadoop/hadoop-core-1.2.1.jar:/usr/local/hadoop/lib/commons-cli-1.2.jar -d Matrix MatrixMultiply.java

$jar -cvf Matrix.jar -C Matrix .

Second:
$/usr/local/hadoop/bin/hadoop dfs -put MatrixA MA
$/usr/local/hadoop/bin/hadoop dfs -put MatrixB MB

/MA/A.txt
0 0 0
0 1 6
7 8 9
/MB/B.txt
6 7 4
9 1 3
7 6 2

Finally:
$/usr/local/hadoop/bin/hadoop jar MatrixMultiply.jar org/apache/hadoop/examples/MatrixMultiply /MA /MB /output /tempDirPath 1 2 2 3 3 3 3 3 3

But can't working, what I missed detail?

Upvotes: 0

Views: 171

Answers (1)

USB
USB

Reputation: 6149

Hope this helps you.

Matrix Multiplication

There is a little difference in input file. Your input file should contain both the matrix labeled with matrix name,row,col and the element.

Upvotes: 0

Related Questions