本文整理汇总了Java中org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler类的典型用法代码示例。如果您正苦于以下问题:Java RMHeartbeatHandler类的具体用法?Java RMHeartbeatHandler怎么用?Java RMHeartbeatHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RMHeartbeatHandler类属于org.apache.hadoop.mapreduce.v2.app.rm包,在下文中一共展示了RMHeartbeatHandler类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createCommitterEventHandler
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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;
}
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:TestJobImpl.java
示例2: createCommitterEventHandler
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:27,代码来源:TestJobImpl.java
示例3: TaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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;
}
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:TaskAttemptListenerImpl.java
示例4: CommitterEventHandler
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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;
}
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:CommitterEventHandler.java
示例5: MockTaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public MockTaskAttemptListenerImpl(AppContext context,
JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
TaskHeartbeatHandler hbHandler) {
super(context, jobTokenSecretManager, rmHeartbeatHandler, null);
this.taskHeartbeatHandler = hbHandler;
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:TestTaskAttemptListenerImpl.java
示例6: getStubbedHeartbeatHandler
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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();
}
};
}
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestStagingCleanup.java
示例7: MRAppMasterTest
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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);
}
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:TestMRAppMaster.java
示例8: TaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public TaskAttemptListenerImpl(AppContext context,
JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
AMPreemptionPolicy preemptionPolicy) {
this(context, jobTokenSecretManager, rmHeartbeatHandler,
preemptionPolicy, null);
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:8,代码来源:TaskAttemptListenerImpl.java
示例9: MockTaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public MockTaskAttemptListenerImpl(AppContext context,
JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
TaskHeartbeatHandler hbHandler,
AMPreemptionPolicy policy) {
super(context, jobTokenSecretManager, rmHeartbeatHandler, policy);
this.taskHeartbeatHandler = hbHandler;
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:10,代码来源:TestTaskAttemptListenerImpl.java
示例10: TaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public TaskAttemptListenerImpl(AppContext context,
JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler) {
super(TaskAttemptListenerImpl.class.getName());
this.context = context;
this.jobTokenSecretManager = jobTokenSecretManager;
this.rmHeartbeatHandler = rmHeartbeatHandler;
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:9,代码来源:TaskAttemptListenerImpl.java
示例11: MockTaskAttemptListenerImpl
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public MockTaskAttemptListenerImpl(AppContext context,
JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
TaskHeartbeatHandler hbHandler) {
super(context, jobTokenSecretManager, rmHeartbeatHandler);
this.taskHeartbeatHandler = hbHandler;
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:8,代码来源:TestTaskAttemptListenerImpl.java
示例12: CommitterEventHandler
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
public CommitterEventHandler(AppContext context, OutputCommitter committer,
RMHeartbeatHandler rmHeartbeatHandler) {
super("CommitterEventHandler");
this.context = context;
this.committer = committer;
this.rmHeartbeatHandler = rmHeartbeatHandler;
this.stopped = new AtomicBoolean(false);
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:9,代码来源:CommitterEventHandler.java
示例13: MRAppMasterTest
import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler; //导入依赖的package包/类
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);
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:13,代码来源:TestMRAppMaster.java
注:本文中的org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论