public static TimelineAbout createTimelineAbout(String about) { TimelineAbout tsInfo = new TimelineAbout(about); tsInfo.setHadoopBuildVersion(VersionInfo.getBuildVersion()); tsInfo.setHadoopVersion(VersionInfo.getVersion()); tsInfo.setHadoopVersionBuiltOn(VersionInfo.getDate()); tsInfo.setTimelineServiceBuildVersion(YarnVersionInfo.getBuildVersion()); tsInfo.setTimelineServiceVersion(YarnVersionInfo.getVersion()); tsInfo.setTimelineServiceVersionBuiltOn(YarnVersionInfo.getDate()); return tsInfo; }
/** * Test the yarn version info routines. * @throws IOException */ @Test public void versionInfoGenerated() throws IOException { // can't easily know what the correct values are going to be so just // make sure they aren't Unknown assertTrue("getVersion returned Unknown", !YarnVersionInfo.getVersion().equals("Unknown")); assertTrue("getUser returned Unknown", !YarnVersionInfo.getUser().equals("Unknown")); assertTrue("getUrl returned Unknown", !YarnVersionInfo.getUrl().equals("Unknown")); assertTrue("getSrcChecksum returned Unknown", !YarnVersionInfo.getSrcChecksum().equals("Unknown")); // these could be Unknown if the VersionInfo generated from code not in svn or git // so just check that they return something assertNotNull("getRevision returned null", YarnVersionInfo.getRevision()); assertNotNull("getBranch returned null", YarnVersionInfo.getBranch()); assertTrue("getBuildVersion check doesn't contain: source checksum", YarnVersionInfo.getBuildVersion().contains("source checksum")); } }
public static void main(String[] args) { LOG.debug("version: "+ getVersion()); System.out.println("YARN " + getVersion()); System.out.println("Subversion " + getUrl() + " -r " + getRevision()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); } }
public MockNM(String nodeIdStr, Resource capability, ResourceTrackerService resourceTracker) { this(nodeIdStr, capability, resourceTracker, YarnVersionInfo.getVersion()); }
public static void main(String[] args) { LOG.debug("version: "+ getVersion()); System.out.println("Yarn " + getVersion()); System.out.println("Subversion " + getUrl() + " -r " + getRevision()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); } }
public MockNM(String nodeIdStr, int memory, int vcores, ResourceTrackerService resourceTracker) { this(nodeIdStr, memory, vcores, resourceTracker, YarnVersionInfo.getVersion()); }
public ClusterInfo(ResourceManager rm) { long ts = ResourceManager.getClusterTimeStamp(); this.id = ts; this.state = rm.getServiceState(); this.haState = rm.getRMContext().getHAServiceState(); this.rmStateStoreName = rm.getRMContext().getStateStore().getClass() .getName(); this.startedOn = ts; this.resourceManagerVersion = YarnVersionInfo.getVersion(); this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); this.haZooKeeperConnectionState = rm.getRMContext().getHAZookeeperConnectionState(); }
/** * Test the yarn version info routines. * @throws IOException */ @Test public void versionInfoGenerated() throws IOException { // can't easily know what the correct values are going to be so just // make sure they aren't Unknown assertTrue("getVersion returned Unknown", !YarnVersionInfo.getVersion().equals("Unknown")); assertTrue("getUser returned Unknown", !YarnVersionInfo.getUser().equals("Unknown")); assertTrue("getUrl returned Unknown", !YarnVersionInfo.getUrl().equals("Unknown")); assertTrue("getSrcChecksum returned Unknown", !YarnVersionInfo.getSrcChecksum().equals("Unknown")); // these could be Unknown if the VersionInfo generated from code not in svn or git // so just check that they return something assertNotNull("getRevision returned null", YarnVersionInfo.getRevision()); assertNotNull("getBranch returned null", YarnVersionInfo.getBranch()); assertTrue("getBuildVersion check doesn't contain: source checksum", YarnVersionInfo.getBuildVersion().contains("source checksum")); } }
public static void main(String[] args) { LOG.debug("version: "+ getVersion()); System.out.println("Yarn " + getVersion()); System.out.println("Subversion " + getUrl() + " -r " + getRevision()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); } }
public MockNM(String nodeIdStr, int memory, int vcores, ResourceTrackerService resourceTracker) { this(nodeIdStr, memory, vcores, resourceTracker, YarnVersionInfo.getVersion()); }
public ClusterInfo(ResourceManager rm) { long ts = ResourceManager.getClusterTimeStamp(); this.id = ts; this.state = rm.getServiceState(); this.haState = rm.getRMContext().getHAServiceState(); this.rmStateStoreName = rm.getRMContext().getStateStore().getClass() .getName(); this.startedOn = ts; this.resourceManagerVersion = YarnVersionInfo.getVersion(); this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); this.haZooKeeperConnectionState = rm.getRMContext().getRMAdminService().getHAZookeeperConnectionState(); }
/** * Test the yarn version info routines. * @throws IOException */ @Test public void versionInfoGenerated() throws IOException { // can't easily know what the correct values are going to be so just // make sure they aren't Unknown assertNotEquals("getVersion returned Unknown", "Unknown", YarnVersionInfo.getVersion()); assertNotEquals("getUser returned Unknown", "Unknown", YarnVersionInfo.getUser()); assertNotEquals("getSrcChecksum returned Unknown", "Unknown", YarnVersionInfo.getSrcChecksum()); // these could be Unknown if the VersionInfo generated from code not in svn or git // so just check that they return something assertNotNull("getUrl returned null", YarnVersionInfo.getUrl()); assertNotNull("getRevision returned null", YarnVersionInfo.getRevision()); assertNotNull("getBranch returned null", YarnVersionInfo.getBranch()); assertTrue("getBuildVersion check doesn't contain: source checksum", YarnVersionInfo.getBuildVersion().contains("source checksum")); } }
@Override protected void serviceStart() throws Exception { // NodeManager is the last service to start, so NodeId is available. this.nodeId = this.context.getNodeId(); LOG.info("Node ID assigned is : " + this.nodeId); this.httpPort = this.context.getHttpPort(); this.nodeManagerVersionId = YarnVersionInfo.getVersion(); try { // Registration has to be in start so that ContainerManager can get the // perNM tokens needed to authenticate ContainerTokens. this.resourceTracker = getRMClient(); registerWithRM(); super.serviceStart(); startStatusUpdater(); } catch (Exception e) { String errorMessage = "Unexpected error starting NodeStatusUpdater"; LOG.error(errorMessage, e); throw new YarnRuntimeException(e); } }
public ClusterInfo(ResourceManager rm) { long ts = ResourceManager.getClusterTimeStamp(); this.id = ts; this.state = rm.getServiceState(); this.haState = rm.getRMContext().getHAServiceState(); this.rmStateStoreName = rm.getRMContext().getStateStore().getClass() .getName(); this.startedOn = ts; this.resourceManagerVersion = YarnVersionInfo.getVersion(); this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); this.haZooKeeperConnectionState = rm.getRMContext().getRMAdminService().getHAZookeeperConnectionState(); }
@Override protected void serviceStart() throws Exception { // NodeManager is the last service to start, so NodeId is available. this.nodeId = this.context.getNodeId(); LOG.info("Node ID assigned is : " + this.nodeId); this.httpPort = this.context.getHttpPort(); this.nodeManagerVersionId = YarnVersionInfo.getVersion(); try { // Registration has to be in start so that ContainerManager can get the // perNM tokens needed to authenticate ContainerTokens. this.resourceTracker = getRMClient(); registerWithRM(); super.serviceStart(); startStatusUpdater(); } catch (Exception e) { String errorMessage = "Unexpected error starting NodeStatusUpdater"; LOG.error(errorMessage, e); throw new YarnRuntimeException(e); } }
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(); }
@Override protected void serviceStart() throws Exception { // NodeManager is the last service to start, so NodeId is available. this.nodeId = this.context.getNodeId(); this.httpPort = this.context.getHttpPort(); this.nodeManagerVersionId = YarnVersionInfo.getVersion(); try { // Registration has to be in start so that ContainerManager can get the // perNM tokens needed to authenticate ContainerTokens. this.resourceTracker = getRMClient(); registerWithRM(); super.serviceStart(); startStatusUpdater(); } catch (Exception e) { String errorMessage = "Unexpected error starting NodeStatusUpdater"; LOG.error(errorMessage, e); throw new YarnRuntimeException(e); } }
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(); }
@Override protected void serviceStart() throws Exception { // NodeManager is the last service to start, so NodeId is available. this.nodeId = this.context.getNodeId(); this.httpPort = this.context.getHttpPort(); this.nodeManagerVersionId = YarnVersionInfo.getVersion(); try { // Registration has to be in start so that ContainerManager can get the // perNM tokens needed to authenticate ContainerTokens. this.resourceTracker = getRMClient(); registerWithRM(); super.serviceStart(); startStatusUpdater(); } catch (Exception e) { String errorMessage = "Unexpected error starting NodeStatusUpdater"; LOG.error(errorMessage, e); throw new YarnRuntimeException(e); } }
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(); }