Computing Block's range will miss some cell during blocking.
------------------------------------------------------------

                 Key: HAMA-130
                 URL: https://issues.apache.org/jira/browse/HAMA-130
             Project: Hama
          Issue Type: Bug
          Components: implementation
    Affects Versions: 0.1.0
            Reporter: Samuel Guo
            Assignee: Samuel Guo
            Priority: Critical
             Fix For: 0.1.0


As the code below, in *BlockingMapper*, we compute the block's col range in a 
loop. 
if the block's size can integer-divide the matrix' column size, it is right.
but if the block's size can not integer-divide the matrix' column size, some 
cells will be missed.

for (int i = 0; i < mBlockNum; i++) {
        startColumn = i * mBlockColSize;
        endColumn = startColumn + mBlockColSize - 1;
        output.collect(new BlockID(blkRow, i), new VectorWritable(key.get(),
            dv.subVector(startColumn, endColumn)));
}

for examples:
if the block num is 3,  the matrix is 100 * 100. mBlockSize = 100 / 3 = 33.
then <0 ~ 32>, <33 ~ 65>, <66 ~ 98> will be counted. At the same time we will 
lose column 99.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to