Skip to content

Commit

Permalink
[SPARK-10222] [GRAPHX] [DOCS] More thoroughly deprecate Bagel in favo…
Browse files Browse the repository at this point in the history
…r of GraphX

Finish deprecating Bagel; remove reference to nonexistent example

Author: Sean Owen <[email protected]>

Closes apache#8731 from srowen/SPARK-10222.
  • Loading branch information
srowen committed Sep 13, 2015
1 parent b3a7480 commit 1dc614b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
6 changes: 6 additions & 0 deletions bagel/src/main/scala/org/apache/spark/bagel/Bagel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.apache.spark.SparkContext._
import org.apache.spark.rdd.RDD
import org.apache.spark.storage.StorageLevel

@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
object Bagel extends Logging {
val DEFAULT_STORAGE_LEVEL = StorageLevel.MEMORY_AND_DISK

Expand Down Expand Up @@ -270,18 +271,21 @@ object Bagel extends Logging {
}
}

@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
trait Combiner[M, C] {
def createCombiner(msg: M): C
def mergeMsg(combiner: C, msg: M): C
def mergeCombiners(a: C, b: C): C
}

@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
trait Aggregator[V, A] {
def createAggregator(vert: V): A
def mergeAggregators(a: A, b: A): A
}

/** Default combiner that simply appends messages together (i.e. performs no aggregation) */
@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
class DefaultCombiner[M: Manifest] extends Combiner[M, Array[M]] with Serializable {
def createCombiner(msg: M): Array[M] =
Array(msg)
Expand All @@ -297,6 +301,7 @@ class DefaultCombiner[M: Manifest] extends Combiner[M, Array[M]] with Serializab
* Subclasses may store state along with each vertex and must
* inherit from java.io.Serializable or scala.Serializable.
*/
@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
trait Vertex {
def active: Boolean
}
Expand All @@ -307,6 +312,7 @@ trait Vertex {
* Subclasses may contain a payload to deliver to the target vertex
* and must inherit from java.io.Serializable or scala.Serializable.
*/
@deprecated("Uses of Bagel should migrate to GraphX", "1.6.0")
trait Message[K] {
def targetId: K
}
10 changes: 1 addition & 9 deletions docs/bagel-programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ displayTitle: Bagel Programming Guide
title: Bagel
---

**Bagel will soon be superseded by [GraphX](graphx-programming-guide.html); we recommend that new users try GraphX instead.**
**Bagel is deprecated, and superseded by [GraphX](graphx-programming-guide.html).**

Bagel is a Spark implementation of Google's [Pregel](http://portal.acm.org/citation.cfm?id=1807184) graph processing framework. Bagel currently supports basic graph computation, combiners, and aggregators.

Expand Down Expand Up @@ -157,11 +157,3 @@ trait Message[K] {
def targetId: K
}
{% endhighlight %}

# Where to Go from Here

Two example jobs, PageRank and shortest path, are included in `examples/src/main/scala/org/apache/spark/examples/bagel`. You can run them by passing the class name to the `bin/run-example` script included in Spark; e.g.:

./bin/run-example org.apache.spark.examples.bagel.WikipediaPageRank

Each example program prints usage help when run without any arguments.
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ options for deployment:
* [Spark SQL and DataFrames](sql-programming-guide.html): support for structured data and relational queries
* [MLlib](mllib-guide.html): built-in machine learning library
* [GraphX](graphx-programming-guide.html): Spark's new API for graph processing
* [Bagel (Pregel on Spark)](bagel-programming-guide.html): older, simple graph processing model

**API Docs:**

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

<modules>
<module>core</module>
<module>bagel</module>
<module>bagel</module> <!-- Deprecated -->
<module>graphx</module>
<module>mllib</module>
<module>tools</module>
Expand Down

0 comments on commit 1dc614b

Please sign in to comment.