diff options
Diffstat (limited to 'graphx')
-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); } |