HDFS-11620. Ozone: Allocate container for MiniOzone cluster fails because of insufficient space error. Contributed by Mukul Kumar Singh.

This commit is contained in:
Anu Engineer 2017-04-04 10:09:40 -07:00 committed by Owen O'Malley
parent fadfe37019
commit 7573a0bc61
2 changed files with 4 additions and 2 deletions

View File

@ -125,8 +125,9 @@ public abstract class SCMCommonPolicy implements ContainerPlacementPolicy {
if (healthyList.size() < nodesRequired) { if (healthyList.size() < nodesRequired) {
msg = String.format("Unable to find enough nodes that meet the space " + msg = String.format("Unable to find enough nodes that meet the space " +
"requirement in healthy node set. Nodes required: %d Found: %d", "requirement of %d bytes in healthy node set." +
nodesRequired, healthyList.size()); " Nodes required: %d Found: %d",
sizeRequired, nodesRequired, healthyList.size());
LOG.error(msg); LOG.error(msg);
throw new SCMException(msg, throw new SCMException(msg,
SCMException.ResultCodes.FAILED_TO_FIND_NODES_WITH_SPACE); SCMException.ResultCodes.FAILED_TO_FIND_NODES_WITH_SPACE);

View File

@ -354,6 +354,7 @@ public final class MiniOzoneCluster extends MiniDFSCluster
if (waitForChillModeFinish) { if (waitForChillModeFinish) {
cluster.waitTobeOutOfChillMode(); cluster.waitTobeOutOfChillMode();
} }
cluster.waitForHeartbeatProcessed();
} catch (Exception e) { } catch (Exception e) {
// A workaround to propagate MiniOzoneCluster failures without // A workaround to propagate MiniOzoneCluster failures without
// changing the method signature (which would require cascading // changing the method signature (which would require cascading