Package org.apache.spark.graphx
Class GraphLoader
Object
org.apache.spark.graphx.GraphLoader
Provides utilities for loading 
Graphs from files.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionedgeListFile(SparkContext sc, 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.static org.apache.spark.internal.Logging.LogStringContextLogStringContext(scala.StringContext sc) static org.slf4j.Loggerstatic voidorg$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) 
- 
Constructor Details- 
GraphLoaderpublic GraphLoader()
 
- 
- 
Method Details- 
edgeListFilepublic static Graph<Object,Object> edgeListFile(SparkContext sc, 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. Skips lines that begin with#.If desired the edges can be automatically oriented in the positive direction (source Id is less than target Id) by setting canonicalOrientationto true.- Parameters:
- sc- SparkContext
- path- the path to the file (e.g., /home/data/file or hdfs://file)
- canonicalOrientation- whether to orient edges in the positive direction
- numEdgePartitions- 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 partitions
- vertexStorageLevel- the desired storage level for the vertex partitions
- Returns:
- (undocumented)
- Example:
- Loads a file in the following format:
 # Comment Line # Source Id <\t> Target Id 1 -5 1 2 2 7 1 8
 
- 
org$apache$spark$internal$Logging$$log_public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
- 
org$apache$spark$internal$Logging$$log__$eqpublic static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) 
- 
LogStringContextpublic static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc) 
 
-