setParallelism: 指定算子的并行度/p>
degree.annotate.directed. EdgeTargetDegrees |
用目标点的自由度(degree),出边(out-degree)和入边(in-degree)标注一个有向图的边.
DataSet<Edge<K, Tuple2<EV, Degrees>>> targetDegrees = graph
.run(new EdgeTargetDegrees();
可选配置:
|
degree.annotate.directed. EdgeDegreesPair |
用源点目标点的自由度(degree),出边(out-degree)和入边(in-degree)标注一个有向图的边.
DataSet<Edge<K, Tuple2<EV, Degrees>>> degrees = graph
.run(new EdgeDegreesPair());
可选配置:
|
degree.annotate.undirected. VertexDegree |
用自由度(degree)标注一个无向图的点.
DataSet<Vertex<K, LongValue>> degree = graph
.run(new VertexDegree()
.setIncludeZeroDegreeVertices(true)
.setReduceOnTargetId(true));
可选配置:
setIncludeZeroDegreeVertices: 默认情况下为了自由度的计算,只有边集 (edge set) 需要被处理;当该参数被设置时,对点集 (vertex set) 会进行一个额外的 join 操作来输出自由度 (degree) 为 0 的点
setParallelism: 指定算子的并行度
setReduceOnTargetId: 自由度能够用边的源点和终点计算. 默认情况下用源点计算. 如果用目标点对输入边列 (edge list) 排序,对终点的归约可能优化该算法.
|
degree.annotate.undirected. EdgeSourceDegree |
用源点的自由度(degree)标注一个无向图的边.
DataSet<Edge<K, Tuple2<EV, LongValue>>> sourceDegree = graph
.run(new EdgeSourceDegree()
.setReduceOnTargetId(true));
可选配置:
|
degree.annotate.undirected. EdgeTargetDegree |
用目标点的自由度(degree)标注一个无向图的边.
DataSet<Edge<K, Tuple2<EV, LongValue>>> targetDegree = graph
.run(new EdgeTargetDegree()
.setReduceOnSourceId(true));
可选配置:
|
degree.annotate.undirected. EdgeDegreePair |
用源点和目标点的自由度(degree)标注一个无向图的边.
DataSet<Edge<K, Tuple3<EV, LongValue, LongValue>>> pairDegree = graph
.run(new EdgeDegreePair()
.setReduceOnTargetId(true));
可选配置:
|
degree.filter.undirected. MaximumDegree |
用最大自由度过滤一个无向图.
Graph<K, VV, EV> filteredGraph = graph
.run(new MaximumDegree(5000)
.setBroadcastHighDegreeVertices(true)
.setReduceOnTargetId(true));
可选配置:
setBroadcastHighDegreeVertices: 当移除少量高自由度 (high-degree) 的点时,用一个广播哈希 (broadcast-hash) 合并 (join) 高自由度的点来减少数据洗牌 (shuffle).
setParallelism: 指定算子的并行度
setReduceOnTargetId: 自由度能够用边的源点和终点计算. 默认情况下用源点计算. 如果用目标点对输入边列 (edge list) 排序,对终点的归约可能优化该算法.
|
simple.directed. Simplify |
移除一个有向图的自环 (self-loops) 和相同的边.
graph.run(new Simplify());
可选配置:
|
simple.undirected. Simplify |
从一个无向图中添加对称边并移除自环 (self-loops).
graph.run(new Simplify());
可选配置:
|
translate. TranslateGraphIds |
用给定的 TranslateFunction 转换 (translate) 点和边的 ID.
graph.run(new TranslateGraphIds(new LongValueToStringValue()));
必要配置:
可选配置:
|
translate. TranslateVertexValues |
用给定的 TranslateFunction 转换 (translate) 点的值.
graph.run(new TranslateVertexValues(new LongValueAddOffset(vertexCount)));
必要配置:
可选配置:
|
translate. TranslateEdgeValues |
用给定的 TranslateFunction 转换 (translate) 边的值.
graph.run(new TranslateEdgeValues(new Nullify()));
必要配置:
可选配置:
|
Back to top