public final class VectorCache extends Object
Modifier and Type | Method and Description |
---|---|
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) |
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 VectorWritableIOException
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
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.