use of edu.iu.dsc.tws.task.impl.ComputeGraphBuilder in project twister2 by DSC-SPIDAL.
the class KMeansComputeJob method buildDataPointsTG.
public static ComputeGraph buildDataPointsTG(String dataDirectory, int dsize, int parallelismValue, int dimension, Config conf, String filetype) {
PointDataSource ps = new PointDataSource(Context.TWISTER2_DIRECT_EDGE, dataDirectory, "points", dimension, dsize, filetype);
ComputeGraphBuilder datapointsComputeGraphBuilder = ComputeGraphBuilder.newBuilder(conf);
// Add source, compute, and sink tasks to the task graph builder for the first task graph
datapointsComputeGraphBuilder.addSource("datapointsource", ps, parallelismValue);
datapointsComputeGraphBuilder.setMode(OperationMode.BATCH);
datapointsComputeGraphBuilder.setTaskGraphName("datapointsTG");
return datapointsComputeGraphBuilder.build();
}
Aggregations