Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package apache
    Definition Classes
    org
  • package spark

    Core Spark functionality.

    Core Spark functionality. org.apache.spark.SparkContext serves as the main entry point to Spark, while org.apache.spark.rdd.RDD is the data type representing a distributed collection, and provides most parallel operations.

    In addition, org.apache.spark.rdd.PairRDDFunctions contains operations available only on RDDs of key-value pairs, such as groupByKey and join; org.apache.spark.rdd.DoubleRDDFunctions contains operations available only on RDDs of Doubles; and org.apache.spark.rdd.SequenceFileRDDFunctions contains operations available on RDDs that can be saved as SequenceFiles. These operations are automatically available on any RDD of the right type (e.g. RDD[(Int, Int)] through implicit conversions.

    Java programmers should reference the org.apache.spark.api.java package for Spark programming APIs in Java.

    Classes and methods marked with Experimental are user-facing features which have not been officially adopted by the Spark project. These are subject to change or removal in minor releases.

    Classes and methods marked with Developer API are intended for advanced users want to extend Spark through lower level interfaces. These are subject to changes or removal in minor releases.

    Definition Classes
    apache
  • package graphx

    ALPHA COMPONENT GraphX is a graph processing framework built on top of Spark.

    ALPHA COMPONENT GraphX is a graph processing framework built on top of Spark.

    Definition Classes
    spark
  • package util

    Collections of utilities used by graphx.

    Collections of utilities used by graphx.

    Definition Classes
    graphx
  • GraphGenerators
o

org.apache.spark.graphx.util

GraphGenerators

object GraphGenerators extends Logging

A collection of graph generating functions.

Source
GraphGenerators.scala
Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GraphGenerators
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging

Value Members

  1. val RMATa: Double
  2. val RMATb: Double
  3. val RMATc: Double
  4. val RMATd: Double
  5. def generateRandomEdges(src: Int, numEdges: Int, maxVertexId: Int, seed: Long = -1): Array[Edge[Int]]
  6. def gridGraph(sc: SparkContext, rows: Int, cols: Int): Graph[(Int, Int), Double]

    Create rows by cols grid graph with each vertex connected to its row+1 and col+1 neighbors.

    Create rows by cols grid graph with each vertex connected to its row+1 and col+1 neighbors. Vertex ids are assigned in row major order.

    sc

    the spark context in which to construct the graph

    rows

    the number of rows

    cols

    the number of columns

    returns

    A graph containing vertices with the row and column ids as their attributes and edge values as 1.0.

  7. def logNormalGraph(sc: SparkContext, numVertices: Int, numEParts: Int = 0, mu: Double = 4.0, sigma: Double = 1.3, seed: Long = -1): Graph[Long, Int]

    Generate a graph whose vertex out degree distribution is log normal.

    Generate a graph whose vertex out degree distribution is log normal.

    The default values for mu and sigma are taken from the Pregel paper:

    Grzegorz Malewicz, Matthew H. Austern, Aart J.C Bik, James C. Dehnert, Ilan Horn, Naty Leiser, and Grzegorz Czajkowski. 2010. Pregel: a system for large-scale graph processing. SIGMOD '10.

    If the seed is -1 (default), a random seed is chosen. Otherwise, use the user-specified seed.

    sc

    Spark Context

    numVertices

    number of vertices in generated graph

    numEParts

    (optional) number of partitions

    mu

    (optional, default: 4.0) mean of out-degree distribution

    sigma

    (optional, default: 1.3) standard deviation of out-degree distribution

    seed

    (optional, default: -1) seed for RNGs, -1 causes a random seed to be chosen

    returns

    Graph object

  8. def rmatGraph(sc: SparkContext, requestedNumVertices: Int, numEdges: Int): Graph[Int, Int]

    A random graph generator using the R-MAT model, proposed in "R-MAT: A Recursive Model for Graph Mining" by Chakrabarti et al.

    A random graph generator using the R-MAT model, proposed in "R-MAT: A Recursive Model for Graph Mining" by Chakrabarti et al.

    See http://www.cs.cmu.edu/~christos/PUBLICATIONS/siam04.pdf.

  9. def starGraph(sc: SparkContext, nverts: Int): Graph[Int, Int]

    Create a star graph with vertex 0 being the center.

    Create a star graph with vertex 0 being the center.

    sc

    the spark context in which to construct the graph

    nverts

    the number of vertices in the star

    returns

    A star graph containing nverts vertices with vertex 0 being the center vertex.