[ https://issues.apache.org/jira/browse/APEXCORE-800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275614#comment-16275614 ]
ASF GitHub Bot commented on APEXCORE-800: ----------------------------------------- tweise closed pull request #589: APEXCORE-800 Disable the disk health checker service for StramMiniClusterTest URL: https://github.com/apache/apex-core/pull/589 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/engine/src/test/java/com/datatorrent/stram/StramMiniClusterTest.java b/engine/src/test/java/com/datatorrent/stram/StramMiniClusterTest.java index 0e3c0ab276..bbb7c1c49b 100644 --- a/engine/src/test/java/com/datatorrent/stram/StramMiniClusterTest.java +++ b/engine/src/test/java/com/datatorrent/stram/StramMiniClusterTest.java @@ -63,6 +63,7 @@ import org.apache.hadoop.yarn.client.api.AMRMClient; import org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest; import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.MiniYARNCluster; import org.apache.hadoop.yarn.server.resourcemanager.ClientRMService; import org.apache.hadoop.yarn.util.Records; @@ -90,6 +91,7 @@ import static java.lang.Thread.sleep; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; /** * The purpose of this test is to verify basic streaming application deployment @@ -126,6 +128,7 @@ public static void setup() throws InterruptedException, IOException conf.setInt("yarn.nodemanager.vmem-pmem-ratio", 20); // workaround to avoid containers being killed because java allocated too much vmem conf.set("yarn.scheduler.capacity.root.queues", "default"); conf.set("yarn.scheduler.capacity.root.default.capacity", "100"); + conf.setBoolean(YarnConfiguration.NM_DISK_HEALTH_CHECK_ENABLE, false); conf.set(YarnConfiguration.NM_ADMIN_USER_ENV, String.format("JAVA_HOME=%s,CLASSPATH=%s", System.getProperty("java.home"), getTestRuntimeClasspath())); conf.set(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST.replaceAll("JAVA_HOME,*", "")); @@ -165,22 +168,26 @@ public static void tearDown() throws IOException } } - @Test - public void testSetupShutdown() throws Exception + private void checkNodeState() throws YarnException { - GetClusterNodesRequest request = - Records.newRecord(GetClusterNodesRequest.class); + GetClusterNodesRequest request = Records.newRecord(GetClusterNodesRequest.class); ClientRMService clientRMService = yarnCluster.getResourceManager().getClientRMService(); GetClusterNodesResponse response = clientRMService.getClusterNodes(request); List<NodeReport> nodeReports = response.getNodeReports(); LOG.info("{}", nodeReports); for (NodeReport nr: nodeReports) { - LOG.info("Node: {}", nr.getNodeId()); - LOG.info("Total memory: {}", nr.getCapability()); - LOG.info("Used memory: {}", nr.getUsed()); - LOG.info("Number containers: {}", nr.getNumContainers()); + if (!nr.getNodeState().isUnusable()) { + return; + } } + fail("Yarn Mini cluster should have at least one usable node."); + } + + @Test + public void testSetupShutdown() throws Exception + { + checkNodeState(); JarHelper jarHelper = new JarHelper(); LOG.info("engine jar: {}", jarHelper.getJar(StreamingAppMaster.class)); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Disable the disk health checker service for StramMiniClusterTest > ---------------------------------------------------------------- > > Key: APEXCORE-800 > URL: https://issues.apache.org/jira/browse/APEXCORE-800 > Project: Apache Apex Core > Issue Type: Improvement > Reporter: Vlad Rozov > Assignee: Vlad Rozov > Priority: Minor > > The health check is not necessary and leads to unexpected build failure in CI > environments when the percentage of free disk space falls below the default. > The test would succeed without the check. -- This message was sent by Atlassian JIRA (v6.4.14#64029)