Package org.apache.flink.runtime.instance

Examples of org.apache.flink.runtime.instance.InstanceID


   * This method registers the TaskManager at the jobManager and send periodic heartbeats.
   */
  private void registerAndRunHeartbeatLoop(long interval, int maxNonSuccessfulHeatbeats) {

    while (!shutdownStarted.get()) {
      InstanceID resultId = null;
 
      // try to register. We try as long as we need to, because it may be that the jobmanager is  not yet online
      {
        final long maxDelay = 10000// the maximal delay between registration attempts
        final long reportingDelay = 5000;
View Full Code Here


    InstanceConnectionInfo ci = new InstanceConnectionInfo(address, ipcPort, dataPort);
   
    final long GB = 1024L*1024*1024;
    HardwareDescription resources = new HardwareDescription(4, 4*GB, 3*GB, 2*GB);
   
    return new Instance(ci, new InstanceID(), resources, numSlots);
  }
View Full Code Here

  // --------------------------------------------------------------------------------------------
 
  public static JobManager getJobManagerMockBase() throws Exception {
    JobManager jm = mock(JobManager.class);
   
    final InstanceID iid = new InstanceID();
   
    when(jm.registerTaskManager(Matchers.any(InstanceConnectionInfo.class), Matchers.any(HardwareDescription.class), Matchers.anyInt()))
      .thenReturn(iid);
   
    when(jm.sendHeartbeat(iid)).thenReturn(true);
View Full Code Here

  public static Instance getInstance(final TaskOperationProtocol top, int numSlots) throws Exception {
    HardwareDescription hardwareDescription = new HardwareDescription(4, 2L*1024*1024*1024, 1024*1024*1024, 512*1024*1024);
    InetAddress address = InetAddress.getByName("127.0.0.1");
    InstanceConnectionInfo connection = new InstanceConnectionInfo(address, 10000, 10001);
   
    return new Instance(connection, new InstanceID(), hardwareDescription, numSlots) {
      @Override
      public TaskOperationProtocol getTaskManagerProxy() {
        return top;
      }
    };
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.instance.InstanceID

Copyright © 2018 www.massapicom. 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.