public final class DelegateGenerationManager extends Object implements GenerationManager
Manages one generation of the underlying recommender model. Input is read from a local file system, written to a local file system, and the intermediate model is stored on a local file system.
| Constructor and Description |
|---|
DelegateGenerationManager(File localInputDir) |
DelegateGenerationManager(String bucket,
String instanceID,
File localInputDir,
int partition,
net.myrrix.common.ReloadingReference<List<?>> allPartitions,
File licenseFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(long userID,
long itemID,
float value,
boolean bulk) |
void |
appendItemTag(String tag,
long itemID,
float value,
boolean bulk) |
void |
appendUserTag(long userID,
String tag,
float value,
boolean bulk) |
void |
bulkDone() |
void |
close() |
String |
getBucket()
Not used.
|
Generation |
getCurrentGeneration() |
String |
getInstanceID()
Not used.
|
void |
refresh() |
void |
remove(long userID,
long itemID,
boolean bulk) |
public DelegateGenerationManager(File localInputDir) throws IOException
localInputDir - local work directory from which input is read,
and to which additional input is written. The model file is stored here too. Input in CSV format can
be placed in this directory at any time. The file name should end in ".csv" and the file should
contain lines of the form "userID,itemID(,value)".IOExceptionpublic DelegateGenerationManager(String bucket, String instanceID, File localInputDir, int partition, net.myrrix.common.ReloadingReference<List<?>> allPartitions, File licenseFile) throws IOException
bucket - not used in local mode; required for API compatibility internallyinstanceID - not used in local mode; required for API compatibility internallylocalInputDir - local work directory from which input is read,
and to which additional input is written. The model file is stored here too. Input in CSV format can
be placed in this directory at any time. The file name should end in ".csv" and the file should
contain lines of the form "userID,itemID(,value)".partition - not used; required for API compatibility internallyallPartitions - not used; required for API compatibility internallylicenseFile - not used; required for API compatibility internallyIOExceptionpublic String getBucket()
getBucket in interface GenerationManagerpublic String getInstanceID()
getInstanceID in interface GenerationManagerpublic void append(long userID,
long itemID,
float value,
boolean bulk)
throws IOException
append in interface GenerationManagerIOExceptionpublic void appendUserTag(long userID,
String tag,
float value,
boolean bulk)
throws IOException
appendUserTag in interface GenerationManagerIOExceptionpublic void appendItemTag(String tag, long itemID, float value, boolean bulk) throws IOException
appendItemTag in interface GenerationManagerIOExceptionpublic void remove(long userID,
long itemID,
boolean bulk)
throws IOException
remove in interface GenerationManagerIOExceptionpublic void bulkDone()
throws IOException
bulkDone in interface GenerationManagerIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void refresh()
refresh in interface GenerationManagerpublic Generation getCurrentGeneration()
getCurrentGeneration in interface GenerationManagerCopyright © 2012-2013 Myrrix Ltd. All Rights Reserved.