use of com.baidu.hugegraph.computer.core.io.StreamGraphOutput in project hugegraph-computer by hugegraph.
the class ComputeManagerTest method writeEdges.
private static byte[] writeEdges(Vertex vertex, EdgeFrequency freq) throws IOException {
BytesOutput bytesOutput = IOFactory.createBytesOutput(Constants.SMALL_BUF_SIZE);
EntryOutput entryOutput = new EntryOutputImpl(bytesOutput);
GraphComputeOutput output = new StreamGraphOutput(context(), entryOutput);
Whitebox.setInternalState(output, "frequency", freq);
output.writeEdges(vertex);
return bytesOutput.toByteArray();
}
use of com.baidu.hugegraph.computer.core.io.StreamGraphOutput in project hugegraph-computer by hugegraph.
the class EdgesInputTest method writeEdges.
private static byte[] writeEdges(Vertex vertex, EdgeFrequency freq) throws IOException {
BytesOutput bytesOutput = IOFactory.createBytesOutput(Constants.SMALL_BUF_SIZE);
EntryOutput entryOutput = new EntryOutputImpl(bytesOutput);
GraphComputeOutput output = new StreamGraphOutput(context(), entryOutput);
Whitebox.setInternalState(output, "frequency", freq);
output.writeEdges(vertex);
return bytesOutput.toByteArray();
}
use of com.baidu.hugegraph.computer.core.io.StreamGraphOutput in project hugegraph-computer by hugegraph.
the class EdgesInputTest method writeVertex.
private static byte[] writeVertex(Vertex vertex) throws IOException {
BytesOutput bytesOutput = IOFactory.createBytesOutput(Constants.SMALL_BUF_SIZE);
EntryOutput entryOutput = new EntryOutputImpl(bytesOutput);
GraphComputeOutput output = new StreamGraphOutput(context(), entryOutput);
output.writeVertex(vertex);
return bytesOutput.toByteArray();
}
use of com.baidu.hugegraph.computer.core.io.StreamGraphOutput in project hugegraph-computer by hugegraph.
the class ComputeManagerTest method writeVertex.
private static byte[] writeVertex(Vertex vertex) throws IOException {
BytesOutput bytesOutput = IOFactory.createBytesOutput(Constants.SMALL_BUF_SIZE);
EntryOutput entryOutput = new EntryOutputImpl(bytesOutput);
GraphComputeOutput output = new StreamGraphOutput(context(), entryOutput);
output.writeVertex(vertex);
return bytesOutput.toByteArray();
}
Aggregations