use of com.baidu.hugegraph.computer.core.graph.vertex.Vertex in project hugegraph-computer by hugegraph.
the class VertexMessageRecvPartitionTest method addTwentyDuplicateVertexBuffer.
private static void addTwentyDuplicateVertexBuffer(Consumer<ManagedBuffer> consumer) throws IOException {
for (long i = 0L; i < 10L; i++) {
Vertex vertex = graphFactory().createVertex();
vertex.id(BytesId.of(i));
Properties properties = graphFactory().createProperties();
properties.put("p1", new LongValue(i));
vertex.properties(properties);
ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer);
}
for (long i = 0L; i < 10L; i++) {
Vertex vertex = graphFactory().createVertex();
vertex.id(BytesId.of(i));
Properties properties = graphFactory().createProperties();
properties.put("p2", new LongValue(2L * i));
vertex.properties(properties);
ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer);
}
}
Aggregations