本文整理了Java中org.apache.giraph.graph.Vertex.wakeUp()
方法的一些代码示例,展示了Vertex.wakeUp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.wakeUp()
方法的具体详情如下:
包路径:org.apache.giraph.graph.Vertex
类名称:Vertex
方法名:wakeUp
[英]Re-activate vertex if halted.
[中]如果停止,请重新激活顶点。
代码示例来源:origin: org.apache.giraph/giraph-core
/**
* Read vertex data from an input and initialize the vertex.
*
* @param in The input stream
* @param vertex The vertex to initialize
* @throws IOException
*/
private void readVertexData(DataInput in, Vertex<I, V, E> vertex)
throws IOException {
I id = conf.createVertexId();
id.readFields(in);
V value = null;
boolean hasNullValue = in.readBoolean();
if (!hasNullValue) {
value = conf.createVertexValue();
value.readFields(in);
}
OutEdges<I, E> edges = conf.createAndInitializeOutEdges(0);
vertex.initialize(id, value, edges);
if (in.readBoolean()) {
vertex.voteToHalt();
} else {
vertex.wakeUp();
}
}
代码示例来源:origin: org.apache.giraph/giraph-core
/**
* Reads data from input stream to inizialize Vertex. Assumes the vertex has
* already been initialized and contains values for Id, value, and edges.
*
* @param input The input stream
* @param vertex The vertex to initialize
* @param conf Configuration
* @param <I> Vertex id
* @param <V> Vertex value
* @param <E> Edge value
* @throws IOException
*/
@SuppressWarnings("unchecked")
public static <I extends WritableComparable, V extends Writable,
E extends Writable> void reinitializeVertexFromDataInput(
DataInput input,
Vertex<I, V, E> vertex,
ImmutableClassesGiraphConfiguration<I, V, E> conf)
throws IOException {
vertex.getId().readFields(input);
vertex.getValue().readFields(input);
((OutEdges<I, E>) vertex.getEdges()).readFields(input);
if (input.readBoolean()) {
vertex.voteToHalt();
} else {
vertex.wakeUp();
}
}
代码示例来源:origin: apache/giraph
internalApi.takeMessages(vertex.getId());
if (vertex.isHalted() && !Iterables.isEmpty(messages)) {
vertex.wakeUp();
代码示例来源:origin: org.apache.giraph/giraph-core
vertex.wakeUp();
内容来源于网络,如有侵权,请联系作者删除!