@SuppressWarnings("unchecked") @Before public void beforeTest() { this.serializer1 = RecordSerializerFactory.get(); this.serializer2 = RecordSerializerFactory.get(); this.comparator1 = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class}); this.comparator2 = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class}); this.pairComparator11 = new RecordPairComparator(new int[] {0}, new int[] {0}, new Class[] {TestData.Key.class}); this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE, PAGE_SIZE); this.ioManager = new IOManager(); }
private JobGraph createJobGraphV1( String pointsPath, String centersPath, String resultPath, int numSubTasks) throws JobGraphDefinitionException { // -- init // ------------------------------------------------------------------------------------------------- final TypeSerializerFactory<?> serializer = RecordSerializerFactory.get(); JobGraph jobGraph = new JobGraph("Distance Builder"); // -- vertices // --------------------------------------------------------------------------------------------- JobInputVertex points = createPointsInput(jobGraph, pointsPath, numSubTasks, serializer); JobInputVertex models = createModelsInput(jobGraph, centersPath, numSubTasks, serializer); JobTaskVertex mapper = createMapper(jobGraph, numSubTasks, serializer); JobOutputVertex output = createOutput(jobGraph, resultPath, numSubTasks, serializer); // -- edges // ------------------------------------------------------------------------------------------------ JobGraphUtils.connect(points, mapper, ChannelType.NETWORK, DistributionPattern.POINTWISE); JobGraphUtils.connect(models, mapper, ChannelType.NETWORK, DistributionPattern.BIPARTITE); JobGraphUtils.connect(mapper, output, ChannelType.NETWORK, DistributionPattern.POINTWISE); // -- instance sharing // ------------------------------------------------------------------------------------- points.setVertexToShareInstancesWith(output); models.setVertexToShareInstancesWith(output); mapper.setVertexToShareInstancesWith(output); return jobGraph; }