|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.clustering.spectral.VectorCache
public final class VectorCache
This class handles reading and writing vectors to the Hadoop distributed cache. Created as a result of Eigencuts' liberal use of such functionality, but available to any algorithm requiring it.
Method Summary | |
---|---|
static Vector |
load(org.apache.hadoop.conf.Configuration conf)
Loads the vector from DistributedCache . |
static Vector |
load(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input)
Loads a Vector from the specified path. |
static void |
save(org.apache.hadoop.io.Writable key,
Vector vector,
org.apache.hadoop.fs.Path output,
org.apache.hadoop.conf.Configuration conf)
Calls the save() method, setting the cache to overwrite any previous Path and to delete the path after exiting |
static void |
save(org.apache.hadoop.io.Writable key,
Vector vector,
org.apache.hadoop.fs.Path output,
org.apache.hadoop.conf.Configuration conf,
boolean overwritePath,
boolean deleteOnExit)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void save(org.apache.hadoop.io.Writable key, Vector vector, org.apache.hadoop.fs.Path output, org.apache.hadoop.conf.Configuration conf, boolean overwritePath, boolean deleteOnExit) throws IOException
key
- SequenceFile keyvector
- Vector to save, to be wrapped as VectorWritable
IOException
public static void save(org.apache.hadoop.io.Writable key, Vector vector, org.apache.hadoop.fs.Path output, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static Vector load(org.apache.hadoop.conf.Configuration conf) throws IOException
DistributedCache
. Returns null if no vector exists.
IOException
public static Vector load(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path input) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |