本文整理汇总了Java中org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus.addResourceStatus方法的典型用法代码示例。如果您正苦于以下问题:Java LocalizerStatus.addResourceStatus方法的具体用法?Java LocalizerStatus.addResourceStatus怎么用?Java LocalizerStatus.addResourceStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus
的用法示例。
在下文中一共展示了LocalizerStatus.addResourceStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLocalizerStatusForFailedResource
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus; //导入方法依赖的package包/类
private LocalizerStatus createLocalizerStatusForFailedResource(
String localizerId, LocalResourceRequest req) {
LocalizerStatus status = createLocalizerStatus(localizerId);
LocalResourceStatus resourceStatus = new LocalResourceStatusPBImpl();
resourceStatus.setException(SerializedException
.newInstance(new YarnException("test")));
resourceStatus.setStatus(ResourceStatusType.FETCH_FAILURE);
resourceStatus.setResource(req);
status.addResourceStatus(resourceStatus);
return status;
}
示例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;
}