org.apache.mahout.cf.taste.hadoop
Class TasteHadoopUtils

java.lang.Object
  extended by org.apache.mahout.cf.taste.hadoop.TasteHadoopUtils

public final class TasteHadoopUtils
extends Object

Some helper methods for the hadoop-related stuff in org.apache.mahout.cf.taste


Field Summary
static int ITEM_ID_POS
           
static int USER_ID_POS
           
 
Method Summary
static int idToIndex(long id)
          Maps a long to an int with range of 0 to Integer.MAX_VALUE-1
static int readID(String token, boolean usesLongIDs)
           
static OpenIntLongHashMap readIDIndexMap(String idIndexPathStr, org.apache.hadoop.conf.Configuration conf)
          Reads a binary mapping file
static String[] splitPrefTokens(CharSequence line)
          Splits a preference data line into string tokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_ID_POS

public static final int USER_ID_POS
See Also:
Constant Field Values

ITEM_ID_POS

public static final int ITEM_ID_POS
See Also:
Constant Field Values
Method Detail

splitPrefTokens

public static String[] splitPrefTokens(CharSequence line)
Splits a preference data line into string tokens


idToIndex

public static int idToIndex(long id)
Maps a long to an int with range of 0 to Integer.MAX_VALUE-1


readID

public static int readID(String token,
                         boolean usesLongIDs)

readIDIndexMap

public static OpenIntLongHashMap readIDIndexMap(String idIndexPathStr,
                                                org.apache.hadoop.conf.Configuration conf)
Reads a binary mapping file



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