FILE_SEPARATOR, ROOT_DIRECTORY
Modifier and Type | Method and Description |
---|---|
boolean |
cp(String sourceLocation,
String targetLocation)
Recursively copy all the data sources from the source location to the target location.
|
String |
describe(String 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.
|
static SparkContextStorage |
open() |
static SparkContextStorage |
open(Configuration configuration) |
static SparkContextStorage |
open(SparkContext sparkContext) |
static SparkContextStorage |
open(String master) |
boolean |
rm(String pattern)
Recursively remove the file (data source) at the specified location.
|
String |
toString() |
public static SparkContextStorage open()
public static SparkContextStorage open(String master)
public static SparkContextStorage open(Configuration configuration)
public static SparkContextStorage open(SparkContext sparkContext)
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 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 pattern)
Storage
rm
in interface Storage
pattern
- non-null pattern specifying a set of files and directories. Examples: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.public Iterator<String> head(String location, int totalLines)
Storage
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.