Java 类org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler 实例源码

项目:hadoop    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:aliyun-oss-hadoop-fs    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:big-c    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hadoop-plus    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:FlexMap    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hops    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = ApplicationAttemptId.fromString(
      "appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hadoop-TCP    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hardfs    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hadoop-on-lustre2    文件:TestJobImpl.java   
private static CommitterEventHandler createCommitterEventHandler(
    Dispatcher dispatcher, OutputCommitter committer) {
  final SystemClock clock = new SystemClock();
  AppContext appContext = mock(AppContext.class);
  when(appContext.getEventHandler()).thenReturn(
      dispatcher.getEventHandler());
  when(appContext.getClock()).thenReturn(clock);
  RMHeartbeatHandler heartbeatHandler = new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return clock.getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
  ApplicationAttemptId id = 
    ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
  when(appContext.getApplicationID()).thenReturn(id.getApplicationId());
  when(appContext.getApplicationAttemptId()).thenReturn(id);
  CommitterEventHandler handler =
      new CommitterEventHandler(appContext, committer, heartbeatHandler);
  dispatcher.register(CommitterEventType.class, handler);
  return handler;
}
项目:hadoop    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    byte[] secretShuffleKey) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.encryptedSpillKey = secretShuffleKey;
}
项目:hadoop    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler, ClassLoader jobClassLoader) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
  this.jobClassLoader = jobClassLoader;
}
项目:hadoop    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler) {
  super(context, jobTokenSecretManager, rmHeartbeatHandler, null);
  this.taskHeartbeatHandler = hbHandler;
}
项目:hadoop    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}
项目:hadoop    文件:TestMRAppMaster.java   
public MRAppMasterTest(ApplicationAttemptId applicationAttemptId,
    ContainerId containerId, String host, int port, int httpPort,
    long submitTime, boolean overrideInit,
    boolean overrideStart) {
  super(applicationAttemptId, containerId, host, port, httpPort, submitTime);
  this.overrideInit = overrideInit;
  this.overrideStart = overrideStart;
  mockContainerAllocator = mock(ContainerAllocator.class);
  mockCommitterEventHandler = mock(CommitterEventHandler.class);
  mockRMHeartbeatHandler = mock(RMHeartbeatHandler.class);
}
项目:aliyun-oss-hadoop-fs    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    AMPreemptionPolicy preemptionPolicy) {
  this(context, jobTokenSecretManager, rmHeartbeatHandler,
          preemptionPolicy, null);
}
项目:aliyun-oss-hadoop-fs    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    AMPreemptionPolicy preemptionPolicy, byte[] secretShuffleKey) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.preemptionPolicy = preemptionPolicy;
  this.encryptedSpillKey = secretShuffleKey;
}
项目:aliyun-oss-hadoop-fs    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler, ClassLoader jobClassLoader) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
  this.jobClassLoader = jobClassLoader;
}
项目:aliyun-oss-hadoop-fs    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler,
    AMPreemptionPolicy policy) {

  super(context, jobTokenSecretManager, rmHeartbeatHandler, policy);
  this.taskHeartbeatHandler = hbHandler;
}
项目:aliyun-oss-hadoop-fs    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}
项目:aliyun-oss-hadoop-fs    文件:TestMRAppMaster.java   
public MRAppMasterTest(ApplicationAttemptId applicationAttemptId,
    ContainerId containerId, String host, int port, int httpPort,
    long submitTime, boolean overrideInit,
    boolean overrideStart) {
  super(applicationAttemptId, containerId, host, port, httpPort, submitTime);
  this.overrideInit = overrideInit;
  this.overrideStart = overrideStart;
  mockContainerAllocator = mock(ContainerAllocator.class);
  mockCommitterEventHandler = mock(CommitterEventHandler.class);
  mockRMHeartbeatHandler = mock(RMHeartbeatHandler.class);
}
项目:big-c    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    byte[] secretShuffleKey) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.encryptedSpillKey = secretShuffleKey;
}
项目:big-c    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler, ClassLoader jobClassLoader) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
  this.jobClassLoader = jobClassLoader;
}
项目:big-c    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler) {
  super(context, jobTokenSecretManager, rmHeartbeatHandler, null);
  this.taskHeartbeatHandler = hbHandler;
}
项目:big-c    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}
项目:big-c    文件:TestMRAppMaster.java   
public MRAppMasterTest(ApplicationAttemptId applicationAttemptId,
    ContainerId containerId, String host, int port, int httpPort,
    long submitTime, boolean overrideInit,
    boolean overrideStart) {
  super(applicationAttemptId, containerId, host, port, httpPort, submitTime);
  this.overrideInit = overrideInit;
  this.overrideStart = overrideStart;
  mockContainerAllocator = mock(ContainerAllocator.class);
  mockCommitterEventHandler = mock(CommitterEventHandler.class);
  mockRMHeartbeatHandler = mock(RMHeartbeatHandler.class);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler, ClassLoader jobClassLoader) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
  this.jobClassLoader = jobClassLoader;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler) {
  super(context, jobTokenSecretManager, rmHeartbeatHandler);
  this.taskHeartbeatHandler = hbHandler;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestMRAppMaster.java   
public MRAppMasterTest(ApplicationAttemptId applicationAttemptId,
    ContainerId containerId, String host, int port, int httpPort,
    long submitTime, boolean overrideInit,
    boolean overrideStart) {
  super(applicationAttemptId, containerId, host, port, httpPort, submitTime);
  this.overrideInit = overrideInit;
  this.overrideStart = overrideStart;
  mockContainerAllocator = mock(ContainerAllocator.class);
  mockCommitterEventHandler = mock(CommitterEventHandler.class);
  mockRMHeartbeatHandler = mock(RMHeartbeatHandler.class);
}
项目:hadoop-plus    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
}
项目:hadoop-plus    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
}
项目:hadoop-plus    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler) {
  super(context, jobTokenSecretManager, rmHeartbeatHandler);
  this.taskHeartbeatHandler = hbHandler;
}
项目:hadoop-plus    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}
项目:hadoop-plus    文件:TestMRAppMaster.java   
public MRAppMasterTest(ApplicationAttemptId applicationAttemptId,
    ContainerId containerId, String host, int port, int httpPort,
    long submitTime, int maxAppAttempts, boolean overrideInit,
    boolean overrideStart) {
  super(applicationAttemptId, containerId, host, port, httpPort, submitTime,
      maxAppAttempts);
  this.overrideInit = overrideInit;
  this.overrideStart = overrideStart;
  mockContainerAllocator = mock(ContainerAllocator.class);
  mockCommitterEventHandler = mock(CommitterEventHandler.class);
  mockRMHeartbeatHandler = mock(RMHeartbeatHandler.class);
}
项目:FlexMap    文件:TaskAttemptListenerImpl.java   
public TaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler) {
  super(TaskAttemptListenerImpl.class.getName());
  this.context = context;
  this.jobTokenSecretManager = jobTokenSecretManager;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
}
项目:FlexMap    文件:CommitterEventHandler.java   
public CommitterEventHandler(AppContext context, OutputCommitter committer,
    RMHeartbeatHandler rmHeartbeatHandler, ClassLoader jobClassLoader) {
  super("CommitterEventHandler");
  this.context = context;
  this.committer = committer;
  this.rmHeartbeatHandler = rmHeartbeatHandler;
  this.stopped = new AtomicBoolean(false);
  this.jobClassLoader = jobClassLoader;
}
项目:FlexMap    文件:TestTaskAttemptListenerImpl.java   
public MockTaskAttemptListenerImpl(AppContext context,
    JobTokenSecretManager jobTokenSecretManager,
    RMHeartbeatHandler rmHeartbeatHandler,
    TaskHeartbeatHandler hbHandler) {
  super(context, jobTokenSecretManager, rmHeartbeatHandler);
  this.taskHeartbeatHandler = hbHandler;
}
项目:FlexMap    文件:TestStagingCleanup.java   
private static RMHeartbeatHandler getStubbedHeartbeatHandler(
    final AppContext appContext) {
  return new RMHeartbeatHandler() {
    @Override
    public long getLastHeartbeatTime() {
      return appContext.getClock().getTime();
    }
    @Override
    public void runOnNextHeartbeat(Runnable callback) {
      callback.run();
    }
  };
}