public class PersistManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PersistManager.PersistStatsEntry |
static class |
PersistManager.Schemes
Persistence schemes; used as file prefixes eg "hdfs://some_hdfs_path/some_file"
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BACKENDS |
Constructor and Description |
---|
PersistManager(java.net.URI iceRoot) |
Modifier and Type | Method and Description |
---|---|
Key |
anyURIToKey(java.net.URI uri)
Convert given URI into a specific H2O key representation.
|
java.util.List<java.lang.String> |
calcTypeaheadMatches(java.lang.String filter,
int limit)
Calculate typeahead matches for src
|
java.io.OutputStream |
create(java.lang.String path,
boolean overwrite) |
void |
delete(int backend,
Value v) |
boolean |
delete(java.lang.String path) |
boolean |
exists(java.lang.String path) |
java.lang.String |
getHdfsHomeDirectory() |
Persist |
getIce()
Get the current Persist flavor for user-mode swapping.
|
Persist |
getPersistForURI(java.net.URI uri) |
PersistManager.PersistStatsEntry[] |
getStats() |
void |
importFiles(java.lang.String path,
java.util.ArrayList<java.lang.String> files,
java.util.ArrayList<java.lang.String> keys,
java.util.ArrayList<java.lang.String> fails,
java.util.ArrayList<java.lang.String> dels)
From a path produce a list of files and keys for parsing.
|
static boolean |
isHdfsPath(java.lang.String path) |
long |
length(java.lang.String path) |
Persist.PersistEntry[] |
list(java.lang.String path) |
byte[] |
load(int backend,
Value v) |
boolean |
mkdirs(java.lang.String path) |
java.io.InputStream |
open(java.lang.String path) |
boolean |
rename(java.lang.String fromPath,
java.lang.String toPath) |
void |
store(int backend,
Value v) |
public static final int MAX_BACKENDS
public PersistManager.PersistStatsEntry[] getStats()
public static boolean isHdfsPath(java.lang.String path)
public void store(int backend, Value v) throws java.io.IOException
java.io.IOException
public void delete(int backend, Value v)
public byte[] load(int backend, Value v) throws java.io.IOException
java.io.IOException
public Persist getIce()
public final Key anyURIToKey(java.net.URI uri) throws java.io.IOException
uri
- file locationjava.io.IOException
- in the case of uri conversion problemH2OIllegalArgumentException
- in case of unsupported schemepublic java.util.List<java.lang.String> calcTypeaheadMatches(java.lang.String filter, int limit)
filter
- Source string to match for typeaheadlimit
- Max number of entries to returnpublic void importFiles(java.lang.String path, java.util.ArrayList<java.lang.String> files, java.util.ArrayList<java.lang.String> keys, java.util.ArrayList<java.lang.String> fails, java.util.ArrayList<java.lang.String> dels)
path
- (Input) Path to import data fromfiles
- (Output) List of files foundkeys
- (Output) List of keys corresponding to filesfails
- (Output) List of failed files which mismatch among nodesdels
- (Output) I don't know what this ispublic java.lang.String getHdfsHomeDirectory()
public Persist.PersistEntry[] list(java.lang.String path)
public boolean exists(java.lang.String path)
public long length(java.lang.String path)
public java.io.InputStream open(java.lang.String path)
public boolean mkdirs(java.lang.String path)
public boolean rename(java.lang.String fromPath, java.lang.String toPath)
public java.io.OutputStream create(java.lang.String path, boolean overwrite)
public boolean delete(java.lang.String path)
public Persist getPersistForURI(java.net.URI uri)