use of com.baidu.hugegraph.computer.core.compute.input.VertexInput in project hugegraph-computer by hugegraph.
the class FileGraphPartition method beforeOutput.
private void beforeOutput() throws IOException {
this.vertexInput = new VertexInput(this.context, this.vertexFile, this.vertexCount);
this.edgesInput = new EdgesInput(this.context, this.edgeFile);
this.vertexInput.init();
this.edgesInput.init();
this.preStatusFile = this.curStatusFile;
this.preValueFile = this.curValueFile;
this.preStatusInput = new BufferedFileInput(this.preStatusFile);
this.preValueInput = new BufferedFileInput(this.preValueFile);
}
use of com.baidu.hugegraph.computer.core.compute.input.VertexInput in project hugegraph-computer by hugegraph.
the class FileGraphPartition method beforeCompute.
private void beforeCompute(int superstep) throws IOException {
this.vertexInput = new VertexInput(this.context, this.vertexFile, this.vertexCount);
this.edgesInput = new EdgesInput(this.context, this.edgeFile);
// Inputs of vertex, edges, status, and value.
this.vertexInput.init();
this.edgesInput.init();
if (superstep != 0) {
this.preStatusFile = this.curStatusFile;
this.preValueFile = this.curValueFile;
this.preStatusInput = new BufferedFileInput(this.preStatusFile);
this.preValueInput = new BufferedFileInput(this.preValueFile);
}
// Outputs of vertex's status and vertex's value.
String statusPath = this.fileGenerator.randomDirectory(STATUS, Integer.toString(superstep), Integer.toString(this.partition));
String valuePath = this.fileGenerator.randomDirectory(VALUE, Integer.toString(superstep), Integer.toString(this.partition));
this.curStatusFile = new File(statusPath);
this.curValueFile = new File(valuePath);
createFile(this.curStatusFile);
createFile(this.curValueFile);
this.curStatusOutput = new BufferedFileOutput(this.curStatusFile);
this.curValueOutput = new BufferedFileOutput(this.curValueFile);
}
Aggregations