## org.apache.mahout.math.hadoop.stochasticsvd
Class ABtDenseOutJob.ABtMapper

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,VectorWritable,SplitPartitionedWritable,DenseBlockWritable>
          org.apache.mahout.math.hadoop.stochasticsvd.ABtDenseOutJob.ABtMapper

Enclosing class:
  ABtDenseOutJob

    public static class ABtDenseOutJob.ABtMapper

extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,VectorWritable,SplitPartitionedWritable,DenseBlockWritable>

So, here, i preload A block into memory.

A sparse matrix seems to be ideal for that but there are two reasons why i am not using it:

- 1) I don't know the full block height. so i may need to reallocate it from time to time. Although this probably not a showstopper.
- 2) I found that RandomAccessSparseVectors seem to take much more memory than the SequentialAccessSparseVectors.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
`org.apache.hadoop.mapreduce.Mapper.Context`

Field Summary
`protected Vector` `sq`
`protected Vector` `xi`

Constructor Summary
`ABtDenseOutJob.ABtMapper()`

Method Summary
`protected void` `cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)`
`protected void` `map(org.apache.hadoop.io.Writable key, VectorWritable value, org.apache.hadoop.mapreduce.Mapper.Context context)`
`protected void` `setup(org.apache.hadoop.mapreduce.Mapper.Context context)`

Methods inherited from class org.apache.hadoop.mapreduce.Mapper
`run`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### xi

    protected Vector xi

### sq

    protected Vector sq

Constructor Detail

### ABtDenseOutJob.ABtMapper

    public ABtDenseOutJob.ABtMapper()

Method Detail

### map

    protected void map(org.apache.hadoop.io.Writable key,
                       VectorWritable value,
                       org.apache.hadoop.mapreduce.Mapper.Context context)
                throws IOException,
                       InterruptedException

  Overrides:
    `map` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,VectorWritable,SplitPartitionedWritable,DenseBlockWritable>`
  Throws:
    `IOException`
    `InterruptedException`

### cleanup

    protected void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
                    throws IOException,
                           InterruptedException

  Overrides:
    `cleanup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,VectorWritable,SplitPartitionedWritable,DenseBlockWritable>`
  Throws:
    `IOException`
    `InterruptedException`

### setup

    protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
                  throws IOException,
                         InterruptedException

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,VectorWritable,SplitPartitionedWritable,DenseBlockWritable>`
  Throws:
    `IOException`
    `InterruptedException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.