Examples of GlobalBufferPool


Examples of org.apache.flink.runtime.io.network.bufferprovider.GlobalBufferPool

      final JobGraph jobGraph = new JobGraph("Pointwise Job", sender, receiver);
      jobGraph.setNumberOfExecutionRetries(1);
     
      jm = startJobManager(2 * NUM_TASKS);
     
      final GlobalBufferPool bp = ((LocalInstanceManager) jm.getInstanceManager())
          .getTaskManagers()[0].getChannelManager().getGlobalBufferPool();
     
      JobSubmissionResult result = jm.submitJob(jobGraph);

      if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
        System.out.println(result.getDescription());
      }
      assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
     
      // monitor the execution
      ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
     
      if (eg != null) {
        eg.waitForJobEnd();
        assertEquals(JobStatus.FINISHED, eg.getState());
      }
      else {
        // already done, that was fast;
      }
     
      // make sure that in any case, the network buffers are all returned
      waitForTaskThreadsToBeTerminated();
      assertEquals(bp.numBuffers(), bp.numAvailableBuffers());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

Examples of org.apache.flink.runtime.io.network.bufferprovider.GlobalBufferPool

      final JobGraph jobGraph = new JobGraph("Pointwise Job", sender, receiver);
      jobGraph.setNumberOfExecutionRetries(1);
     
      jm = startJobManager(NUM_TASKS);
     
      final GlobalBufferPool bp = ((LocalInstanceManager) jm.getInstanceManager())
          .getTaskManagers()[0].getChannelManager().getGlobalBufferPool();
     
      JobSubmissionResult result = jm.submitJob(jobGraph);

      if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
        System.out.println(result.getDescription());
      }
      assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
     
      // monitor the execution
      ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
     
      if (eg != null) {
        eg.waitForJobEnd();
        assertEquals(JobStatus.FINISHED, eg.getState());
      }
      else {
        // already done, that was fast;
      }
     
      // make sure that in any case, the network buffers are all returned
      waitForTaskThreadsToBeTerminated();
      assertEquals(bp.numBuffers(), bp.numAvailableBuffers());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.