## org.apache.mahout.cf.taste.hadoop
Class ToItemPrefsMapper

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,VarLongWritable,VarLongWritable>
          org.apache.mahout.cf.taste.hadoop.ToEntityPrefsMapper
              org.apache.mahout.cf.taste.hadoop.ToItemPrefsMapper

    public final class ToItemPrefsMapper

extends ToEntityPrefsMapper

# Input

Intended for use with `TextInputFormat`; accepts line number / line pairs as `LongWritable`/`Text` pairs.

Each line is assumed to be of the form `userID,itemID,preference`, or `userID,itemID`.

# Output

Outputs the user ID as a `VarLongWritable` mapped to the item ID and preference as a `EntityPrefWritable`.

Nested Class Summary

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

Field Summary

Fields inherited from class org.apache.mahout.cf.taste.hadoop.ToEntityPrefsMapper
`RATING_SHIFT, TRANSPOSE_USER_ITEM`

Constructor Summary
`ToItemPrefsMapper()`

Method Summary

Methods inherited from class org.apache.mahout.cf.taste.hadoop.ToEntityPrefsMapper
`map, setup`

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

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

Constructor Detail

### ToItemPrefsMapper

    public ToItemPrefsMapper()

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