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 virtual void VerifyHsInfoGeneric(string hadoopVersionBuiltOn, string hadoopBuildVersion , string hadoopVersion, long startedon) { WebServicesTestUtils.CheckStringMatch("hadoopVersionBuiltOn", VersionInfo.GetDate (), hadoopVersionBuiltOn); WebServicesTestUtils.CheckStringEqual("hadoopBuildVersion", VersionInfo.GetBuildVersion (), hadoopBuildVersion); WebServicesTestUtils.CheckStringMatch("hadoopVersion", VersionInfo.GetVersion(), hadoopVersion); NUnit.Framework.Assert.AreEqual("startedOn doesn't match: ", JobHistoryServer.historyServerTimeStamp , startedon); }
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); }