From 377b06820934cab6d67f3a9182528c7f417a7d98 Mon Sep 17 00:00:00 2001 From: "Joseph E. Gonzalez" Date: Wed, 19 Nov 2014 16:53:33 -0800 Subject: Updating GraphX programming guide and documentation This pull request revises the programming guide to reflect changes in the GraphX API as well as the deprecated mapReduceTriplets operator. Author: Joseph E. Gonzalez Closes #3359 from jegonzal/GraphXProgrammingGuide and squashes the following commits: 4421964 [Joseph E. Gonzalez] updating documentation for graphx --- .../org/apache/spark/graphx/TripletFields.java | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'graphx/src/main') diff --git a/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java b/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java index 34df4b7ee7..8dfccfe2e2 100644 --- a/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java +++ b/graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java @@ -24,10 +24,17 @@ import java.io.Serializable; * system to populate only those fields for efficiency. */ public class TripletFields implements Serializable { + + /** Indicates whether the source vertex attribute is included. */ public final boolean useSrc; + + /** Indicates whether the destination vertex attribute is included. */ public final boolean useDst; + + /** Indicates whether the edge attribute is included. */ public final boolean useEdge; + /** Constructs a default TripletFields in which all fields are included. */ public TripletFields() { this(true, true, true); } @@ -38,14 +45,53 @@ public class TripletFields implements Serializable { this.useEdge = useEdge; } + /** + * None of the triplet fields are exposed. + */ public static final TripletFields None = new TripletFields(false, false, false); + + /** + * Expose only the edge field and not the source or destination field. + */ public static final TripletFields EdgeOnly = new TripletFields(false, false, true); + + /** + * Expose only the source field and not the edge or destination field. + */ public static final TripletFields SrcOnly = new TripletFields(true, false, false); + + /** + * Expose only the destination field and not the edge or source field. + */ public static final TripletFields DstOnly = new TripletFields(false, true, false); + + /** + * Expose the source and destination fields but not the edge field. + */ public static final TripletFields SrcDstOnly = new TripletFields(true, true, false); + + /** + * Expose the source and edge fields but not the destination field. (Same as Src) + */ public static final TripletFields SrcAndEdge = new TripletFields(true, false, true); + + /** + * Expose the source and edge fields but not the destination field. (Same as SrcAndEdge) + */ public static final TripletFields Src = SrcAndEdge; + + /** + * Expose the destination and edge fields but not the source field. (Same as Dst) + */ public static final TripletFields DstAndEdge = new TripletFields(false, true, true); + + /** + * Expose the destination and edge fields but not the source field. (Same as DstAndEdge) + */ public static final TripletFields Dst = DstAndEdge; + + /** + * Expose all the fields (source, edge, and destination). + */ public static final TripletFields All = new TripletFields(true, true, true); } -- cgit v1.2.3