Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hama Wiki" for change notification.
The "SpMV" page has been changed by Mikalai Parafeniuk: http://wiki.apache.org/hama/SpMV?action=diff&rev1=12&rev2=13 }}} After that you should copy these files to HDFS. If you don't feel comfortable with HDFS please see [[http://hadoop.apache.org/common/docs/r0.20.0/hdfs_shell.html|this tutorial]]. After you have copied input matrix into `matrix-txt` and input vector into `vector-txt`, we are ready to start. The following code snippet shows, how you can multiply matrices in this mode. Explanations will be given below. {{{ - 1: jar hama-examples-0.6.0-SNAPSHOT.jar matrixtoseq /user/hduser/spmv/matrix-txt /user/hduser/spmv/matrix-seq sparse 4 - 2: bin/hama jar hama-examples-0.6.0-SNAPSHOT.jar matrixtoseq /user/hduser/spmv/vector-txt /user/hduser/spmv/vector-seq dense 4 - 3: bin/hama jar hama-examples-0.6.0-SNAPSHOT.jar spmv /user/hduser/spmv/matrix-seq /user/hduser/spmv/vector-seq /user/hduser/spmv/result-seq 4 - 4: ../hadoop/bin/hadoop dfs -rmr /user/hduser/spmv/result-seq/part - 5: bin/hama jar hama-examples-0.6.0-SNAPSHOT.jar matrixtotext /user/hduser/spmv/result-seq /user/hduser/spmv/result-txt - 6: ../hadoop/bin/hadoop dfs -cat /user/hduser/spmv/result-txt/part-00000 + 1: hama jar $HAMA_EXAMPLES matrixtoseq $SPMV/matrix-txt $SPMV/matrix-seq sparse 4 + 2: hama jar $HAMA_EXAMPLES matrixtoseq $SPMV/vector-txt $SPMV/vector-seq dense 4 + 3: hama jar $HAMA_EXAMPLES spmv $SPMV/matrix-seq $SPMV/vector-seq $SPMV/result-seq 4 + 4: hadoop dfs -rmr $SPMV/result-seq/part + 5: hama jar $HAMA_EXAMPLES matrixtotext $SPMV/result-seq $SPMV/result-txt + 6: hadoop dfs -cat $SPMV/result-txt/* 0 4 4 0 38.0 1 12.0 2 24.0 3 6.0 }}} Line 1: Converting input matrix to sequence file format, internally consisting of `SparseVectorWritable`.<<BR>>
