FILE_SEPARATOR, ROOT_DIRECTORY
Modifier and Type | Method and Description |
---|---|
void |
copyFromLocal(String fromLocation,
String toLocation) |
void |
copyToLocal(String fromLocation,
String toLocation) |
boolean |
cp(String sourceLocation,
String targetLocation)
Recursively copy all the data sources from the source location to the target location.
|
boolean |
exists(String location)
Determine whether the specified location has a data source.
|
Iterator<Vertex> |
head(String location,
Class readerClass,
int totalLines)
Get the vertices at the specified graph location.
|
Iterator<String> |
head(String location,
int totalLines)
Get a string representation of the specified number of lines at the data source location.
|
<K,V> Iterator<KeyValue<K,V>> |
head(String location,
String memoryKey,
Class readerClass,
int totalLines)
Get the
KeyValue data at the specified memory location. |
List<String> |
ls()
List all the data sources in the root directory.
|
List<String> |
ls(String pattern)
List all the files (e.g.
|
void |
mergeToLocal(String fromLocation,
String toLocation) |
boolean |
mkdir(String location) |
static FileSystemStorage |
open() |
static FileSystemStorage |
open(Configuration configuration) |
static FileSystemStorage |
open(FileSystem fileSystem) |
boolean |
rm(String location)
Recursively remove the file (data source) at the specified location.
|
String |
toString() |
public static FileSystemStorage open()
public static FileSystemStorage open(Configuration configuration)
public static FileSystemStorage open(FileSystem fileSystem)
public List<String> ls()
Storage
ls
in interface Storage
Storage.ls(String)
public List<String> ls(String pattern)
Storage
ls
in interface Storage
pattern
- non-null pattern specifying a set of files and directories. Cases:public boolean mkdir(String location)
public boolean cp(String sourceLocation, String targetLocation)
Storage
cp
in interface Storage
sourceLocation
- non-null pattern specifying a set of files and directories. Cases:targetLocation
- non-null directory where to copy topublic boolean exists(String location)
Storage
exists
in interface Storage
location
- non-null pattern specifying a set of files and directories. Examples:public boolean rm(String location)
Storage
rm
in interface Storage
location
- non-null pattern specifying a set of files and directories. Examples:public Iterator<String> head(String location, int totalLines)
Storage
public Iterator<Vertex> head(String location, Class readerClass, int totalLines)
Storage
head
in interface Storage
location
- the location of the graph (or the root location and search will be made)readerClass
- the class of the parser that understands the graph formattotalLines
- the total number of lines of the graph to returnpublic <K,V> Iterator<KeyValue<K,V>> head(String location, String memoryKey, Class readerClass, int totalLines)
Storage
KeyValue
data at the specified memory location.Copyright © 2013–2021 Apache Software Foundation. All rights reserved.