public final class TasteHadoopUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ITEM_ID_POS |
static int |
USER_ID_POS |
Modifier and Type | Method and Description |
---|---|
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
|
public static final int USER_ID_POS
public static final int ITEM_ID_POS
public static String[] splitPrefTokens(CharSequence line)
public static int idToIndex(long id)
public static int readID(String token, boolean usesLongIDs)
public static OpenIntLongHashMap readIDIndexMap(String idIndexPathStr, org.apache.hadoop.conf.Configuration conf)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.