This is an automated email from the ASF dual-hosted git repository. ilyak pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new 6eaa1dd IGNITE-12697 More detailed YARN log when checking container - Fixes #7437. 6eaa1dd is described below commit 6eaa1dd14003ef312a25163d1dcc38c446adb3ad Author: Valeriy Shinkevich <v.v.shinkev...@gmail.com> AuthorDate: Thu Feb 20 16:56:51 2020 +0300 IGNITE-12697 More detailed YARN log when checking container - Fixes #7437. Signed-off-by: Ilya Kasnacheev <ilya.kasnach...@gmail.com> --- .../org/apache/ignite/yarn/ApplicationMaster.java | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java index f42edb1..886f2d7 100644 --- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java +++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java @@ -110,6 +110,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler { @Override public synchronized void onContainersAllocated(List<Container> conts) { for (Container c : conts) { if (checkContainer(c)) { + log.log(Level.INFO, "Container {0} allocated", c.getId()); + try { ContainerLaunchContext ctx = Records.newRecord(ContainerLaunchContext.class); @@ -174,8 +176,11 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler { log.log(Level.WARNING, "Error launching container " + c.getId(), ex); } } - else + else { + log.log(Level.WARNING, "Container {0} check failed. Releasing...", c.getId()); + rmClient.releaseAssignedContainer(c.getId()); + } } } @@ -185,20 +190,28 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler { */ private boolean checkContainer(Container cont) { // Check limit on running nodes. - if (props.instances() <= containers.size()) + if (props.instances() <= containers.size()) { + log.log(Level.WARNING, "Limit on running nodes exceeded. ({0} of {1} max)", + new Object[] {containers.size(), props.instances()}); + return false; + } // Check host name if (props.hostnameConstraint() != null - && props.hostnameConstraint().matcher(cont.getNodeId().getHost()).matches()) + && props.hostnameConstraint().matcher(cont.getNodeId().getHost()).matches()) { + log.log(Level.WARNING, "Wrong host name '{0}'. It didn't match to '{1}' pattern.", + new Object[] {cont.getNodeId().getHost(), props.hostnameConstraint().toString()}); + return false; + } // Check that slave satisfies min requirements. if (cont.getResource().getVirtualCores() < props.cpusPerNode() || cont.getResource().getMemory() < props.totalMemoryPerNode()) { - log.log(Level.FINE, "Container resources not sufficient requirements. Host: {0}, cpu: {1}, mem: {2}", - new Object[]{cont.getNodeId().getHost(), cont.getResource().getVirtualCores(), - cont.getResource().getMemory()}); + log.log(Level.WARNING, "Container resources not sufficient requirements. Host: {0}, cpu: {1}, mem: {2}", + new Object[] {cont.getNodeId().getHost(), cont.getResource().getVirtualCores(), + cont.getResource().getMemory()}); return false; }