diff options
author | Joseph E. Gonzalez <joseph.e.gonzalez@gmail.com> | 2014-11-19 16:53:33 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2014-11-19 16:53:33 -0800 |
commit | 377b06820934cab6d67f3a9182528c7f417a7d98 (patch) | |
tree | 435ad8ddc8691b30f5653650dacfdc1a97658526 /graphx/src | |
parent | 04d462f648aba7b18fc293b7189b86af70e421bc (diff) | |
download | spark-377b06820934cab6d67f3a9182528c7f417a7d98.tar.gz spark-377b06820934cab6d67f3a9182528c7f417a7d98.tar.bz2 spark-377b06820934cab6d67f3a9182528c7f417a7d98.zip |
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 <joseph.e.gonzalez@gmail.com>
Closes #3359 from jegonzal/GraphXProgrammingGuide and squashes the following commits:
4421964 [Joseph E. Gonzalez] updating documentation for graphx
Diffstat (limited to 'graphx/src')
-rw-r--r-- | graphx/src/main/scala/org/apache/spark/graphx/TripletFields.java | 46 |
1 files changed, 46 insertions, 0 deletions
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); } |