public class GraphLoader
extends java.lang.Object
Graph
s from files.Constructor and Description |
---|
GraphLoader() |
Modifier and Type | Method and Description |
---|---|
static Graph<java.lang.Object,java.lang.Object> |
edgeListFile(SparkContext sc,
java.lang.String path,
boolean canonicalOrientation,
int numEdgePartitions,
StorageLevel edgeStorageLevel,
StorageLevel vertexStorageLevel)
Loads a graph from an edge list formatted file where each line contains two integers: a source
id and a target id.
|
protected static void |
initializeLogIfNecessary(boolean isInterpreter) |
protected static boolean |
isTraceEnabled() |
protected static org.slf4j.Logger |
log() |
protected static void |
logDebug(scala.Function0<java.lang.String> msg) |
protected static void |
logDebug(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logError(scala.Function0<java.lang.String> msg) |
protected static void |
logError(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg) |
protected static void |
logInfo(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static java.lang.String |
logName() |
protected static void |
logTrace(scala.Function0<java.lang.String> msg) |
protected static void |
logTrace(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg) |
protected static void |
logWarning(scala.Function0<java.lang.String> msg,
java.lang.Throwable throwable) |
public static Graph<java.lang.Object,java.lang.Object> edgeListFile(SparkContext sc, java.lang.String path, boolean canonicalOrientation, int numEdgePartitions, StorageLevel edgeStorageLevel, StorageLevel vertexStorageLevel)
#
.
If desired the edges can be automatically oriented in the positive
direction (source Id < target Id) by setting canonicalOrientation
to
true.
sc
- SparkContextpath
- the path to the file (e.g., /home/data/file or hdfs://file)canonicalOrientation
- whether to orient edges in the positive
directionnumEdgePartitions
- the number of partitions for the edge RDD
Setting this value to -1 will use the default parallelism.edgeStorageLevel
- the desired storage level for the edge partitionsvertexStorageLevel
- the desired storage level for the vertex partitionsprotected static java.lang.String logName()
protected static org.slf4j.Logger log()
protected static void logInfo(scala.Function0<java.lang.String> msg)
protected static void logDebug(scala.Function0<java.lang.String> msg)
protected static void logTrace(scala.Function0<java.lang.String> msg)
protected static void logWarning(scala.Function0<java.lang.String> msg)
protected static void logError(scala.Function0<java.lang.String> msg)
protected static void logInfo(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logDebug(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logTrace(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logWarning(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static void logError(scala.Function0<java.lang.String> msg, java.lang.Throwable throwable)
protected static boolean isTraceEnabled()
protected static void initializeLogIfNecessary(boolean isInterpreter)