You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ed...@apache.org on 2008/12/08 08:45:39 UTC
svn commit: r724274 - in /incubator/hama/trunk: CHANGES.txt
src/java/org/apache/hama/DenseMatrix.java
src/test/org/apache/hama/TestDenseMatrix.java
Author: edwardyoon
Date: Sun Dec 7 23:45:38 2008
New Revision: 724274
URL: http://svn.apache.org/viewvc?rev=724274&view=rev
Log:
In random_mapred(), IntWritable(m) should be IntWritable(m-1) since start from 0.
Modified:
incubator/hama/trunk/CHANGES.txt
incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java
incubator/hama/trunk/src/test/org/apache/hama/TestDenseMatrix.java
Modified: incubator/hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/CHANGES.txt?rev=724274&r1=724273&r2=724274&view=diff
==============================================================================
--- incubator/hama/trunk/CHANGES.txt (original)
+++ incubator/hama/trunk/CHANGES.txt Sun Dec 7 23:45:38 2008
@@ -86,6 +86,8 @@
BUG FIXES
+ HAMA-126: In random_mapred, (m) should be (m-1)
+ since start from 0. (edwardyoon)
HAMA-116: ArrayIndexOutOfBoundsException at BlockingMapRed (samuel)
HAMA-112: DenseMatrix.get(i, j) should returns zero
when entry is null (edwardyoon)
Modified: incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java?rev=724274&r1=724273&r2=724274&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java Sun Dec 7 23:45:38 2008
@@ -283,7 +283,7 @@
if((i + 1) != conf.getNumMapTasks()) {
end = new IntWritable(((i * interval) + interval) - 1);
} else {
- end = new IntWritable(m);
+ end = new IntWritable(m - 1);
}
final SequenceFile.Writer writer = SequenceFile.createWriter(fs, jobConf,
file, IntWritable.class, IntWritable.class, CompressionType.NONE);
Modified: incubator/hama/trunk/src/test/org/apache/hama/TestDenseMatrix.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/test/org/apache/hama/TestDenseMatrix.java?rev=724274&r1=724273&r2=724274&view=diff
==============================================================================
--- incubator/hama/trunk/src/test/org/apache/hama/TestDenseMatrix.java (original)
+++ incubator/hama/trunk/src/test/org/apache/hama/TestDenseMatrix.java Sun Dec 7 23:45:38 2008
@@ -352,6 +352,8 @@
public void testRandomMatrixMapReduce() throws IOException {
DenseMatrix rand = DenseMatrix.random_mapred(conf, 20, 20);
+ assertEquals(rand.getRows(), 20);
+ assertEquals(rand.getColumns(), 20);
for(int i = 0; i < rand.getRows(); i++) {
for(int j = 0; j < rand.getColumns(); j++) {
assertTrue(rand.get(i, j) > -1);