HDFS-13309. Ozone: Improve error message in case of missing nodes. Contributed by Elek, Marton.

This commit is contained in:
Nanda kumar 2018-04-04 21:08:05 +05:30 committed by Owen O'Malley
parent 43f7307829
commit 792ac4d08b
1 changed files with 5 additions and 0 deletions

View File

@ -291,6 +291,11 @@ public class ContainerStateManager implements Closeable {
Pipeline pipeline = selector.getReplicationPipeline(type,
replicationFactor, containerName);
Preconditions.checkNotNull(pipeline, "Pipeline type=%s/"
+ "replication=%s couldn't be found for the new container. "
+ "Do you have enough nodes?", type, replicationFactor);
ContainerInfo containerInfo = new ContainerInfo.Builder()
.setContainerName(containerName)
.setState(HdslProtos.LifeCycleState.ALLOCATED)