private NodeStatus getNodeStatus(int responseId) throws IOException { NodeHealthStatus nodeHealthStatus = this.context.getNodeHealthStatus(); nodeHealthStatus.setHealthReport(healthChecker.getHealthReport()); nodeHealthStatus.setIsNodeHealthy(healthChecker.isHealthy()); nodeHealthStatus.setLastHealthReportTime(healthChecker .getLastHealthReportTime()); if (LOG.isDebugEnabled()) { LOG.debug("Node's health-status : " + nodeHealthStatus.getIsNodeHealthy() + ", " + nodeHealthStatus.getHealthReport()); } List<ContainerStatus> containersStatuses = getContainerStatuses(); NodeStatus nodeStatus = NodeStatus.newInstance(nodeId, responseId, containersStatuses, createKeepAliveApplicationList(), nodeHealthStatus); return nodeStatus; }
private NodeStatus getNodeStatus(int responseId) throws IOException { NodeHealthStatus nodeHealthStatus = this.context.getNodeHealthStatus(); nodeHealthStatus.setHealthReport(healthChecker.getHealthReport()); nodeHealthStatus.setIsNodeHealthy(healthChecker.isHealthy()); nodeHealthStatus.setLastHealthReportTime(healthChecker .getLastHealthReportTime()); if (LOG.isDebugEnabled()) { LOG.debug("Node's health-status : " + nodeHealthStatus.getIsNodeHealthy() + ", " + nodeHealthStatus.getHealthReport()); } List<ContainerStatus> containersStatuses = getContainerStatuses(); NodeStatus nodeStatus = NodeStatus.newInstance(nodeId, responseId, containersStatuses, createKeepAliveApplicationList(), nodeHealthStatus); return nodeStatus; }
public NodeInfo(final Context context, final ResourceView resourceView) { this.id = context.getNodeId().toString(); this.nodeHostName = context.getNodeId().getHost(); this.totalVmemAllocatedContainersMB = resourceView .getVmemAllocatedForContainers() / BYTES_IN_MB; this.vmemCheckEnabled = resourceView.isVmemCheckEnabled(); this.totalPmemAllocatedContainersMB = resourceView .getPmemAllocatedForContainers() / BYTES_IN_MB; this.pmemCheckEnabled = resourceView.isPmemCheckEnabled(); this.totalVCoresAllocatedContainers = resourceView .getVCoresAllocatedForContainers(); this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy(); this.lastNodeUpdateTime = context.getNodeHealthStatus() .getLastHealthReportTime(); this.healthReport = context.getNodeHealthStatus().getHealthReport(); this.nodeManagerVersion = YarnVersionInfo.getVersion(); this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); }
public NodeInfo(final Context context, final ResourceView resourceView) { this.id = context.getNodeId().toString(); this.nodeHostName = context.getNodeId().getHost(); this.totalVmemAllocatedContainersMB = resourceView .getVmemAllocatedForContainers() / BYTES_IN_MB; this.vmemCheckEnabled = resourceView.isVmemCheckEnabled(); this.totalPmemAllocatedContainersMB = resourceView .getPmemAllocatedForContainers() / BYTES_IN_MB; this.pmemCheckEnabled = resourceView.isPmemCheckEnabled(); this.totalVCoresAllocatedContainers = resourceView .getVCoresAllocatedForContainers(); this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy(); this.lastNodeUpdateTime = context.getNodeHealthStatus() .getLastHealthReportTime(); this.healthReport = context.getNodeHealthStatus().getHealthReport(); this.nodeManagerVersion = YarnVersionInfo.getVersion(); this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); }
@VisibleForTesting protected NodeStatus getNodeStatus(int responseId) throws IOException { NodeHealthStatus nodeHealthStatus = this.context.getNodeHealthStatus(); nodeHealthStatus.setHealthReport(healthChecker.getHealthReport()); nodeHealthStatus.setIsNodeHealthy(healthChecker.isHealthy()); nodeHealthStatus.setLastHealthReportTime(healthChecker .getLastHealthReportTime()); if (LOG.isDebugEnabled()) { LOG.debug("Node's health-status : " + nodeHealthStatus.getIsNodeHealthy() + ", " + nodeHealthStatus.getHealthReport()); } List<ContainerStatus> containersStatuses = getContainerStatuses(); ResourceUtilization containersUtilization = getContainersUtilization(); ResourceUtilization nodeUtilization = getNodeUtilization(); List<org.apache.hadoop.yarn.api.records.Container> increasedContainers = getIncreasedContainers(); NodeStatus nodeStatus = NodeStatus.newInstance(nodeId, responseId, containersStatuses, createKeepAliveApplicationList(), nodeHealthStatus, containersUtilization, nodeUtilization, increasedContainers); return nodeStatus; }
public NodeInfo(final Context context, final ResourceView resourceView) { this.id = context.getNodeId().toString(); this.nodeHostName = context.getNodeId().getHost(); this.totalVmemAllocatedContainersMB = resourceView .getVmemAllocatedForContainers() / BYTES_IN_MB; this.vmemCheckEnabled = resourceView.isVmemCheckEnabled(); this.totalPmemAllocatedContainersMB = resourceView .getPmemAllocatedForContainers() / BYTES_IN_MB; this.pmemCheckEnabled = resourceView.isPmemCheckEnabled(); this.totalVCoresAllocatedContainers = resourceView .getVCoresAllocatedForContainers(); this.totalGPUsAllocatedContainers = resourceView .getGPUsAllocatedForContainers(); this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy(); this.lastNodeUpdateTime = context.getNodeHealthStatus() .getLastHealthReportTime(); this.healthReport = context.getNodeHealthStatus().getHealthReport(); this.nodeManagerVersion = YarnVersionInfo.getVersion(); this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); this.nmStartupTime = NodeManager.getNMStartupTime(); }
@VisibleForTesting protected NodeStatus getNodeStatus(int responseId) throws IOException { NodeHealthStatus nodeHealthStatus = this.context.getNodeHealthStatus(); nodeHealthStatus.setHealthReport(healthChecker.getHealthReport()); nodeHealthStatus.setIsNodeHealthy(healthChecker.isHealthy()); nodeHealthStatus.setLastHealthReportTime(healthChecker .getLastHealthReportTime()); if (LOG.isDebugEnabled()) { LOG.debug("Node's health-status : " + nodeHealthStatus.getIsNodeHealthy() + ", " + nodeHealthStatus.getHealthReport()); } List<ContainerStatus> containersStatuses = getContainerStatuses(); ResourceUtilization containersUtilization = getContainersUtilization(); ResourceUtilization nodeUtilization = getNodeUtilization(); List<org.apache.hadoop.yarn.api.records.Container> increasedContainers = getIncreasedContainers(); NodeStatus nodeStatus = NodeStatus.newInstance(nodeId, responseId, containersStatuses, createKeepAliveApplicationList(), nodeHealthStatus, containersUtilization, nodeUtilization, increasedContainers); nodeStatus.setOpportunisticContainersStatus( getOpportunisticContainersStatus()); return nodeStatus; }
public NodeInfo(final Context context, final ResourceView resourceView) { this.id = context.getNodeId().toString(); this.nodeHostName = context.getNodeId().getHost(); this.totalVmemAllocatedContainersMB = resourceView .getVmemAllocatedForContainers() / BYTES_IN_MB; this.vmemCheckEnabled = resourceView.isVmemCheckEnabled(); this.totalPmemAllocatedContainersMB = resourceView .getPmemAllocatedForContainers() / BYTES_IN_MB; this.pmemCheckEnabled = resourceView.isPmemCheckEnabled(); this.totalVCoresAllocatedContainers = resourceView .getVCoresAllocatedForContainers(); this.resourceTypes = StringUtils.join(", ", ResourceUtils.getResourcesTypeInfo()); this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy(); this.lastNodeUpdateTime = context.getNodeHealthStatus() .getLastHealthReportTime(); this.healthReport = context.getNodeHealthStatus().getHealthReport(); this.nodeManagerVersion = YarnVersionInfo.getVersion(); this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); this.nmStartupTime = NodeManager.getNMStartupTime(); }