本文整理汇总了Java中org.apache.hadoop.yarn.api.records.ContainerStatus.setDiagnostics方法的典型用法代码示例。如果您正苦于以下问题:Java ContainerStatus.setDiagnostics方法的具体用法?Java ContainerStatus.setDiagnostics怎么用?Java ContainerStatus.setDiagnostics使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.api.records.ContainerStatus
的用法示例。
在下文中一共展示了ContainerStatus.setDiagnostics方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newContainerStatus
import org.apache.hadoop.yarn.api.records.ContainerStatus; //导入方法依赖的package包/类
public static ContainerStatus newContainerStatus(ContainerId containerId,
ContainerState containerState, String diagnostics, int exitStatus) {
ContainerStatus containerStatus = recordFactory
.newRecordInstance(ContainerStatus.class);
containerStatus.setState(containerState);
containerStatus.setContainerId(containerId);
containerStatus.setDiagnostics(diagnostics);
containerStatus.setExitStatus(exitStatus);
return containerStatus;
}
示例2: cloneAndGetContainerStatus
import org.apache.hadoop.yarn.api.records.ContainerStatus; //导入方法依赖的package包/类
@Override
public ContainerStatus cloneAndGetContainerStatus() {
ContainerStatus containerStatus = recordFactory
.newRecordInstance(ContainerStatus.class);
containerStatus
.setState(org.apache.hadoop.yarn.api.records.ContainerState.RUNNING);
containerStatus.setDiagnostics("testing");
containerStatus.setExitStatus(0);
return containerStatus;
}
示例3: createAbnormalContainerStatus
import org.apache.hadoop.yarn.api.records.ContainerStatus; //导入方法依赖的package包/类
/**
* Utility to create a {@link ContainerStatus} during exceptional
* circumstances.
*
* @param containerId {@link ContainerId} of returned/released/lost container.
* @param diagnostics diagnostic message
* @return <code>ContainerStatus</code> for an returned/released/lost
* container
*/
private static ContainerStatus createAbnormalContainerStatus(
ContainerId containerId, int exitStatus, String diagnostics) {
ContainerStatus containerStatus =
recordFactory.newRecordInstance(ContainerStatus.class);
containerStatus.setContainerId(containerId);
containerStatus.setDiagnostics(diagnostics);
containerStatus.setExitStatus(exitStatus);
containerStatus.setState(ContainerState.COMPLETE);
return containerStatus;
}