本文整理汇总了Java中org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus.setLocalizerId方法的典型用法代码示例。如果您正苦于以下问题:Java LocalizerStatus.setLocalizerId方法的具体用法?Java LocalizerStatus.setLocalizerId怎么用?Java LocalizerStatus.setLocalizerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus
的用法示例。
在下文中一共展示了LocalizerStatus.setLocalizerId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testLocalizerRPC
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus; //导入方法依赖的package包/类
@Test
public void testLocalizerRPC() throws Exception {
InetSocketAddress locAddr = new InetSocketAddress("0.0.0.0", 8040);
LocalizerService server = new LocalizerService(locAddr);
try {
server.start();
Configuration conf = new Configuration();
YarnRPC rpc = YarnRPC.create(conf);
LocalizationProtocol client = (LocalizationProtocol)
rpc.getProxy(LocalizationProtocol.class, locAddr, conf);
LocalizerStatus status =
recordFactory.newRecordInstance(LocalizerStatus.class);
status.setLocalizerId("localizer0");
LocalizerHeartbeatResponse response = client.heartbeat(status);
assertEquals(dieHBResponse(), response);
} finally {
server.stop();
}
assertTrue(true);
}
示例2: createLocalizerStatus
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus; //导入方法依赖的package包/类
static LocalizerStatus createLocalizerStatus() {
LocalizerStatus ret =
recordFactory.newRecordInstance(LocalizerStatus.class);
assertTrue(ret instanceof LocalizerStatusPBImpl);
ret.setLocalizerId("localizer0");
ret.addResourceStatus(createLocalResourceStatus());
return ret;
}
示例3: createLocalizerStatus
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus; //导入方法依赖的package包/类
private LocalizerStatus createLocalizerStatus(String localizerId1) {
LocalizerStatus status = new LocalizerStatusPBImpl();
status.setLocalizerId(localizerId1);
return status;
}