public virtual void VerifyClusterGeneric(long clusterid, long startedon, string state , string haState, string haZooKeeperConnectionState, string hadoopVersionBuiltOn , string hadoopBuildVersion, string hadoopVersion, string resourceManagerVersionBuiltOn , string resourceManagerBuildVersion, string resourceManagerVersion) { NUnit.Framework.Assert.AreEqual("clusterId doesn't match: ", ResourceManager.GetClusterTimeStamp (), clusterid); NUnit.Framework.Assert.AreEqual("startedOn doesn't match: ", ResourceManager.GetClusterTimeStamp (), startedon); NUnit.Framework.Assert.IsTrue("stated doesn't match: " + state, state.Matches(Service.STATE .Inited.ToString())); NUnit.Framework.Assert.IsTrue("HA state doesn't match: " + haState, haState.Matches ("INITIALIZING")); WebServicesTestUtils.CheckStringMatch("hadoopVersionBuiltOn", VersionInfo.GetDate (), hadoopVersionBuiltOn); WebServicesTestUtils.CheckStringEqual("hadoopBuildVersion", VersionInfo.GetBuildVersion (), hadoopBuildVersion); WebServicesTestUtils.CheckStringMatch("hadoopVersion", VersionInfo.GetVersion(), hadoopVersion); WebServicesTestUtils.CheckStringMatch("resourceManagerVersionBuiltOn", YarnVersionInfo .GetDate(), resourceManagerVersionBuiltOn); WebServicesTestUtils.CheckStringEqual("resourceManagerBuildVersion", YarnVersionInfo .GetBuildVersion(), resourceManagerBuildVersion); WebServicesTestUtils.CheckStringMatch("resourceManagerVersion", YarnVersionInfo.GetVersion (), resourceManagerVersion); }
public ClusterInfo(ResourceManager rm) { // JAXB needs this long ts = ResourceManager.GetClusterTimeStamp(); this.id = ts; this.state = rm.GetServiceState(); this.haState = rm.GetRMContext().GetHAServiceState(); this.rmStateStoreName = rm.GetRMContext().GetStateStore().GetType().FullName; 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 (); }
public NodeInfo(Context context, ResourceView resourceView) { // JAXB needs this this.id = context.GetNodeId().ToString(); this.nodeHostName = context.GetNodeId().GetHost(); this.totalVmemAllocatedContainersMB = resourceView.GetVmemAllocatedForContainers( ) / BytesInMb; this.vmemCheckEnabled = resourceView.IsVmemCheckEnabled(); this.totalPmemAllocatedContainersMB = resourceView.GetPmemAllocatedForContainers( ) / BytesInMb; 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 virtual void VerifyNodeInfoGeneric(string id, string healthReport, long totalVmemAllocatedContainersMB , long totalPmemAllocatedContainersMB, long totalVCoresAllocatedContainers, bool vmemCheckEnabled, bool pmemCheckEnabled, long lastNodeUpdateTime, bool nodeHealthy , string nodeHostName, string hadoopVersionBuiltOn, string hadoopBuildVersion, string hadoopVersion, string resourceManagerVersionBuiltOn, string resourceManagerBuildVersion , string resourceManagerVersion) { WebServicesTestUtils.CheckStringMatch("id", "testhost.foo.com:8042", id); WebServicesTestUtils.CheckStringMatch("healthReport", "Healthy", healthReport); NUnit.Framework.Assert.AreEqual("totalVmemAllocatedContainersMB incorrect", 15872 , totalVmemAllocatedContainersMB); NUnit.Framework.Assert.AreEqual("totalPmemAllocatedContainersMB incorrect", 16384 , totalPmemAllocatedContainersMB); NUnit.Framework.Assert.AreEqual("totalVCoresAllocatedContainers incorrect", 4000, totalVCoresAllocatedContainers); NUnit.Framework.Assert.AreEqual("vmemCheckEnabled incorrect", true, vmemCheckEnabled ); NUnit.Framework.Assert.AreEqual("pmemCheckEnabled incorrect", true, pmemCheckEnabled ); NUnit.Framework.Assert.IsTrue("lastNodeUpdateTime incorrect", lastNodeUpdateTime == nmContext.GetNodeHealthStatus().GetLastHealthReportTime()); NUnit.Framework.Assert.IsTrue("nodeHealthy isn't true", nodeHealthy); WebServicesTestUtils.CheckStringMatch("nodeHostName", "testhost.foo.com", nodeHostName ); WebServicesTestUtils.CheckStringMatch("hadoopVersionBuiltOn", VersionInfo.GetDate (), hadoopVersionBuiltOn); WebServicesTestUtils.CheckStringEqual("hadoopBuildVersion", VersionInfo.GetBuildVersion (), hadoopBuildVersion); WebServicesTestUtils.CheckStringMatch("hadoopVersion", VersionInfo.GetVersion(), hadoopVersion); WebServicesTestUtils.CheckStringMatch("resourceManagerVersionBuiltOn", YarnVersionInfo .GetDate(), resourceManagerVersionBuiltOn); WebServicesTestUtils.CheckStringEqual("resourceManagerBuildVersion", YarnVersionInfo .GetBuildVersion(), resourceManagerBuildVersion); WebServicesTestUtils.CheckStringMatch("resourceManagerVersion", YarnVersionInfo.GetVersion (), resourceManagerVersion); }